Merge lp://qastaging/~doanac/uci-engine/deploy-upgrade into lp://qastaging/uci-engine

Proposed by Andy Doan
Status: Merged
Approved by: Andy Doan
Approved revision: 683
Merged at revision: 691
Proposed branch: lp://qastaging/~doanac/uci-engine/deploy-upgrade
Merge into: lp://qastaging/uci-engine
Diff against target: 153 lines (+60/-54)
1 file modified
juju-deployer/deploy.py (+60/-54)
To merge this branch: bzr merge lp://qastaging/~doanac/uci-engine/deploy-upgrade
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Francis Ginther Approve
Joe Talbott (community) Approve
Review via email: mp+227140@code.qastaging.launchpad.net

Commit message

deploy.py: improve upgrade logic and other fixes

This breaks up our options for upgrade by requiring an "upgrade type"
which can be "charms", "code", or "config".

I also removed some options that are no longer used/supported.

I also cleaned up the logic in our "main" to ensure we are really only
uploading tarballs and generating our YAML files when needed.

Description of the change

I'm a little hesitant to propse this, but time is running out for me and the only real way for this kind of feature to get confidence is by getting everyone using it.

This attemps to get our upgrade logic working well enough for i/s. It breaks up upgrade into 3 kinds: charms, config, and code. Code is really a special case of "config" but is special enough to warrant its own option.

I actually hit a problem in my deployment this evening and this deploy.py got me through it. So I'll just explain how that worked as a way to show you how its useful.

= What I Did
Accidentally deployed a branch that had bad wsgi-app and rabbit-mq charms (the os.path.lexits problem from this morning). So deploy.py broke and juju status was showing almost everything as broke in config-changed.

= How I Fixed It

1) you have to run "juju resolved" on each broken unit to make juju happy

2) ran "deploy.py --upgrade charm" and got the proper charm code on each unit. Now I had good charms but not the right code.

3) ran "deploy.py --upgrade code" and got proper code everywhere

I thought things were good, but I realized I was missing all the relationships because deploy.py didn't get to set them up. So I just ran our classic "./juju-deployer/deploy.py". This saw everything was deployed but needed relations. It added the relations for me and I wound up with a real working deployment.

= How I responded

I'm drinking a Shiner Bock and describing my exploits in an MP from the Texas Gulf Coast.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:682
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1097/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1097/rebuild

review: Approve (continuous-integration)
Revision history for this message
Joe Talbott (joetalbott) wrote :

This looks logical to me and I'm happy to see this code being added. I'm wondering if we want to add an 'all' option that basically does an 'charm' and 'config' (maybe 'code' too if I'm not misunderstanding that 'code' is really a subset of 'charm'). This can happen later and shouldn't block this MP.

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

not a bad idea. we could do something like:

  if 'all' in args.upgrade:
      args.upgrade = ['charm', 'config']

I'd say we should handle it in another MP. and maybe wait a few days to
make sure that's a common enough use case

On Thu, Jul 17, 2014 at 9:41 AM, Joe Talbott <email address hidden>
wrote:

> Review: Approve
>
> This looks logical to me and I'm happy to see this code being added. I'm
> wondering if we want to add an 'all' option that basically does an 'charm'
> and 'config' (maybe 'code' too if I'm not misunderstanding that 'code' is
> really a subset of 'charm'). This can happen later and shouldn't block
> this MP.
> --
> https://code.launchpad.net/~doanac/uci-engine/deploy-upgrade/+merge/227140
> You are the owner of lp:~doanac/uci-engine/deploy-upgrade.
>

Revision history for this message
Evan (ev) wrote :

I think handling it in a follow on MP is entirely reasonable:

https://app.asana.com/0/8499154990155/14804470906366

Revision history for this message
Francis Ginther (fginther) wrote :

I like the upgrade additions and agree that we need to get these landed and start using them. main() is also improved, but it still a little confusing, not something that needs to be addressed here.

I'm making my way through a six pack of Shiner White Wing (just not at this very moment :-) ). I'm enjoying it, but it's not the staple that Shiner Bock is in our house.

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

i'll top approve now. Things should "just work", but this at least gives me 36 hours to help iron out any issues pepole may find.

Revision history for this message
Ubuntu CI Bot (uci-bot) wrote :

Attempt to merge into lp:uci-engine failed due to conflicts:

text conflict in juju-deployer/deploy.py

683. By Andy Doan

merge with trunk to resolve conflict with cprov's merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:683
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1108/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1108/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches