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
1=== added file 'Dependencies.md'
2--- Dependencies.md 1970-01-01 00:00:00 +0000
3+++ Dependencies.md 2013-06-04 16:21:46 +0000
4@@ -0,0 +1,46 @@
5+# Juju GUI Charm external dependencies #
6+
7+The Juju GUI has a number of external dependencies including packages that are
8+in the Ubuntu repositories and other packages that are collected together into
9+a single PPA that the Juju GUI charm developers maintain.
10+
11+The packages in our devel PPA provide a superset of all software the charm may
12+need for different deployment strategies, such as using the sandbox
13+vs. improv, or Python Juju vs. Go Juju.
14+
15+# Stable and Devel #
16+
17+The GUI developers are members of the group ~juju-gui on Launchpad
18+(http://launchpad.net/~juju-gui). We have two PPAs hosted there to support the
19+GUI, `stable` and `devel`.
20+
21+To isolate charm deployments from upstream code changes, we have collected all
22+of the external software we depend upon and stored them in the PPAs we manage.
23+
24+The `stable` PPA includes only versions of our dependencies that we have
25+tested and found to work with the charm. The `devel` version includes new
26+versions of external software that are in the process of being tested.
27+
28+# Selecting the PPA #
29+
30+In the charm configuration file (config.yaml) there is an entry
31+`repository-location` that defaults to `juju-gui/charm_stable`. You can
32+change that in your config.yaml file or do a
33+
34+`juju set juju-gui repository-location=ppa:juju-gui/charm_devel`,
35+
36+for instance, immediately after deploying the GUI charm to pull from the devel
37+version. Only Juju GUI developers doing QA for the new PPA should ever need
38+to select the devel version.
39+
40+# Deploying for the enterprise #
41+
42+Organizations deploying the charm for their enterprise may have the
43+requirement to not allow the installation of software from outside of their
44+local network. Typically those environments require all external software to
45+be downloaded to a local server and used from there. Our devel PPA provides a
46+single starting place to obtain QA'd software. Dev ops can grab the subset of
47+packages they need, audit, test, and then serve them locally. The
48+`repository-location` config variable can be used to point to the local repo.
49+
50+
51
52=== modified file 'config.yaml'
53--- config.yaml 2013-05-11 00:18:47 +0000
54+++ config.yaml 2013-06-04 16:21:46 +0000
55@@ -18,26 +18,26 @@
56 default: stable
57 juju-api-branch:
58 description: |
59- The Juju API Bazaar branch (implementing the WebSocket server).
60- Since juju-core includes the WebSocket API server out of the box, this
61- option is ignored if the charm is deployed using juju-core.
62+ The Juju API Bazaar branch (implementing the WebSocket server). Since
63+ juju-core includes the WebSocket API server out of the box, this option
64+ is ignored if the charm is deployed using juju-core.
65 type: string
66 default: lp:~hazmat/juju/rapi-rollup
67 staging:
68 description: |
69- Connect the Juju GUI to the staging backend
70- (i.e. a simulated Juju environment).
71- Currently juju-core does not support the staging backend. For this
72- reason, this option is ignored if the charm is deployed using juju-core.
73+ Connect the Juju GUI to the staging backend (i.e. a simulated Juju
74+ environment). Currently juju-core does not support the staging
75+ backend. For this reason, this option is ignored if the charm is
76+ deployed using juju-core.
77 type: boolean
78 default: false
79 staging-environment:
80 description: |
81 The environment JSON export used by the staging server. This option can
82 be used to change the topology of the simulated Juju environment.
83- Possible values are 'sample' and 'large'.
84- Currently juju-core does not support the staging backend. For this
85- reason, this option is ignored if the charm is deployed using juju-core.
86+ Possible values are 'sample' and 'large'. Currently juju-core does not
87+ support the staging backend. For this reason, this option is ignored if
88+ the charm is deployed using juju-core.
89 type: string
90 default: sample
91 juju-gui-console-enabled:
92@@ -47,8 +47,8 @@
93 default: false
94 command-log-file:
95 description: |
96- The log file where stdout and stderr should be sent for all
97- commands that are run by charm hooks.
98+ The log file where stdout and stderr should be sent for all commands
99+ that are run by charm hooks.
100 type: string
101 default: /var/log/juju/juju-gui.log
102 ssl-cert-path:
103@@ -79,43 +79,48 @@
104 description: |
105 Whether or not the GUI is in read-only mode. Note that read-only mode is
106 advisory, and enforced only in the client. If someone can access the
107- websocket and has the password, they can send commands over the websocket
108- to mutate the environment.
109+ websocket and has the password, they can send commands over the
110+ websocket to mutate the environment.
111 type: boolean
112 default: false
113 serve-tests:
114 description: |
115- Whether or not the GUI unit tests are exposed. If this option is enabled,
116- unit tests can be run in the browser by visiting the URL
117+ Whether or not the GUI unit tests are exposed. If this option is
118+ enabled, unit tests can be run in the browser by visiting the URL
119 "https://[Juju GUI address]/test/".
120 type: boolean
121 default: false
122 secure:
123 description: |
124- In order to run the GUI over a non secure connection (HTTP) set this flag
125- to false. Do not set this property unless you understand and accept the
126- risks.
127+ In order to run the GUI over a non secure connection (HTTP) set this
128+ flag to false. Do not set this property unless you understand and accept
129+ the risks.
130 type: boolean
131 default: true
132 sandbox:
133 description: |
134- Run using an in-memory sandbox rather than a real (or even improv) Juju backend.
135- Sandbox is a client side construct running entirely in the client. Sandbox doesn't
136- currently support imported environment simulation and is exclusive to the staging: true
137- configuration. If staging is true it will be used in preference to sandbox at this time.
138+ Run using an in-memory sandbox rather than a real (or even improv) Juju
139+ backend. Sandbox is a client side construct running entirely in the
140+ client. Sandbox does not currently support imported environment
141+ simulation and is exclusive to the staging: true configuration. If
142+ staging is true it will be used in preference to sandbox at this time.
143 type: boolean
144 default: false
145- allow-additional-deb-repositories:
146- description: |
147- Allow access to remote PPAs. If this is False then you must have somehow
148- configured the configured package sources to include the packages that
149- the GUI needs. This will be made more explicit soon. For now, look in
150- the source: hooks/install and hooks/backend.py in particular.
151- type: boolean
152- default: true
153 charmworld-url:
154 description: |
155- The URL of the charm catalog site ("charmworld") from which charm catalog
156- data will be drawn.
157+ The URL of the charm catalog site ("charmworld") from which charm
158+ catalog data will be drawn.
159 type: string
160 default: https://manage.jujucharms.com
161+ repository-location:
162+ description: |
163+ The charm depends on several software packages that are not packaged in
164+ Ubuntu. In order to ensure that only versions known to work with our
165+ charm are used, there is a single PPA where all packages are kept. The
166+ juju-gui-charmers team supports 'stable' and 'devel' versions. Only
167+ stable should be used for production. For enterprise deployments that
168+ do not allow access to resources outside of their control, the location
169+ can be any specification as long as it is recognizable by
170+ 'add-apt-repository'.
171+ type: string
172+ default: ppa:juju-gui-charmers/stable
173
174=== modified file 'hooks/backend.py'
175--- hooks/backend.py 2013-05-03 09:13:45 +0000
176+++ hooks/backend.py 2013-06-04 16:21:46 +0000
177@@ -31,8 +31,6 @@
178 missing = utils.find_missing_packages(*backend.debs)
179 if missing:
180 utils.cmd_log(
181- backend.install_extra_repositories(*backend.repositories))
182- utils.cmd_log(
183 shelltoolbox.apt_get_install(*backend.debs))
184
185 # If we are not using a pre-built release of the GUI (i.e., we are
186@@ -87,7 +85,6 @@
187
188
189 class GuiMixin(object):
190- repositories = ('ppa:juju-gui/ppa',)
191
192 def start(self, backend):
193 config = backend.config
194@@ -191,12 +188,6 @@
195 mixins[i] = b()
196 self.mixins = mixins
197
198- def install_extra_repositories(self, *packages):
199- if self.config.get('allow-additional-deb-repositories', True):
200- utils.install_extra_repositories(*packages)
201- else:
202- apt_get('update')
203-
204 def different(self, *keys):
205 """Return a boolean indicating if the current config
206 value differs from the config value passed in prev_config
207
208=== modified file 'hooks/install'
209--- hooks/install 2013-04-28 09:57:41 +0000
210+++ hooks/install 2013-06-04 16:21:46 +0000
211@@ -18,9 +18,9 @@
212 return json.loads(output)
213
214 config = get_config()
215-allow_repos = config.get('allow-additional-deb-repositories', True)
216-if allow_repos:
217- bootstrap_utils.install_extra_repositories('ppa:juju/pkgs')
218+repo = config.get('repository-location')
219+if repo:
220+ bootstrap_utils.install_extra_repositories(repo)
221
222 # Python dependencies must be installed here so that the charm can import and
223 # use required libraries.
224
225=== modified file 'hooks/utils.py'
226--- hooks/utils.py 2013-05-31 12:54:15 +0000
227+++ hooks/utils.py 2013-06-04 16:21:46 +0000
228@@ -59,7 +59,6 @@
229 apt_get_install,
230 command,
231 environ,
232- install_extra_repositories,
233 run,
234 script_name,
235 search_file,
236@@ -88,7 +87,6 @@
237 JUJU_GUI_SITE = '/etc/apache2/sites-available/juju-gui'
238 JUJU_GUI_PORTS = '/etc/apache2/ports.conf'
239 JUJU_PEM = 'juju.includes-private-key.pem'
240-BUILD_REPOSITORIES = ('ppa:chris-lea/node.js-legacy',)
241 DEB_BUILD_DEPENDENCIES = (
242 'bzr', 'imagemagick', 'make', 'nodejs', 'npm',
243 )
244@@ -111,7 +109,6 @@
245 def _get_build_dependencies():
246 """Install deb dependencies for building."""
247 log('Installing build dependencies.')
248- cmd_log(install_extra_repositories(*BUILD_REPOSITORIES))
249 cmd_log(apt_get_install(*DEB_BUILD_DEPENDENCIES))
250
251

Subscribers

People subscribed via source and target branches