Merge lp:~bac/charms/precise/juju-gui/released-changes into lp:~juju-gui/charms/precise/juju-gui/trunk

Proposed by Brad Crittenden
Status: Merged
Merged at revision: 62
Proposed branch: lp:~bac/charms/precise/juju-gui/released-changes
Merge into: lp:~juju-gui/charms/precise/juju-gui/trunk
Diff against target: 249 lines (+87/-48)
5 files modified
Dependencies.md (+46/-0)
config.yaml (+38/-33)
hooks/backend.py (+0/-9)
hooks/install (+3/-3)
hooks/utils.py (+0/-3)
To merge this branch: bzr merge lp:~bac/charms/precise/juju-gui/released-changes
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+167333@code.launchpad.net

Description of the change

Fix the discrepancy between dev and rel branches.

Changes that should've been submitted to the development branch of the gui
(lp:~juju-gui/charms/precise/juju-gui/trunk) were instead merged into the
release branch (lp:charms/juju-gui).

This branch merges those changes back into devel for on-going work. The
premature release will remain in place.

https://codereview.appspot.com/9975046/

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Please take a look.

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

Reviewers: mp+167333_code.launchpad.net,

Message:
Please take a look.

Description:
Fix the discrepancy between dev and rel branches.

Changes that should've been submitted to the development branch of the
gui
(lp:~juju-gui/charms/precise/juju-gui/trunk) were instead merged into
the
release branch (lp:charms/juju-gui).

This branch merges those changes back into devel for on-going work. The
premature release will remain in place.

https://code.launchpad.net/~bac/charms/precise/juju-gui/released-changes/+merge/167333

(do not edit description out of merge proposal)

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

Affected files:
   A Dependencies.md
   A [revision details]
   M config.yaml
   M hooks/backend.py
   M hooks/install
   M hooks/utils.py

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

*** Submitted:

Fix the discrepancy between dev and rel branches.

Changes that should've been submitted to the development branch of the
gui
(lp:~juju-gui/charms/precise/juju-gui/trunk) were instead merged into
the
release branch (lp:charms/juju-gui).

This branch merges those changes back into devel for on-going work. The
premature release will remain in place.

R=teknico
CC=
https://codereview.appspot.com/9975046

https://codereview.appspot.com/9975046/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'Dependencies.md'
--- Dependencies.md 1970-01-01 00:00:00 +0000
+++ Dependencies.md 2013-06-04 16:21:46 +0000
@@ -0,0 +1,46 @@
1# Juju GUI Charm external dependencies #
2
3The Juju GUI has a number of external dependencies including packages that are
4in the Ubuntu repositories and other packages that are collected together into
5a single PPA that the Juju GUI charm developers maintain.
6
7The packages in our devel PPA provide a superset of all software the charm may
8need for different deployment strategies, such as using the sandbox
9vs. improv, or Python Juju vs. Go Juju.
10
11# Stable and Devel #
12
13The GUI developers are members of the group ~juju-gui on Launchpad
14(http://launchpad.net/~juju-gui). We have two PPAs hosted there to support the
15GUI, `stable` and `devel`.
16
17To isolate charm deployments from upstream code changes, we have collected all
18of the external software we depend upon and stored them in the PPAs we manage.
19
20The `stable` PPA includes only versions of our dependencies that we have
21tested and found to work with the charm. The `devel` version includes new
22versions of external software that are in the process of being tested.
23
24# Selecting the PPA #
25
26In the charm configuration file (config.yaml) there is an entry
27`repository-location` that defaults to `juju-gui/charm_stable`. You can
28change that in your config.yaml file or do a
29
30`juju set juju-gui repository-location=ppa:juju-gui/charm_devel`,
31
32for instance, immediately after deploying the GUI charm to pull from the devel
33version. Only Juju GUI developers doing QA for the new PPA should ever need
34to select the devel version.
35
36# Deploying for the enterprise #
37
38Organizations deploying the charm for their enterprise may have the
39requirement to not allow the installation of software from outside of their
40local network. Typically those environments require all external software to
41be downloaded to a local server and used from there. Our devel PPA provides a
42single starting place to obtain QA'd software. Dev ops can grab the subset of
43packages they need, audit, test, and then serve them locally. The
44`repository-location` config variable can be used to point to the local repo.
45
46
047
=== modified file 'config.yaml'
--- config.yaml 2013-05-11 00:18:47 +0000
+++ config.yaml 2013-06-04 16:21:46 +0000
@@ -18,26 +18,26 @@
18 default: stable18 default: stable
19 juju-api-branch:19 juju-api-branch:
20 description: |20 description: |
21 The Juju API Bazaar branch (implementing the WebSocket server).21 The Juju API Bazaar branch (implementing the WebSocket server). Since
22 Since juju-core includes the WebSocket API server out of the box, this22 juju-core includes the WebSocket API server out of the box, this option
23 option is ignored if the charm is deployed using juju-core.23 is ignored if the charm is deployed using juju-core.
24 type: string24 type: string
25 default: lp:~hazmat/juju/rapi-rollup25 default: lp:~hazmat/juju/rapi-rollup
26 staging:26 staging:
27 description: |27 description: |
28 Connect the Juju GUI to the staging backend28 Connect the Juju GUI to the staging backend (i.e. a simulated Juju
29 (i.e. a simulated Juju environment).29 environment). Currently juju-core does not support the staging
30 Currently juju-core does not support the staging backend. For this30 backend. For this reason, this option is ignored if the charm is
31 reason, this option is ignored if the charm is deployed using juju-core.31 deployed using juju-core.
32 type: boolean32 type: boolean
33 default: false33 default: false
34 staging-environment:34 staging-environment:
35 description: |35 description: |
36 The environment JSON export used by the staging server. This option can36 The environment JSON export used by the staging server. This option can
37 be used to change the topology of the simulated Juju environment.37 be used to change the topology of the simulated Juju environment.
38 Possible values are 'sample' and 'large'.38 Possible values are 'sample' and 'large'. Currently juju-core does not
39 Currently juju-core does not support the staging backend. For this39 support the staging backend. For this reason, this option is ignored if
40 reason, this option is ignored if the charm is deployed using juju-core.40 the charm is deployed using juju-core.
41 type: string41 type: string
42 default: sample42 default: sample
43 juju-gui-console-enabled:43 juju-gui-console-enabled:
@@ -47,8 +47,8 @@
47 default: false47 default: false
48 command-log-file:48 command-log-file:
49 description: |49 description: |
50 The log file where stdout and stderr should be sent for all50 The log file where stdout and stderr should be sent for all commands
51 commands that are run by charm hooks.51 that are run by charm hooks.
52 type: string52 type: string
53 default: /var/log/juju/juju-gui.log53 default: /var/log/juju/juju-gui.log
54 ssl-cert-path:54 ssl-cert-path:
@@ -79,43 +79,48 @@
79 description: |79 description: |
80 Whether or not the GUI is in read-only mode. Note that read-only mode is80 Whether or not the GUI is in read-only mode. Note that read-only mode is
81 advisory, and enforced only in the client. If someone can access the81 advisory, and enforced only in the client. If someone can access the
82 websocket and has the password, they can send commands over the websocket82 websocket and has the password, they can send commands over the
83 to mutate the environment.83 websocket to mutate the environment.
84 type: boolean84 type: boolean
85 default: false85 default: false
86 serve-tests:86 serve-tests:
87 description: |87 description: |
88 Whether or not the GUI unit tests are exposed. If this option is enabled,88 Whether or not the GUI unit tests are exposed. If this option is
89 unit tests can be run in the browser by visiting the URL89 enabled, unit tests can be run in the browser by visiting the URL
90 "https://[Juju GUI address]/test/".90 "https://[Juju GUI address]/test/".
91 type: boolean91 type: boolean
92 default: false92 default: false
93 secure:93 secure:
94 description: |94 description: |
95 In order to run the GUI over a non secure connection (HTTP) set this flag95 In order to run the GUI over a non secure connection (HTTP) set this
96 to false. Do not set this property unless you understand and accept the96 flag to false. Do not set this property unless you understand and accept
97 risks.97 the risks.
98 type: boolean98 type: boolean
99 default: true99 default: true
100 sandbox:100 sandbox:
101 description: |101 description: |
102 Run using an in-memory sandbox rather than a real (or even improv) Juju backend.102 Run using an in-memory sandbox rather than a real (or even improv) Juju
103 Sandbox is a client side construct running entirely in the client. Sandbox doesn't103 backend. Sandbox is a client side construct running entirely in the
104 currently support imported environment simulation and is exclusive to the staging: true104 client. Sandbox does not currently support imported environment
105 configuration. If staging is true it will be used in preference to sandbox at this time.105 simulation and is exclusive to the staging: true configuration. If
106 staging is true it will be used in preference to sandbox at this time.
106 type: boolean107 type: boolean
107 default: false108 default: false
108 allow-additional-deb-repositories:
109 description: |
110 Allow access to remote PPAs. If this is False then you must have somehow
111 configured the configured package sources to include the packages that
112 the GUI needs. This will be made more explicit soon. For now, look in
113 the source: hooks/install and hooks/backend.py in particular.
114 type: boolean
115 default: true
116 charmworld-url:109 charmworld-url:
117 description: |110 description: |
118 The URL of the charm catalog site ("charmworld") from which charm catalog111 The URL of the charm catalog site ("charmworld") from which charm
119 data will be drawn.112 catalog data will be drawn.
120 type: string113 type: string
121 default: https://manage.jujucharms.com114 default: https://manage.jujucharms.com
115 repository-location:
116 description: |
117 The charm depends on several software packages that are not packaged in
118 Ubuntu. In order to ensure that only versions known to work with our
119 charm are used, there is a single PPA where all packages are kept. The
120 juju-gui-charmers team supports 'stable' and 'devel' versions. Only
121 stable should be used for production. For enterprise deployments that
122 do not allow access to resources outside of their control, the location
123 can be any specification as long as it is recognizable by
124 'add-apt-repository'.
125 type: string
126 default: ppa:juju-gui-charmers/stable
122127
=== modified file 'hooks/backend.py'
--- hooks/backend.py 2013-05-03 09:13:45 +0000
+++ hooks/backend.py 2013-06-04 16:21:46 +0000
@@ -31,8 +31,6 @@
31 missing = utils.find_missing_packages(*backend.debs)31 missing = utils.find_missing_packages(*backend.debs)
32 if missing:32 if missing:
33 utils.cmd_log(33 utils.cmd_log(
34 backend.install_extra_repositories(*backend.repositories))
35 utils.cmd_log(
36 shelltoolbox.apt_get_install(*backend.debs))34 shelltoolbox.apt_get_install(*backend.debs))
3735
38 # If we are not using a pre-built release of the GUI (i.e., we are36 # If we are not using a pre-built release of the GUI (i.e., we are
@@ -87,7 +85,6 @@
8785
8886
89class GuiMixin(object):87class GuiMixin(object):
90 repositories = ('ppa:juju-gui/ppa',)
9188
92 def start(self, backend):89 def start(self, backend):
93 config = backend.config90 config = backend.config
@@ -191,12 +188,6 @@
191 mixins[i] = b()188 mixins[i] = b()
192 self.mixins = mixins189 self.mixins = mixins
193190
194 def install_extra_repositories(self, *packages):
195 if self.config.get('allow-additional-deb-repositories', True):
196 utils.install_extra_repositories(*packages)
197 else:
198 apt_get('update')
199
200 def different(self, *keys):191 def different(self, *keys):
201 """Return a boolean indicating if the current config192 """Return a boolean indicating if the current config
202 value differs from the config value passed in prev_config193 value differs from the config value passed in prev_config
203194
=== modified file 'hooks/install'
--- hooks/install 2013-04-28 09:57:41 +0000
+++ hooks/install 2013-06-04 16:21:46 +0000
@@ -18,9 +18,9 @@
18 return json.loads(output)18 return json.loads(output)
1919
20config = get_config()20config = get_config()
21allow_repos = config.get('allow-additional-deb-repositories', True)21repo = config.get('repository-location')
22if allow_repos:22if repo:
23 bootstrap_utils.install_extra_repositories('ppa:juju/pkgs')23 bootstrap_utils.install_extra_repositories(repo)
2424
25# Python dependencies must be installed here so that the charm can import and25# Python dependencies must be installed here so that the charm can import and
26# use required libraries.26# use required libraries.
2727
=== modified file 'hooks/utils.py'
--- hooks/utils.py 2013-05-31 12:54:15 +0000
+++ hooks/utils.py 2013-06-04 16:21:46 +0000
@@ -59,7 +59,6 @@
59 apt_get_install,59 apt_get_install,
60 command,60 command,
61 environ,61 environ,
62 install_extra_repositories,
63 run,62 run,
64 script_name,63 script_name,
65 search_file,64 search_file,
@@ -88,7 +87,6 @@
88JUJU_GUI_SITE = '/etc/apache2/sites-available/juju-gui'87JUJU_GUI_SITE = '/etc/apache2/sites-available/juju-gui'
89JUJU_GUI_PORTS = '/etc/apache2/ports.conf'88JUJU_GUI_PORTS = '/etc/apache2/ports.conf'
90JUJU_PEM = 'juju.includes-private-key.pem'89JUJU_PEM = 'juju.includes-private-key.pem'
91BUILD_REPOSITORIES = ('ppa:chris-lea/node.js-legacy',)
92DEB_BUILD_DEPENDENCIES = (90DEB_BUILD_DEPENDENCIES = (
93 'bzr', 'imagemagick', 'make', 'nodejs', 'npm',91 'bzr', 'imagemagick', 'make', 'nodejs', 'npm',
94)92)
@@ -111,7 +109,6 @@
111def _get_build_dependencies():109def _get_build_dependencies():
112 """Install deb dependencies for building."""110 """Install deb dependencies for building."""
113 log('Installing build dependencies.')111 log('Installing build dependencies.')
114 cmd_log(install_extra_repositories(*BUILD_REPOSITORIES))
115 cmd_log(apt_get_install(*DEB_BUILD_DEPENDENCIES))112 cmd_log(apt_get_install(*DEB_BUILD_DEPENDENCIES))
116113
117114

Subscribers

People subscribed via source and target branches