lp:~frankban/juju-quickstart/remove-jenv

Created by Francesco Banconi and last modified
Get this branch:
bzr branch lp:~frankban/juju-quickstart/remove-jenv
Only Francesco Banconi can upload to this branch. If you are Francesco Banconi please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Francesco Banconi
Project:
juju-quickstart
Status:
Merged

Recent revisions

115. By Francesco Banconi

Fix typo and improve params formatting.

114. By Francesco Banconi

Complete the test suite for jenv removal functionality.

113. By Francesco Banconi

Functionality implemented, just one missing test.

112. By Francesco Banconi

Reorganize view code.

Replace most of the view closures with external
private functions.
This has several good side effects in my opinion:
- view functions are shorter;
- we know which objects are used for each callback
  function, because we need to explicitly pass them
  as arguments;
- external functions can be reused by multiple views
  if required (and we have the _use example here);
- if an external callback become less straightforward,
  it is now possible to directly unit test it.

Tests: `make check`.

QA:
If unit tests pass we have some confidence that
the interactive session is not broken.
However, some time spent on it would be great,
creating/editing/destroying environments, setting
them as default, canceling the changes, starting
one of them, etc...
Thanks a lot.

R=matthew.scott, bac
CC=
https://codereview.appspot.com/194080043

111. By Francesco Banconi

Refactor view parameters.

Implement a Params object used to store
common view parameters. This way it will
be easier to add parameters in the future
(e.g. one callable to remove stale jenv files).

New code include the params module and a fix
to the code handling the listing of jenv files
in the index view: now the header message is
only displayed if jenv files actually exist.

The rest of the diff is mechanical: i.e. replacing
the single view arguments with the params named
tuple.

Tests: `make check`.

QA:
Use the quickstart interactive session and
check everything works ok.

R=bac, martin.hilton
CC=
https://codereview.appspot.com/194030043

110. By Francesco Banconi

Display the jenv environments in interactive mode.

The jenv environments are now displayed in the
interactive session, and it's possible to use them.

Also implemented a simple jenv detail view in uwrid.

Quickstart now also supports highlighting active
environments, i.e. those that are supposed to be
running because they have a corresponding jenv file
in the juju gome.

Tests: `make check`.

QA:
user the new juju, bootstrap one or more environments
with quickstart (use .venv/bin/python juju-quickstart --upload-tools
if you are using a non-local provider).
Start the interactive session, and check those environments are
properly marked as acrive.
Run quickstart again to check it is idempotent.
Create new users and copy the resulting jenv file to ~/.juju/environments/.
Run quickstart interactive session again, and check the
new environments are reported, and it is possible to use them.

R=rharding, j.c.sackett
CC=
https://codereview.appspot.com/188330043

109. By Francesco Banconi

Promote jenv files as first class envs.

Quickstart no longer refuses to use an environment
which is only present as a jenv file.

Add some more helper functions to the

Also retrieve the environment type, in the case
the environment is already bootstrapped, from
the WebSocket connection and not from the jenv:
jenv files are not assumed to include the type.

Tests: `make check`.

QA:
- use quickstart to bootstrap an environment:
  `.venv/bin/python juju-quickstart`;

- re-run quickstart again to reopen the same environment:
  `.venv/bin/python juju-quickstart`;

- in both cases, check auto-login works and the output
  is sane;

- generate a new environment user and put the
  resulting jenv in your Juju home:
  `juju user add myuser --generate -o ~/.juju/environments/myenv.jenv`;

- use quickstart with the new environment:
  `.venv/bin/python juju-quickstart -e myenv`;

- check that the new credentials are printed to stdout
  and that the auto-login still works;

- destroy the environment.

Thanks a lot!

R=bac, rharding
CC=
https://codereview.appspot.com/188300043

108. By Francesco Banconi

Do not output the user prefix.

QA:
run quickstart and check that the username
printed to stdout does not include the "srart-"
prefix.

R=bac, rharding
CC=
https://codereview.appspot.com/187320043

107. By Francesco Banconi

Use both credentials to connect to Juju.

Use both the user name and password when connecting
to the Juju WebSocket API.

Update the jenv models to reflect what we expect to
find in the jenv file.

QA:
- use quickstart as usual
  (.venv/bin/python juju-quickstart ...);
- the user is now printed to stdout;
- the environment and the GUI log in correctly,
  in the case the environment is bootstrapped by
  quickstart or already there.

R=jay.wren, rharding, bac
CC=
https://codereview.appspot.com/190060043

106. By Francesco Banconi

Add support for the manual provider.

Also reorder the provider fields so
that required ones come first.
The hope for this is to improve the
user experience while creating
environments.

Tests: `make check`.

QA: use quickstart as usual to set up
environments.
To test the manual provider, I've done
the following:

- I used a separate vmware virtual machine:
  let's assume its address is 192.168.1.5.
- Install the SSH server in the vm:
        `sudo apt-get install ssh`.
- Copy your ssh credential over:
        `scp -rp ~/.ssh 192.168.1.5:~`.
- Allow sudo power without password for your user on the vm, by
  editing the /etc/sudoers file and adding the following:
        $USER ALL=(ALL) NOPASSWD: ALL
  where $USER is your user name.
- Run `.venv/bin/python juju-quickstart -i`, select the option to
  create a new "Manual Provisioning" environment, select a name for it and
  use the vm address as the "bootstrap host", save the environment
  and then run it!
- wait for the environment to be ready, then run quickstart again
  with the same environment to check it recognizes it's
  already bootstrapped.
Done, thank you!

R=rharding, matthew.scott
CC=
https://codereview.appspot.com/172410043

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:juju-quickstart
This branch contains Public information 
Everyone can see this information.