Skip to content

Commit

Permalink
Merge pull request #199 from vdice/fix/pin-azure-storage-dep
Browse files Browse the repository at this point in the history
fix(Dockerfile): pin azure-storage to version wal-e currently uses
  • Loading branch information
vdice authored May 25, 2017
2 parents 536a652 + 35551af commit 0e5c15b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ RUN buildDeps='gcc git libffi-dev libssl-dev python3-dev python3-pip python3-whe
chown -R postgres /run/postgresql && \
pip install --disable-pip-version-check --no-cache-dir \
envdir==0.7 \
wal-e[aws,azure,google,swift]==v1.0.2 && \
wal-e[aws,azure,google,swift]==v1.0.2 \
# pin azure-storage to version wal-e uses (see docker-entrypoint.sh)
azure-storage==0.20.0 && \
# "upgrade" boto to 2.43.0 + the patch to fix minio connections
pip install --disable-pip-version-check --no-cache-dir --upgrade git+https://github.com/deis/boto@88c980e56d1053892eb940d43a15a68af4ebb5e6 && \
# cleanup
Expand Down
4 changes: 2 additions & 2 deletions rootfs/bin/create_bucket
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from boto.s3.connection import S3Connection, OrdinaryCallingFormat
from oauth2client.service_account import ServiceAccountCredentials
from gcloud.storage.client import Client
from gcloud import exceptions
from azure.storage.blob import BlockBlobService
from azure.storage.blob import BlobService

def bucket_exists(conn, name):
bucket = conn.lookup(name)
Expand Down Expand Up @@ -60,7 +60,7 @@ elif os.getenv('DATABASE_STORAGE') == "gcs":
conn.create_bucket(bucket_name)

elif os.getenv('DATABASE_STORAGE') == "azure":
conn = BlockBlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
conn = BlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
#It doesn't throw an exception if the container exists by default(https://github.com/Azure/azure-storage-python/blob/master/azure/storage/blob/baseblobservice.py#L504).
conn.create_container(bucket_name)

Expand Down

0 comments on commit 0e5c15b

Please sign in to comment.