OLD | NEW |
1 <!-- | 1 <!-- |
2 HACKING.md | 2 HACKING.md |
3 Copyright 2013 Canonical Ltd. | 3 Copyright 2013 Canonical Ltd. |
4 This work is licensed under the Creative Commons Attribution-Share Alike 3.0 | 4 This work is licensed under the Creative Commons Attribution-Share Alike 3.0 |
5 Unported License. To view a copy of this license, visit | 5 Unported License. To view a copy of this license, visit |
6 http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative | 6 http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative |
7 Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | 7 Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. |
8 --> | 8 --> |
9 | 9 |
10 # Juju GUI Charm Development # | 10 # Juju GUI Charm Development # |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 repeatedly for development; or develop the charm within a parent directory | 199 repeatedly for development; or develop the charm within a parent directory |
200 in which you have run `bzr init-repo`, so that the different branches can use | 200 in which you have run `bzr init-repo`, so that the different branches can use |
201 the local cache; or both. | 201 the local cache; or both. |
202 | 202 |
203 To upgrade test dependencies, add them to the `test-requirements.pip` file and | 203 To upgrade test dependencies, add them to the `test-requirements.pip` file and |
204 add the tarballs to the download-cache branch. You may need to temporarily | 204 add the tarballs to the download-cache branch. You may need to temporarily |
205 disable the `--no-allow-external` and `--no-index` flags in 00-setup to get | 205 disable the `--no-allow-external` and `--no-index` flags in 00-setup to get |
206 new transitive dependencies. Once you do, run `pip freeze` to add the | 206 new transitive dependencies. Once you do, run `pip freeze` to add the |
207 transitive dependencies to the `test-requirements.pip` file, and make sure to | 207 transitive dependencies to the `test-requirements.pip` file, and make sure to |
208 add those tarballs to the download cache as well. | 208 add those tarballs to the download cache as well. |
| 209 |
| 210 ## Builtin server bundle support ## |
| 211 |
| 212 The builtin server starts/schedules bundle deployment processes when it |
| 213 receives Deployer Import API requests. The user can then observe the deployment |
| 214 progress using the GUI. The builtin server also exposes the possibility to |
| 215 watch a bundle deployment progress: see `server/guiserver/bundles/__init__.py` |
| 216 for a detailed description of the API request/response process. |
| 217 |
| 218 Under the hood, the builtin server leverages the juju-deployer library in order |
| 219 to import a bundle. Since juju-deployer is not asynchronous, the actual |
| 220 deployment is executed in a separate process. |
| 221 |
| 222 ### Debugging bundle support ### |
| 223 |
| 224 Sometimes, when an error occurs during bundle deployments, it is not obvious |
| 225 where to retrieve information about what is going on. |
| 226 The GUI builtin server exposes some bundle information in two places: |
| 227 |
| 228 - https://<juju-gui-url>/gui-server-info displays in JSON format the current |
| 229 status of all scheduled/started/completed bundle deployments; |
| 230 - /var/log/upstart/guiserver.log is the builtin server log file, which includes |
| 231 logs output from the juju-deployer library. |
| 232 |
| 233 Moreover, setting `builtin-server-logging=debug` gives more debugging |
| 234 information, e.g. it prints to the log the contents of the WebSocket messages |
| 235 sent by the client (usually the Juju GUI) and by the Juju API server. |
| 236 As mentioned, juju-deployer works on its own sandbox and uses its own API |
| 237 connections, and for this reason the WebSocket traffic it generates is not |
| 238 logged. |
| 239 |
| 240 Sometimes, while debugging, it is convenient to restart the builtin server |
| 241 (which also empties the bundle deployments queue). To do that, run the |
| 242 following in the Juju GUI machine: |
| 243 |
| 244 service guiserver restart |
OLD | NEW |