Pip standerdization and tox replacement
[osm/RO.git] / charms / README.md
1 # Juju Charm(s) for deploying OpenMano
2
3 ## Overview
4 These are the charm layers used to build Juju charms for deploying OpenVIM components. These charms are also published to the [Juju Charm Store](https://jujucharms.com/) and can be deployed directly from there using the [etsi-osm](https://jujucharms.com/u/nfv/osm-r1), or they can be build from these layers and deployed locally.
5
6 ## Building the OpenVIM Charms
7
8 To build these charms, you will need [charm-tools][]. You should also read
9 over the developer [Getting Started][] page for an overview of charms and
10 building them. Then, in any of the charm layer directories, use `charm build`.
11 For example:
12
13     (setup environment to build from layers)
14     mkdir src
15     cd src
16     git clone https://github.com/nfvlabs/openvim.git
17     export JUJU_REPOSITORY=$HOME/src/openvim/charms
18     export INTERFACE_PATH=$JUJU_REPOSITORY/interfaces
19     export LAYER_PATH=$JUJU_REPOSITORY/layers
20
21     cd $LAYER_PATH/openvim
22     charm build
23
24     cd $LAYER_PATH/openvim-compute
25     charm build
26
27 This will build the OpenVIM controller and OpenVIM compute charms, pulling in
28  the appropriate base and interface layers from [interfaces.juju.solutions][], and place the resulting charms into $JUJU_REPOSITORY/builds.
29
30 You can also use the local version of a bundle:
31
32     juju deploy openvim/charms/bundles/openmano.yaml
33
34 To publish:
35
36     # You will need an account on Launchpad, and have it added to the ~nfv
37     # namespace. Please contact foo@bar for these permissions.
38     $ charm login
39
40     $ cd $JUJU_REPOSITORY/builds/openvim
41
42     # `charm push` will upload the charm into the store and report the revision
43     # of the latest push.
44     $ charm push . cs:~nfv/openvim
45     blah blah cs:~nfv/openvim-4
46
47     # Release the charm so that it is publicly consumable
48     $ charm release cs:~nfv/openvim-4
49
50     $ cd $JUJU_REPOSITORY/builds/openvim-compute
51
52     # `charm push` will upload the charm into the store and report the revision
53     # of the latest push.
54     $ charm push . cs:~nfv/openvim-compute
55     blah blah cs:~nfv/openvim-compute-4
56
57     # Release the charm so that it is publicly consumable
58     $ charm release cs:~nfv/openvim-compute-4
59
60     # Finally, update and publish the bundle to point to the latest revision(s):
61
62     cd $JUJU_REPOSITORY/bundles/openmano
63
64     # Edit the `README.md` to reflect any notable changes.
65
66     # Edit the `bundle.yaml` with the new revision to be deployed, i.e., change cs:~nfv/openvim-3 to cs:~nfv/openvim-4
67
68     $ charm push . cs:~nfv/bundle/osm-r1
69     blah blah cs:~nfv/bundle/osm-r1-4
70
71     $ charm release cs:~nfv/bundle/osm-r1-4
72
73 To deploy the published charms from the charm store:
74
75     # The recommended method
76     $ charm deploy cs:~nfv/bundles/openmano
77
78     - or -
79
80     # The manual method
81     $ juju deploy cs:~nfv/openvim
82     $ juju deploy cs:~nfv/openvim-compute
83     $ juju deploy cs:~nfv/openmano
84     $ juju deploy cs:mariadb
85
86     $ juju add-relation mariadb openvim
87     $ juju add-relation mariadb openmano
88     $ juju add-relation openvim openvim-compute
89     $ juju add-relation openvim openmano
90
91 [charm-tools]: https://jujucharms.com/docs/stable/tools-charm-tools
92 [Getting Started]: https://jujucharms.com/docs/devel/developer-getting-started
93 [interfaces.juju.solutions]: http://interfaces.juju.solutions/