diff --git a/src/README.md b/src/README.md index 31386d9..3196ef7 100644 --- a/src/README.md +++ b/src/README.md @@ -11,7 +11,9 @@ SSH credentials, and more. ## About the Charm This charm installs Vault from the Ubuntu Snap Store and -supports the PostgreSQL storage backend only. +supports the PostgreSQL and MySQL storage backends. Note that Vault itself +does not support PostgreSQL 10, so neither does this charm. If you're +deploying on bionic, you'll need to deploy a 9.x version of PostgreSQL. After deploying and relating the charm to postgresql, install the vault snap locally and use "vault init" to create the diff --git a/src/metadata.yaml b/src/metadata.yaml index cb6be16..f09c31f 100644 --- a/src/metadata.yaml +++ b/src/metadata.yaml @@ -12,8 +12,8 @@ description: | credentials, SQL/NoSQL databases, X.509 certificates, SSH credentials, and more. series: - - bionic - xenial + - bionic tags: - security requires: diff --git a/src/reactive/vault.py b/src/reactive/vault.py index 349326d..380af92 100644 --- a/src/reactive/vault.py +++ b/src/reactive/vault.py @@ -212,7 +212,7 @@ def mysql_setup(database): @when_not('vault.schema.created') def create_vault_table(pgsql): status_set('maintenance', 'connecting to database') - conn = psycopg2.connect(pgsql.master) + conn = psycopg2.connect(str(pgsql.master)) cur = conn.cursor() status_set('maintenance', 'creating vault table') cur.execute(VAULT_TABLE_DDL) diff --git a/src/tests/bundles/bionic-postgres.yaml b/src/tests/bundles/bionic-postgres.yaml new file mode 100644 index 0000000..75c1699 --- /dev/null +++ b/src/tests/bundles/bionic-postgres.yaml @@ -0,0 +1,13 @@ +series: bionic +services: + vault: + num_units: 1 + series: bionic + charm: ../../../vault + postgresql: + series: xenial + charm: cs:postgresql + num_units: 1 +relations: +- - vault:db + - postgresql:db diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index b5b20b1..f139d58 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -7,6 +7,7 @@ gate_bundles: - xenial-ha-mysql - xenial-postgres - xenial-mysql + - bionic-postgres smoke_bundles: - xenial-mysql dev_bundles: