| commit | 6de6ff1f5885ce32e6a7d30be1d80c82a41e4721 | [log] [tgz] |
|---|---|---|
| author | Adam Israel <adam.israel@canonical.com> | Tue Sep 27 16:17:01 2016 -0400 |
| committer | Adam Israel <adam.israel@canonical.com> | Tue Sep 27 17:39:42 2016 -0400 |
| tree | 6d2017d11f7a98995c98f33a4d7f7b5da34ab21d | |
| parent | 370aa5bd83ce4622f0d8f6e91ff60e11b0190aa4 [diff] |
Compiled charm published to cs:~nfv/vpe-router-1 Change-Id: I79a7f51de91ce7aaf17922afd966e436d7784da3 Signed-off-by: Adam Israel <adam.israel@canonical.com>
This document is intended to provide a brief overview of the components included in this repository as well as recommendations for how to develop, build, and publish charms.
Please read the develper geting started guide before proceeding.
. ├── builds │ └── vpe-router ├── interfaces ├── layers │ └── vpe-router └── module-blueprints
The source code of a charm is referred to as a "layer". This layer is compiled into a charm and placed in the builds/ directory. Interfaces, currently unused in this context, extend relationships between applications.
# Source the environment variables JUJU_REPOSITORY, INTERFACE_PATH, and # LAYER_PATH, which are needed to build a charm. You could also place these # in your $HOME/.bashrc $ source juju-env.sh
charm command, either via apt:$ sudo apt install charm
or with snap
$ snap install charm --edge
To build a charm, simply run charm build inside of a layer.
$ cd $LAYER_PATH/vpe-router $ charm build $ charm deploy $JUJU_REPOSITORY/builds/vpe-router
Publishing to the Juju Charm store requires a launchpad login. With that, login to jujucharms.com.
Next, you'll use the charm command to publish your compiled charm. This will put the charm into the store where it can be used by anyone with access.
For example, if I wanted to publish the latest version of the vpe-router charm:
$ cd $JUJU_REPOSITORY/builds $ charm push vpe-router/ cs:~aisrael/vpe-router url: cs:~aisrael/vpe-router-0 channel: unpublished
$ charm release cs:~aisrael/vpe-router-0 --channel=edge url: cs:~aisrael/vpe-router-0 channel: edge
The charm can then be deployed directly from the charm store:
$ juju deploy cs:~aisrael/vpe-router --channel=edge