lp:~frankban/juju-quickstart/osx-tests

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

69. By Francesco Banconi

Fix call test.

68. By Brad Crittenden

Add a function for determing OS flavor.

Determines OS and then for the case of Linuxes, determines whether the
system uses apt-get or RPM.

R=frankban
CC=
https://codereview.appspot.com/99410054

67. By Francesco Banconi

Check unicode support.

Ensure utf-8 is supported before starting
the Urwid interactive session.
This way we hope to avoid bad crashes
when the user has locale configuration problems.

Tests: `make check`.

QA:
If you have juju-quickstart installed, you should
be able to make it crash by overriding all the language
env vars, like the following:
`LC_ALL=C juju-quickstart -i`
You should see a UnicodeEncodeError:
'ascii' codec can't encode character u'\u2582' in position 0:
ordinal not in range(128)

With this branch, the following should instead work as usual:
`LC_ALL=C .venv/bin/python juju-quickstart -i`.

I am not sure how to make Urwid fail so that we can QA
the system exit in the code, but at least that code path
is tested.

R=rharding
CC=
https://codereview.appspot.com/90740043

66. By Francesco Banconi

Support trusty environments.

Add the ability to deploy the trusty charm.
Introduced the concept of multiple supported
series for the Juju GUI charm.

Split the app.deploy_gui function in two
separate function:
- check_environment inspects the environment
  and returns the data required to deploy the GUI;
- deploy_gui's only responsibility is to
  return when the GUI service is deployed/exposed
  and the unit created.

Include the default-series field in the auto-generated
local environment. This is the environment that
quickstart offers to automatically create when no other
environments are found.

Also propose "trusty" as the default series when manually
creating new environments.

Bump version up: while this branch
incidentally fixes bug 1306537 [1],
the ability to deploy the GUI on trusty
can be considered a new feature.

My apologies for the long diff.

Tests: `make check`.

QA:
Use quickstart like the following:
  `.venv/bin/python juju-quickstart [-i]`.

You should be able to deploy the trusty GUI charm.

If you are on trusty, the trusty charm should be deployed
when the default-series field is missing.
This must be tested also using the local provider, in which case
Juju is currently not able to deploy precise charms when the
bootstrap node is trusty (bug 1306537).

In general quickstart should deploy the charm series corresponding
to the bootstrap node series: so on trusty environments the trusty
charm should be installed, on precise environments the precise one.

This way, at least when the bootstrap node series is precise or trusty,
quickstart is able to add the GUI unit to machine 0. You can test it
using, e.g. an ec2 environment.

This is true also when providing a custom charm URL, e.g.:
  `.venv/bin/python juju-quickstart --gui-charm-url cs:~juju-gui/trusty/juju-gui-1`

In all the other cases, quickstart uses the trusty charm. You can test this
by using quickstart with an ec2 environment having "default-series: saucy":
a trusty GUI should be deployed on machine 1.

Two final checks:
- try to create a new environment with quickstart: the default-series
  field should be pre-filled with "trusty";
- move temporarily your environments.yaml somewhere else, and let quickstart
  auto-generate a local environment for you: the deployment process should
  succeed and the environment should include the "trusty" default series.

Thanks a lot for all of this, and sorry for the long QA: this is going to
be released in trusty, so your efforts are really appreciated!

[1] https://bugs.launchpad.net/juju-core/+bug/1306537

R=
CC=
https://codereview.appspot.com/90570044

65. By Brad Crittenden

Make control-bucket optional.

The existing function get_admin_secret is made generic and the name is changed
to get_value_from_jenv. It now takes a keyname to be fetched from the
generated file.

For both ec2 and openstack the control-bucket field has been made optional
with respect to the environments.yaml file.

QA:

1) Create an ec2 environment with no control-bucket.
2) Bootstrap that environment. Ensure a control-bucket is in the .jenv file.
3) Run quickstart and see that it uses the existing environment and does not
raise an error.

R=frankban
CC=
https://codereview.appspot.com/90060043

64. By Francesco Banconi

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

63. By Francesco Banconi

Support the --ppa flag for distro packaging.

Add a packaging module suitable for being
easily modified when packaging quickstart for
distro repositories.

The new --ppa flag can be used to switch to ppa
when quickstart is installed from the default
repositories.

Tests: `make check`.

QA: there is no easy way to QA this.
It would require removing juju packages,
running quickstart with and without
the --distro-only and --ppa flags,
switching packaging.py to "distro"
and trying again.
I'll do that anyway as part of the next
release QA, so feel free to avoid QAing now.

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

62. By Francesco Banconi

Support MachineInfo addresses.

juju-core 1.18 introduces a change in the mega-watcher:
the MachineInfo includes the public/private addresses
for each machine/container in the environment.
This will be the preferred way to retrieve entity
addresses in future versions of juju-core, which
might also discard the public address field in
the UnitInfo.

This branch updates quickstart so that it can work
in both scenarios: for backward compatibility, the address
is retrieved trying to parse both the unit and the machine
info, without assuming the corresponding fields to be
always included.

This required some testing and documentation efforts,
resulting in a diff longer than usual: sorry about that.

Tests: `make check`.

QA:
Use juju 1.16 (current stable).
In the steps below the command to run is:
`.venv/bin/python juju-quickstart -e {ENV_NAME}`.

1) Bootstrap a local environment with quickstart, ensure
   the quickstart process completes correctly, the juju-gui
   address is retrieved, the GUI is opened. Also ensure
   the user messages showed on stdout make sense.
2) Execute quickstart again, with the local environment already
   bootstrapped. Ensure the process completes correctly,
   and user messages are sane.
3) Destroy the local environment.
4) Bootstrap an ec2 environment with quickstart, ensure
   the quickstart process completes correctly, the juju-gui
   address is retrieved, the GUI is opened. Also ensure
   the user messages showed on stdout make sense.
5) Execute quickstart again, with the ec2 environment already
   bootstrapped. Ensure the process completes correctly,
   and user messages are sane.
6) Destroy the ec2 environment.

Use juju 1.18. This must be compiled from the juju-core 1.18 branch,
which can be found in `lp:juju-core/1.18`.

7) Edit the quickstart/settings.py file included in this branch:
   set `JUJU_CMD` to point to the juju 1.18 path.
8) Follow steps 1) to 6) again, in order to check that
   quickstart works well also with Juju 1.18.

Done, thank you!

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

61. By Francesco Banconi

Add the distro-only flag.

This can be used (e.g. in trusty) to
prevent quickstart from installing
the Juju stable PPA.

Tests: `make check`.

No QA required, I already tested this on
a trusty VM.

R=rharding
CC=
https://codereview.appspot.com/81400043

60. By Brad Crittenden

Update README with support notes.

Included discussion of supported Ubuntu releases and installation
instructions.

R=frankban
CC=
https://codereview.appspot.com/78830044

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.