-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #566 from cderici/bundles-with-overlays
#566 ### Description This PR adds the support for overlays in bundle deployments. Fixes #510 This PR relies on a change in Juju's api for getting changes for bundles with overlays (multi-part yaml support), juju/juju#13448. Jira card [#142](https://warthogs.atlassian.net/browse/JUJU-142) ### QA Steps `tests/integration/test_model.py` includes some new tests for the added support. ``` tox -e integration -- tests/integration/test_model.py ``` ### Notes & Discussion Please do not merge yet, as a couple of small things need to be done/added for this to be ready to land: - [x] Add a PR on Juju for `GetChange` juju/juju#13448 - [x] Land that PR on Juju - [x] Charmstore bundles with `--overlay` argument, along with its test - [x] A test for a multi-part overlay as an `--overlay` argument to a local bundle being deployed - [x] A test for a multi-part overlay as an `--overlay` argument to a charmstore bundle being deployed - [x] Make sure that we resolve and inline `config: include-file://` and `config: include-base64://` here in `pylibjuju` side
- Loading branch information
Showing
14 changed files
with
296 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
series: xenial | ||
applications: | ||
ghost: | ||
charm: "cs:ghost-19" | ||
num_units: 1 | ||
mysql: | ||
charm: "cs:trusty/mysql-57" | ||
num_units: 1 | ||
options: | ||
max-connections: 2 | ||
tuning-level: include-base64://config-base64.yaml | ||
test: | ||
charm: "../charm" | ||
relations: | ||
- ["ghost", "mysql"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
series: xenial | ||
applications: | ||
ghost: | ||
charm: "cs:ghost-19" | ||
num_units: 1 | ||
options: | ||
config: include-file://config1.yaml | ||
mysql: | ||
charm: "cs:trusty/mysql-57" | ||
num_units: 1 | ||
test: | ||
charm: "../charm" | ||
relations: | ||
- ["ghost", "mysql"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
series: xenial | ||
services: | ||
applications: | ||
ghost: | ||
charm: "cs:ghost-19" | ||
num_units: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
series: xenial | ||
services: | ||
applications: | ||
ghost: | ||
charm: "cs:ghost-19" | ||
num_units: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ZmFzdA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ghost: | ||
url: "http://my-ghost.blg" | ||
port: 2369 |
14 changes: 14 additions & 0 deletions
14
tests/integration/bundle/test-overlays/bundle-with-overlay-multi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
series: xenial | ||
applications: | ||
ghost: | ||
charm: "cs:ghost-19" | ||
num_units: 1 | ||
mysql: | ||
charm: "cs:trusty/mysql-57" | ||
num_units: 1 | ||
relations: | ||
- ["ghost", "mysql"] | ||
--- # overlay.yaml | ||
description: Overlay to remove the ghost app and the relation | ||
applications: | ||
ghost: |
17 changes: 17 additions & 0 deletions
17
tests/integration/bundle/test-overlays/wiki-multi-overlay.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
description: An overlay for the wiki-simple bundle to remove mysql and add memcached | ||
applications: | ||
mysql: | ||
memcached: | ||
charm: "cs:memcached-34" | ||
num_units: 1 | ||
relations: | ||
- ["wiki", "memcached"] | ||
--- | ||
description: Another overlay to remove memcached and add back the mysql and relate | ||
applications: | ||
memcached: | ||
mysql: | ||
charm: "cs:trusty/mysql-57" | ||
num_units: 1 | ||
relations: | ||
- ["wiki:db", "mysql:db"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
description: An overlay for the wiki-simple bundle to remove mysql and add memcached | ||
applications: | ||
test: | ||
mysql: | ||
memcached: | ||
charm: "cs:memcached-34" | ||
num_units: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: Another overlay to remove memcached and add back the mysql and relate | ||
applications: | ||
memcached: | ||
ghost: | ||
options: | ||
config: include-file://config1.yaml |
8 changes: 8 additions & 0 deletions
8
tests/integration/bundle/test-overlays/wiki-simple-overlay.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: An overlay for the wiki-simple bundle to remove mysql and add memcached | ||
applications: | ||
mysql: | ||
memcached: | ||
charm: "cs:memcached-34" | ||
num_units: 1 | ||
relations: | ||
- ["wiki", "memcached"] |
Oops, something went wrong.