Merge lp://staging/~frankban/juju-quickstart/joyent into lp://staging/juju-quickstart

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 64
Proposed branch: lp://staging/~frankban/juju-quickstart/joyent
Merge into: lp://staging/juju-quickstart
Diff against target: 210 lines (+129/-1)
4 files modified
quickstart/models/envs.py (+60/-1)
quickstart/models/fields.py (+19/-0)
quickstart/tests/models/test_envs.py (+16/-0)
quickstart/tests/models/test_fields.py (+34/-0)
To merge this branch: bzr merge lp://staging/~frankban/juju-quickstart/joyent
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+214022@code.staging.launchpad.net

Description of the change

Add support for the Joyent provider.

Tests: `make check`.

QA:
QA is not straightforward for this branch, due to the
fact this needs to be tested on a not yet released
juju-core. Sorry about that.
1) Check out the 1.18 juju-core branch (lp:juju-core/1.18),
   and compile it.
2) Edit the quickstart/settings.py file included in this branch:
   set `JUJU_CMD` to point to the juju 1.18 path.
3) Sign up for a Joyent account from http://www.joyent.com/.
4) Run `.venv/bin/python juju-quickstart -i` and create a new
   joyent environment: DO NOT bootstrap it from quickstart, just
   create it and exit (^X).
5) Use juju 1.18 to bootstrap the joyent account, e.g.
   `juju bootstrap -e joyent --upload-tools`. This is required
   because quickstart does not support uploading tools.
6) After a minute, and while the environment is bootstrapping,
   open another terminal and re-run quickstart, select the
   joyent account you created and hit "use"
   (or just invoke quickstart with `-e joyent`).
7) Ensure everything proceeds as expected, and wait
   until the quickstart opens the GUI.
Done, destroy the environment, thank you!

https://codereview.appspot.com/83880044/

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Reviewers: mp+214022_code.launchpad.net,

Message:
Please take a look.

Description:
Add support for the Joyent provider.

Tests: `make check`.

QA:
QA is not straightforward for this branch, due to the
fact this needs to be tested on a not yet released
juju-core. Sorry about that.
1) Check out the 1.18 juju-core branch (lp:juju-core/1.18),
    and compile it.
2) Edit the quickstart/settings.py file included in this branch:
    set `JUJU_CMD` to point to the juju 1.18 path.
3) Sign up for a Joyent account from http://www.joyent.com/.
4) Run `.venv/bin/python juju-quickstart -i` and create a new
    joyent environment: DO NOT bootstrap it from quickstart, just
    create it and exit (^X).
5) Use juju 1.18 to bootstrap the joyent account, e.g.
    `juju bootstrap -e joyent --upload-tools`. This is required
    because quickstart does not support uploading tools.
6) After a minute, and while the environment is bootstrapping,
    open another terminal and re-run quickstart, select the
    joyent account you created and hit "use"
    (or just invoke quickstart with `-e joyent`).
7) Ensure everything proceeds as expected, and wait
    until the quickstart opens the GUI.
Done, destroy the environment, thank you!

https://code.launchpad.net/~frankban/juju-quickstart/joyent/+merge/214022

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/83880044/

Affected files (+117, -4 lines):
   A [revision details]
   M quickstart/models/envs.py
   M quickstart/models/fields.py
   M quickstart/tests/models/test_envs.py
   M quickstart/tests/models/test_fields.py

Revision history for this message
Brad Crittenden (bac) wrote :

Code LGTM. On to QA.

https://codereview.appspot.com/83880044/diff/1/quickstart/tests/models/test_fields.py
File quickstart/tests/models/test_fields.py (right):

https://codereview.appspot.com/83880044/diff/1/quickstart/tests/models/test_fields.py#newcode468
quickstart/tests/models/test_fields.py:468:
field.validate(unicode(__file__))
Nice use of __file__. Nicer then creating a temp file and destroying
it.

https://codereview.appspot.com/83880044/

Revision history for this message
Brad Crittenden (bac) wrote :

When doing QA and bootstrapping the joyent environment I get

http://paste.ubuntu.com/7199671/

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py
File quickstart/models/envs.py (right):

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py#newcode621
quickstart/models/envs.py:621: 'manta-user', required=True,
I'm running quickstart for the first time to set up joyent. I don't
know what the manta username and ssh keys are. Are they the same as my
SDC ones? I only have one Joyent username and ssh key.

Kind of confusing.

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py#newcode634
quickstart/models/envs.py:634: 'private-key-path', label='provate key
path', required=False,
typo: provate

https://codereview.appspot.com/83880044/

67. By Francesco Banconi

Fix typo.

Revision history for this message
Brad Crittenden (bac) wrote :

For the private key file path, the default is listed as ~/.ssh/id_rsa

If you try to enter '~/.ssh/id_rsa_joyent', quickstart does not properly
expand the path and gives an error. Using
'/home/bac/.ssh/id_rsa_joyent' was accepted.

https://codereview.appspot.com/83880044/

Revision history for this message
Brad Crittenden (bac) wrote :

QA-OK after lots of struggles, mainly the issue with
passphrase-protected ssh key, which is not quickstart's problem.

Though if juju doesn't screen for it perhaps we should?

https://codereview.appspot.com/83880044/

Revision history for this message
Francesco Banconi (frankban) wrote :

On 2014/04/03 20:06:11, bac wrote:
> For the private key file path, the default is listed as ~/.ssh/id_rsa

> If you try to enter '~/.ssh/id_rsa_joyent', quickstart does not
properly expand
> the path and gives an error. Using '/home/bac/.ssh/id_rsa_joyent' was
accepted.

Good catch. Fixed the FilePathField validation to use expanduser.

https://codereview.appspot.com/83880044/

Revision history for this message
Francesco Banconi (frankban) wrote :

On 2014/04/03 20:22:37, bac wrote:
> QA-OK after lots of struggles, mainly the issue with
passphrase-protected ssh
> key, which is not quickstart's problem.

> Though if juju doesn't screen for it perhaps we should?

Thanks a lot Brad, and sorry again for the difficult QA.
As you mentioned, this is something that must be handled by juju-core,
so, given this will land later, I'd be inclined to wait for the core
fix.

https://codereview.appspot.com/83880044/

68. By Francesco Banconi

Changes as per review.

Revision history for this message
Francesco Banconi (frankban) wrote :

Please take a look.

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py
File quickstart/models/envs.py (right):

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py#newcode621
quickstart/models/envs.py:621: 'manta-user', required=True,
On 2014/04/03 17:23:50, bac wrote:
> I'm running quickstart for the first time to set up joyent. I don't
know what
> the manta username and ssh keys are. Are they the same as my SDC
ones? I only
> have one Joyent username and ssh key.

> Kind of confusing.

Good point Brad, updated the fields description.

https://codereview.appspot.com/83880044/diff/1/quickstart/models/envs.py#newcode634
quickstart/models/envs.py:634: 'private-key-path', label='provate key
path', required=False,
On 2014/04/03 17:23:50, bac wrote:
> typo: provate

Done.

https://codereview.appspot.com/83880044/

Revision history for this message
Brad Crittenden (bac) wrote :
69. By Francesco Banconi

Merged trunk.

Revision history for this message
Francesco Banconi (frankban) wrote :

*** Submitted:

Add support for the Joyent provider.

Tests: `make check`.

QA:
QA is not straightforward for this branch, due to the
fact this needs to be tested on a not yet released
juju-core. Sorry about that.
1) Check out the 1.18 juju-core branch (lp:juju-core/1.18),
    and compile it.
2) Edit the quickstart/settings.py file included in this branch:
    set `JUJU_CMD` to point to the juju 1.18 path.
3) Sign up for a Joyent account from http://www.joyent.com/.
4) Run `.venv/bin/python juju-quickstart -i` and create a new
    joyent environment: DO NOT bootstrap it from quickstart, just
    create it and exit (^X).
5) Use juju 1.18 to bootstrap the joyent account, e.g.
    `juju bootstrap -e joyent --upload-tools`. This is required
    because quickstart does not support uploading tools.
6) After a minute, and while the environment is bootstrapping,
    open another terminal and re-run quickstart, select the
    joyent account you created and hit "use"
    (or just invoke quickstart with `-e joyent`).
7) Ensure everything proceeds as expected, and wait
    until the quickstart opens the GUI.
Done, destroy the environment, thank you!

R=bac
CC=
https://codereview.appspot.com/83880044

https://codereview.appspot.com/83880044/

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