lp:~frankban/charms/precise/juju-gui/encoding-problem

Created by Francesco Banconi and last modified
Get this branch:
bzr branch lp:~frankban/charms/precise/juju-gui/encoding-problem
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
Status:
Development

Recent revisions

120. By Francesco Banconi

Changes as per review.

119. By Francesco Banconi

Bumped revision up.

118. By Francesco Banconi

Checkpoint.

117. By Gary Poster

Add support for xz compression

An xz tarball reduces the size of the gui code by 30 to 40 percent. These changes let the charm use xz tarballs. A very simple change to the gui makefile will follow.

To qa, apply this diff to the gui trunk:

=== modified file 'Makefile'
--- Makefile 2013-10-12 01:30:26 +0000
+++ Makefile 2013-10-14 13:43:10 +0000
@@ -95,7 +95,7 @@
 LAUNCHPAD_API_ROOT=staging
 endif
 RELEASE_NAME=juju-gui-$(RELEASE_VERSION)
-RELEASE_FILE=releases/$(RELEASE_NAME).tgz
+RELEASE_FILE=releases/$(RELEASE_NAME).xz
 RELEASE_SIGNATURE=releases/$(RELEASE_NAME).asc
 NPM_CACHE_VERSION=$(BZR_REVNO)
 NPM_CACHE_FILE=$(CURDIR)/releases/npm-cache-$(NPM_CACHE_VERSION).tgz

Then run ``BRANCH_IS_GOOD=1 make distfile``. Copy over the new release to the charm's releases directory. If you compare the two file sizes in the charm's releases directory, the difference should be dramatic.

$ ls -l
-rw-r--r-- 1 gary gary 5076088 Oct 14 09:44 juju-gui-0.10.1+build.1133.xz
-rw-r--r-- 1 gary gary 44840221 Oct 12 20:15 juju-gui-0.10.1.tgz

You can remove the tgz, and then run juju bootstrap and make deploy in the charm root directory. Once it is deployed, you should be able to log in and see the gui as usual, and you should be able to verify the fact that you are using your custom release if you go to /juju-ui/version.js, where you will see something like "var jujuGuiVersionInfo=['unreleased', '1133'];".

Thank you!

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

116. By Francesco Banconi

Merged charmers trunk.

115. By Francesco Banconi

Introduce local GUI releases.

Implemented the new "local" juju-gui-source option.
By default the GUI release is now retrieved from
the charm itself, so that in the deployment process
the charm can avoid connecting to Launchpad.

This should result in the charm being able to be
deployed behind a firewall without the traditional
workarounds. Note that this is not yet demonstrated
and must be QAed in a real firewalled environment.

The process tries is like the following:
- if juju-gui-source is "local", the last tarball
  in the releases dir is installed;
- if juju-gui-source is a stable or development version,
  the charm checks if that version is present in the
  local repository before downloading it from Launchpad.
- the rest of the options should still work as usual
  (but some QA could help, e.g. deploying from a branch).

Also updated the charm documentation and added some
missing tests.

Tests: `make unittest` from the branch root
(I am currently running the functional tests).

QA (assuming 0.10.1 is the latest GUI release):
- `juju bootstrap --debug`;
- `make deploy`;
- check the logs: no PPAs are used, the local release
  is installed;
- `juju set juju-gui juju-gui-source=0.10.0`;
- check the logs: the release is downloaded from
  Launchpad;
- `juju set juju-gui juju-gui-source=0.10.1`;
- check the logs: the charm successfully find
  the 0.10.1 release in the local repository and
  avoids downloading it from Launchpad.
- keep trying to break the charm in all the ways
  you can imagine...

Thank you.

R=matthew.scott, gary.poster
CC=
https://codereview.appspot.com/14545044

114. By Francesco Banconi

Avoid installing from PPA if not required.

No longer add the juju-gui PPA by default:
the external repository is added only if required,
i.e. if the legacy server is used or if a branch
is passed to juju-gui-source.

The only missing bit to make the charm work well
from behind a firewall AFAICT is avoiding the release
to be downloaded from Launchpad.

Also included the shelltoolbox file in the charm:
unfortunately the python-shelltoolbox package is
not available on precise. On the other hand, this
allows for getting rid of the bootstrap_utils.py
file, and the install hook now feels cleaner.

Refactoring + some magic removal on the backend
framework. Now it should be less surprising, and
also allows for more customizations, e.g. what
I did in the install method.

Also added missing tests for the backend framework:
those were required in order to increase our control
over what's really happening in the backend "hooks".

Switched to the builtin Tornado server by default.

This diff is very big, I am sorry, but:
- you can ignore the bootstrap_utils removal;
- you can ignore the shelltoolbox.py file: it is
  just a copy of the one present in the raring
  python-shelltoolbox package;
- a lot of code is tests, the rest of the code
  should be quite easy to follow.

QA:
    `make deploy` and watch the logs:
    - no PPA should be installed by default;
    - the deployment succeeds and the GUI works well;
    switch to builtin-server=false and watch the logs:
    - the PPA is installed (and then haproxy, apache...);
    - the config-change hook exits without errors and
      the GUI works well.

Tests:
    `make unittest`
    (I ran the functional tests myself).

Thank you!

R=gary.poster, rharding
CC=
https://codereview.appspot.com/14433049

113. By Francesco Banconi

Fix missing dependency and upgrade Tornado.

Upgrade Tornado to version 3.1.1 and add
the websocket-client dependency.

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

112. By Gary Poster

Adjust formatting

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

111. By Gary Poster

Add password option to charm

In order to support ecosystems work, add a password option that lets the charm pre-fill the password in the GUI.

To QA, start up the charm, and verify that you need to enter your password in the GUI. Do not log in, or if you do, log out afterwards. Next, juju set juju-gui password=[YOUR ADMIN SECRET] and wait about 20 seconds for the charm to reconfigure itself. Then go to the browser again and you should not have to log in.

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

Branch metadata

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