Merge lp://qastaging/~jml/juju-jitsu/deploy-one into lp://qastaging/juju-jitsu

Proposed by Jonathan Lange
Status: Needs review
Proposed branch: lp://qastaging/~jml/juju-jitsu/deploy-one
Merge into: lp://qastaging/juju-jitsu
Diff against target: 236 lines (+202/-1)
3 files modified
sub-commands/Makefile.am (+2/-0)
sub-commands/deploy-one (+200/-0)
sub-commands/deploy-to (+0/-1)
To merge this branch: bzr merge lp://qastaging/~jml/juju-jitsu/deploy-one
Reviewer Review Type Date Requested Status
Clint Byrum (community) Needs Fixing
Review via email: mp+128061@code.qastaging.launchpad.net

Commit message

Add deploy-one subcommand. Deploys one instance of a service.

Description of the change

Hello!

A thing I do a lot when developing charms is this:

  juju deploy $CHARM_NAME
  jitsu watch $SERVICE_NAME --x-state pending --num-units 1
  juju status

And then in another terminal:

  juju debug-log

Because I was raised by humans, I've acquired their trait of being easily
bored by doing the same things over and over.

This branch adds a command that does pretty much all of that:

  jitsu deploy-one --debug $CHARM_NAME

Combined with tools like 'alert' or <http://mumak.net/undistract-me>, this
takes much of the pain out of iterating on charms.

Known issues:

 - Figuring out the default service name from the charm name is
   somewhat kludgy.

 - Always exits with 0, even if the charm did not deploy

cheers,
jml

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Actually there is one issue, please fix. Add deploy-one to sub-commands/Makefile.am

review: Needs Fixing
84. By Jonathan Lange

Add deploy-one to sub-commands.

85. By Jonathan Lange

Dicking about with documentation.

Revision history for this message
Jonathan Lange (jml) wrote :

Have fixed sub-commands/Makefile.am. I tried to make the --help command work better, but I couldn't actually get _any_ --help to work when run for my branch.

cheers,
jml

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

  File "sub-commands/deploy-one", line 40
    description="deploy a single unit of a service"))
                                                    ^
SyntaxError: invalid syntax

and when that is addressed

Traceback (most recent call last):
  File "sub-commands/deploy-one", line 201, in <module>
    main()
  File "sub-commands/deploy-one", line 179, in main
    parser = get_parser()
  File "sub-commands/deploy-one", line 38, in get_parser
    parser = ArgumentParser(
NameError: global name 'ArgumentParser' is not defined

And when *that* is addressed..

Traceback (most recent call last):
  File "sub-commands/deploy-one", line 201, in <module>
    main()
  File "sub-commands/deploy-one", line 179, in main
    parser = get_parser()
  File "sub-commands/deploy-one", line 40, in get_parser
    description="deploy a single unit of a service")
TypeError: __init__() got an unexpected keyword argument 'help'

review: Needs Fixing
86. By Jonathan Lange

Fix a bunch of trivial syntax errors

Revision history for this message
Jonathan Lange (jml) wrote :

On 9 October 2012 18:53, Clint Byrum <email address hidden> wrote:
> Review: Needs Fixing
>
> File "sub-commands/deploy-one", line 40
> description="deploy a single unit of a service"))
> ^
> SyntaxError: invalid syntax
>
> and when that is addressed
>
> Traceback (most recent call last):
> File "sub-commands/deploy-one", line 201, in <module>
> main()
> File "sub-commands/deploy-one", line 179, in main
> parser = get_parser()
> File "sub-commands/deploy-one", line 38, in get_parser
> parser = ArgumentParser(
> NameError: global name 'ArgumentParser' is not defined
>
> And when *that* is addressed..
>
> Traceback (most recent call last):
> File "sub-commands/deploy-one", line 201, in <module>
> main()
> File "sub-commands/deploy-one", line 179, in main
> parser = get_parser()
> File "sub-commands/deploy-one", line 40, in get_parser
> description="deploy a single unit of a service")
> TypeError: __init__() got an unexpected keyword argument 'help'
>
> --
> https://code.launchpad.net/~jml/juju-jitsu/deploy-one/+merge/128061
> You are the owner of lp:~jml/juju-jitsu/deploy-one.

All three fixed. Sorry about the cock-up, I think it was due to a
poorly-reverted attempt to integrate better with --help.

jml

Unmerged revisions

86. By Jonathan Lange

Fix a bunch of trivial syntax errors

85. By Jonathan Lange

Dicking about with documentation.

84. By Jonathan Lange

Add deploy-one to sub-commands.

83. By Jonathan Lange

More docs & sanity checking.

82. By Jonathan Lange

Dump status at the end.

81. By Jonathan Lange

Tidy up a little. Don't show debug log by default

80. By Jonathan Lange

First cut of deploy-one.

79. By Jonathan Lange

Flakes

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