Skip to content

Commit

Permalink
ref(azure): revert to using wal-e versions of azure and azure-storage…
Browse files Browse the repository at this point in the history
…-blob

Signed-off-by: Cryptophobia <aouzounov@gmail.com>
  • Loading branch information
Cryptophobia committed Oct 16, 2020
1 parent 004f62f commit 0213a2d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ RUN mkdir -p $WALE_ENVDIR $PGDATA_RECOVERY \
ca-certificates \
python3 \
py-pip \
&& pip3 install --upgrade pip setuptools \
&& pip3 install --upgrade pip setuptools wheel \
&& pip install --disable-pip-version-check --no-cache-dir \
psycopg2-binary==2.8.4 \
envdir==1.0.1 \
wal-e[aws,azure,google,swift]==1.1.1 \
gcloud==0.18.3 \
oauth2client==4.1.3 \
azure-storage-blob==12.5.0 \
azure==3.0.0 \
azure-storage-blob==1.1.0 \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/*

Expand Down
2 changes: 1 addition & 1 deletion contrib/ci/test-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ kill-containers "${PG_JOB}"
test-upgrade-from postgres:11-alpine
kill-containers "${PG_JOB}"

test-upgrade-from-wal hephy/postgres:v2.7.1
test-upgrade-from-wal hephy/postgres:v2.7.5

puts-step "tests PASSED!"
exit 0
11 changes: 5 additions & 6 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 BlobServiceClient
from azure.storage.blob import BlockBlobService


def bucket_exists(conn, name):
Expand Down Expand Up @@ -63,12 +63,11 @@ elif os.getenv('DATABASE_STORAGE') == "gcs":
if not exists:
conn.create_bucket(bucket_name)

# WIP: Currently broken and needs to be update using the new BlobServiceClient
# WIP: Needs to be updated to use new client version and new auth method with azure_storage_conn_string at some point
# Currently pegged to the wal-e azure client and blob-storage versions in Dockerfile
elif os.getenv('DATABASE_STORAGE') == "azure":
connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING")
azure_blob_service_client = BlobServiceClient.from_connection_string(connection_string)

azure_blob_service_client.create_container(bucket_name)
conn = BlockBlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
conn.create_container(bucket_name)

elif os.getenv('DATABASE_STORAGE') == "swift":
conn = swiftclient.Connection(
Expand Down

0 comments on commit 0213a2d

Please sign in to comment.