New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export bundle with SAAS block #10408
Merged
Merged
Conversation
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
The following just exports remote applications (SAAS) in the export bundle command.
achilleasa
reviewed
Jul 1, 2019
As we've not released this yet it should be behind a feature flag.
achilleasa
approved these changes
Jul 1, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
QA ok for local -> local controllers.
When exporting an offer consumed from a remote controller the exported-bundle correctly includes the controller prefix.
|
Closed
achilleasa
added a commit
to achilleasa/juju
that referenced
this pull request
Jul 31, 2019
jujubot
added a commit
that referenced
this pull request
Jul 31, 2019
#10473 This PR first reverts the cmr for bundles changes (#10408, #10410) that landed on develop and then merges the current 2.6 HEAD which has all the cmr for bundles changes removed via #10474. This ensures that both 2.6 and develop do not contain any bundle-related changes and allows us to create a separate clean PR to re-introduce the changes just to develop.
jujubot
added a commit
that referenced
this pull request
Aug 2, 2019
#10476 ## Description of change This PR composes the changes of the following PRs that implement the server and client-side bits for supporting offers/saas blocks in bundles as well as the changes for multi-document bundles (a bundle that contains additional overlay documents following the base bundle): Originally landed on **2.6**: - include offers in exported bundles #10353 - apply create offer changes when deploying bundles #10356 - include offer acl in export bundle output #10380 - consume offer #10382 - apply grant offer access changes when deploying bundles #10394 - support for multi-doc bundles and overlays #10460 Originally landed on **develop**: - export bundle with SAAS block #10408 - deploy a SAAS from another local controller #10410 All of the above changes where removed from 2.6 (via #10474) and develop (via #10473) so they can be re-introduced just on develop in order to avoid the risk of shipping potential bugs in a 2.6.x release. ## QA steps ### Expose offers ```console $ export JUJU_DEV_FEATURE_FLAGS=bundle-cmr $ juju bootstrap lxd test --no-gui # Deploy a bundle with an offer $ juju add-user bar $ juju deploy ./testcharms/charm-repo/bundle/apache2-with-offers Resolving charm: cs:apache2-26 Executing changes: - upload charm cs:apache2-26 for series bionic - deploy application apache2 on bionic using cs:apache2-26 - create offer my-offer using apache2:apache-website,website-cache - grant user admin admin access to offer my-offer - grant user bar consume access to offer my-offer - create offer my-other-offer using apache2:apache-website Deploy of bundle completed. # Verify that export-bundle generates a multi-doc bundle $ juju export-bundle series: bionic applications: apache2: charm: cs:apache2-26 --- # overlay.yaml applications: apache2: offers: my-offer: endpoints: - apache-website - website-cache acl: admin: admin bar: consume my-other-offer: endpoints: - apache-website acl: admin: admin # Deploy another bundle with overlays $ juju add-model test1 $ less testcharms/charm-repo/bundle/multi-doc-overlays/bundle.yaml series: trusty applications: apache2: charm: cs:apache2-26 num_units: 1 --- # overlay 1 applications: apache2: offers: my-offer: endpoints: - apache-website acl: admin: admin --- # overlay 2 applications: wordpress: charm: cs:trusty/wordpress-5 num_units: 1 $ echo -n 'my-include' > example.txt $ cat > overlay.yaml << EOT applications: wordpress: annotations: raw: include-file://example.txt enc: include-base64://example.txt EOT $ juju deploy ./testcharms/charm-repo/bundle/multi-doc-overlays --overlay overlay.yaml Resolving charm: cs:apache2-26 Resolving charm: cs:trusty/wordpress-5 Executing changes: - upload charm cs:apache2-26 for series trusty - deploy application apache2 on trusty using cs:apache2-26 - upload charm cs:trusty/wordpress-5 for series trusty - deploy application wordpress on trusty using cs:trusty/wordpress-5 - set annotations for wordpress - create offer my-offer using apache2:apache-website - grant user admin admin access to offer my-offer - add unit apache2/0 to new machine 0 - add unit wordpress/0 to new machine 1 Deploy of bundle completed. $ juju export-bundle series: trusty applications: apache2: charm: cs:apache2-26 num_units: 1 to: - "0" wordpress: charm: cs:trusty/wordpress-5 num_units: 1 to: - "1" annotations: enc: bXktaW5jbHVkZQ== raw: my-include machines: "0": {} "1": {} --- # overlay.yaml applications: apache2: offers: my-offer: endpoints: - apache-website acl: admin: admin ``` ### Consume offers (SAAS blocks) ```console export JUJU_DEV_FEATURE_FLAGS=bundle-cmr juju bootstrap lxd test --no-gui juju deploy mysql juju status --relations juju offer mysql:db juju add-model other juju switch other juju deploy ./testcharms/charm-repo/bundle/wordpress-with-saas/bundle.yaml ``` ```console export JUJU_DEV_FEATURE_FLAGS=bundle-cmr juju bootstrap lxd test juju deploy mysql juju offer mysql:db juju status --relations juju add-model other juju deploy wordpress juju add-relation wordpress:db admin/default.mysql juju export-bundle --filename bundle.yaml ``` file content should: ```yaml series: trusty saas: mysql: url: test:admin/default.mysql applications: wordpress: charm: cs:trusty/wordpress-5 num_units: 1 to: - "0" machines: "0": {} relations: - - wordpress:db - mysql:db ``` Which you can then deploy ```console juju bootstrap lxd other juju deploy ./bundle.yaml ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
The following just exports remote applications (SAAS) in the export
bundle command, if you've got a SAAS offering setup.
QA steps
Setup and deploy mysql
Create a new model and export the bundle
The following should export the SAAS block with mysql in it.
Documentation changes
Export bundle now includes a SAAS block if you've set on up.