lp:~frankban/juju-quickstart/views-params

Created by Francesco Banconi and last modified
Get this branch:
bzr branch lp:~frankban/juju-quickstart/views-params
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

114. By Francesco Banconi

Improve view comment.

113. By Francesco Banconi

Checkpoint.

112. By Francesco Banconi

Refactor parameters in views.

111. By Francesco Banconi

Implement the params module.

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

105. By Francesco Banconi

New bootstrap strategy.

This is a massive branch: my apologies.
But:
    - a new module has been created (netutils), so there
      are license headers and moreover some existing
      functions (with their tests) have been just moved
      from utils.py and must not be re-reviewed.
      The only new function there is check_listening.
    - most of the code are tests: we reached 700 unit
      tests yay!

This branch changes the way quickstart is run on an
existing environment: instead of always trying to
bootstrap, it looks for the jenv file for the current
environment, and, if present, it retrieves the API URL
from there. As a consequence, quickstart uses Juju
in a less expensive way, and it's also faster when
invoked on a bootstrapped environment.

Split the app.bootstrap function to two new
functions: app.bootstrap and app.status. The intent
is to make them more reusable and more easy to test.

Fix a subtle bug never reported and not easy to hit:
the environment type of an existing environment is
now retrieved from the jenv, rather than relying on
what's stored in the environments.yaml file.

Also reorganized the tests for manage.run: over
time they ended up failing to achieve their goal
of describing how the application is run, and
become not really easy to update and change.
Now this situation should be improved.

The little change to the HACKING file is to make
the rst to render correctly on sublime text.

Tests: `make check`.

QA: run quickstart as usual on local and ec2.
Run quickstart again on an already bootstrapped
environment (local and ec2). You should no longer
see the "bootstrapping environment" message.
Instead, a more correct "reusing the already
bootstrapped..." message is displayed.
Also this should feel quicker, especially on ec2.

Thank you!

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

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.