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