Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Add support for passing a charm/bundle id as a deploy-target query parameter #624

Merged
merged 5 commits into from Oct 23, 2014

Conversation

hatched
Copy link
Contributor

@hatched hatched commented Oct 21, 2014

You can now add a query parameter deploy-target with the value a charm or bundle id to the url when loading the GUI to automatically deploy the charm or bundle to the environment.

@jujugui
Copy link
Contributor

jujugui commented Oct 21, 2014

Test FAILed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2110/

@kadams54
Copy link
Contributor

QA is OK, 👍 on the code.

*/
_autoplaceAndCommitAll: function() {
this.deployerBar._autoPlaceUnits();
this.deployerBar.deploy();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not just 'deploy' with immediate true? I guess that doesn't help with placement first, just ecs or not to ecs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still won't have a placed unit but that might be a better approach even if just for the deploy command. I'll look into that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking into this, using immediate: true will help deploy the charm faster but we will still need to create a machine and place the unit on it so overall it won't gain us anything. Going to leave it as-is

@mitechie
Copy link
Contributor

good WIP thanks for the work

@hatched hatched changed the title WIP Add support for passing a charm/bundle id as a deploy-target query parameter Add support for passing a charm/bundle id as a deploy-target query parameter Oct 22, 2014
@hatched
Copy link
Contributor Author

hatched commented Oct 22, 2014

To QA

Visit the GUI with the following urls then do an exploratory QA to make sure that things like deploying bundles/charms still work as expected.

<host>?text=apache&deploy-target=bundle:elasticsearch/15/cluster
<host>?deploy-target=cs:precise/apache2-25

@@ -569,6 +569,12 @@ YUI.add('environment-change-set', function(Y) {
@param {Object} db The database instance.
*/
prepare: function(db) {
if (!this.options || !this.options.modelId) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change and the following similar change are tested as a side effect of existing tests. The app falls over without these modifications.

@jujugui
Copy link
Contributor

jujugui commented Oct 22, 2014

Test PASSed.
Refer to this link for build results: http://ci.jujugui.org:8080/job/juju-gui/2115/

_deployTargetDispatcher: function(entityId) {
var store = this.get('store');
if (entityId.indexOf('bundle') === 0) {
// Query the charmstore for the bundle data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

full sentence please

@mitechie
Copy link
Contributor

👍 QA OK.

I tried out the deploy-to target. I tried it with a bundle without the version and I also tried it with a charm without the cs: and it all still worked properly which was <3

@hatched
Copy link
Contributor Author

hatched commented Oct 23, 2014

Thanks for the reviews and QA! :shipit:

@jujugui
Copy link
Contributor

jujugui commented Oct 23, 2014

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/juju-gui-merge

jujugui added a commit that referenced this pull request Oct 23, 2014
Add support for passing a charm/bundle id as a deploy-target query parameter

You can now add a query parameter `deploy-target` with the value a charm or bundle id to the url when loading the GUI to automatically deploy the charm or bundle to the environment.
@jujugui jujugui merged commit 486c9b9 into juju:develop Oct 23, 2014
@hatched hatched deleted the deploy-target branch November 6, 2014 16:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants