8
Juju GUI uses nodejs based development tools.
10
You'll need nodejs & npm from the ppa::
12
$ sudo add-apt-repository ppa:chris-lea/node.js
14
$ sudo apt-get install nodejs npm
16
You also need ImageMagick::
18
$ sudo apt-get install imagemagick
20
The linter will be installed locally per branch, but if you want editor
21
integration, you may want to install jshint globally in your system::
23
$ sudo npm install -g jshint
25
For building the docs, you also need sphinx::
27
$ sudo apt-get install python-sphinx
29
To make releases, you'll need pytz::
31
$ sudo apt-get install python-tz
33
The gui frontend can be installed with::
35
$ bzr branch lp:juju-ui trunk
39
It may take a while for the server to start the first time as npm will
40
need to download packages. When ready, the server will print:
42
Server listening on 8888
44
You can then access the GUI at http://localhost:8888
46
You'll also need to deploy a juju environment with REST api access.
47
Currently that work resides in a pipeline of juju branches. The
48
recommended branch to use as a server is ``lp:~hazmat/juju/rapi-delta``.
50
You can use it with any environment, but for dev purposes, a local
51
environment works well. One environment option specific to this branch
52
is the api-port. An appropriate sample configuration::
58
data-dir: /home/kapil/.juju/local
59
admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4
60
default-series: precise
64
Note that juju-origin is set to the ppa, the api server runs outside of
65
the container, and is launched using whichever branch you're using.
67
Also note that the api-port should be set at 8081, which the gui's
68
initial environment connection currently defaults to.
70
You'll need to bootstrap the local environment, and deploy one service.
71
The api server needs access to the provisioning credentials which are
72
lazily initialized in juju upon usage.
74
Juju-gui and rapi-delta can communicate via an encrypted WebSockets
75
connection: to enable it, add the following line to the config above::
79
You will also need to edit your ``app/config.js`` replacing
80
``ws://localhost:8081/ws`` with ``wss://localhost:8081/ws``.
82
By default, rapi-delta uses a self-signed certificate; because of that you
83
will need to visit the https://localhost:8081/ws WebSockets URL with your
84
browser and accept the included self-signed certificate, or the WebSockets
85
encrypted connection will not work.
87
In order to use a different certificate, you add an api-keys option to the
88
config above: its value will be the path of the directory containing the
89
certificate and the private key, whose filenames will have to be respectively
90
``juju.crt`` and ``juju.key``.
92
After which, the gui should be functional (it automatically polls the
93
api server for establishing a websocket).
98
$ xdg-open test/index.html
103
Generated JavaScript documentation is available in the yuidoc directory.
104
Start with the index.html file. You can view the docs by running::
106
$ xdg-open yuidoc/index.html
108
To regenerate the docs run::
112
The documentation for YUIDoc markup is at
113
http://yui.github.com/yuidoc/syntax/ .
118
$ jshint --config=jshint.config `bzr ls -RV -k file | grep -v assets/`
123
To make a release, you must either be in a checkout of lp:juju-gui
124
without uncommitted changes, or you must override one of the
125
`pertinent variable names`_ to force a release.
127
.. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_
129
You also need to have a gpg key, and the python-pytz package installed (as
130
well as launchpadlib, but that is installed by default in Ubuntu).
132
See the Process document (docs/process.rst) for step-by-step checklists to
133
make developer and stable releases.
135
Potentially Useful Release-Oriented Makefile Variables
136
------------------------------------------------------
138
The following is a list of pertinent Makefile variables.
141
Set FINAL to any non-empty value to make a final release. This will cause
142
the bzr revno to be omitted from the tarball name, and (if you use the
143
release target) will cause the release to be uploaded to the stable series
144
rather than the trunk series. Example usage::
146
$ FINAL=1 make release
149
By default, releases will be uploaded to staging.launchpad.net, which is a
150
separate version of Launchpad that uses a temporary database. This can be
151
convenient for trying out the release process in the Makefile without
152
affecting our actual production releases. Set PROD to any non-empty value
153
to send uploads to launchpad.net, the production version of Launchpad, when
154
you are ready to make a real release.
156
Note that you may need to ask the webops to turn off the two-factor
157
authentication on your Launchpad staging account in order for the staging to
158
work. Go to the #launchpad-ops channel on the Canonical IRC server and ask
159
something like "webops, could you disable 2FA on my staging account?"
163
$ PROD=1 make release
166
Set this to any non-empty value to force the Makefile to believe it is
167
working with a trunk checkout. Example usage::
169
$ IS_TRUNK_CHECKOUT=1 make release
172
Set this to any non-empty value to force the Makefile to believe that the
173
current code tree has no changes. Example usage::
175
$ HAS_NO_CHANGES=1 make release
178
Set this to any non-empty value to force the Makefile to bypass checks of
179
IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage::
181
$ IS_SAFE_RELEASE=1 make release
188
$ sudo apt-get install python-sphinx
197
$ xdg-open _build/html/index.html
5
Welcome. Juju-GUI is a web-based GUI for `Juju <https://juju.ubuntu.com/>`_.
6
Juju lets you deploy connected services to the cloud in a convenient,
7
vendor-neutral, and powerful way. The GUI lets you visualize and manage
8
your work more intuitively from a web browser.
12
- `The new Juju GUI: because a picture paints a thousand words
13
<http://blog.canonical.com/2012/10/29/the-new-juju-gui-because-a-picture-paints-a-thousand-words/>`_
14
- a `demo of trunk <http://uistage.jujucharms.com:8080/>`_, which is reset
20
There are no official releases of Juju-GUI yet, so you have to get the source
23
$ bzr branch lp:juju-gui
25
The most useful available commands are shown by the command::
29
You'll typically want to run one of ``make prod``, ``make debug`` or ``make
30
devel`` to deploy an environment. You might also run ``make test`` to check
31
that everything is ok. You may also run ``make doc`` to generate the available