bf1275421e272b31cfd4696eba270a91db96307f
[joid.git] / ci / opencontrail / README
1 OpenContrail Deployment with Juju
2 =================================
3
4 This readme contains instructions for checking out and deploying Juju charms for
5 OpenContrail.
6
7 The charms are targetted at Trusty but originally used OpenContrail Precise
8 packages.
9
10
11 Checkout charms
12 ---------------
13
14 Charms are hosted on Launchpad.
15 You need to 'sudo apt-get install bzr' first.
16
17 Follow these steps to checkout code:
18
19 cd <deployer dir>
20 ./fetch-charms.sh
21
22 This will checkout the relevant charms into 'src' and create any Juju symlinks
23 in 'charms'.
24
25
26 Deploy with cloud-sh-contrail
27 -----------------------------
28
29 cloud-sh-contrail is a collection of development shell scripts to deploy
30 and setup OpenStack with OpenContrail using Juju's local provider. This will
31 create 4 KVMs as follows:
32
33 *KVM #1 - Keystone, Glance, Neutron Server, Nova Cloud Controller, Horizon,
34           MySQL, RabbitMQ, Contrail Configuration, Contrail Control,
35           Contrail Analytics, Zookeeper
36
37 *KVM #2 - Neutron agents
38
39 *KVM #3 - Nova Compute with Contrail vRouter
40
41 *KVM #4 - Cassandra
42
43 You'll require approx. 25Gb RAM with 60Gb+ disk space.
44 Deployment can take anywhere between 20 mins to 1 hour.
45
46 You need to 'sudo apt-get install juju juju-local uvtool', and
47 logout/login in order to pick up libvirt group permissions before
48 proceeding. See https://bugs.launchpad.net/juju-core/+bug/1308088.
49
50 Follow these steps:
51
52 ssh-keygen
53   (if you don't already have a key at ~/.ssh/id_rsa).
54
55 cp cloud-sh-contrail/environments.yaml ~/.juju
56   (or create your own default local environment in your existing
57    environments.yaml file)
58
59 cd cloud-sh-contrail
60
61 ./deploy-trusty.sh (deploys under trusty)
62 or
63 ./deploy-precise.sh (deploys under precise)
64
65 This will log to 'out.log'.
66
67 This will deploy OpenStack and import Trusty's daily image into Glance.
68
69 Horizon will be located on the machine 'juju status openstack-dashboard' -
70 http://<ip>/horizon.
71 Admin credentials will be written to cloud/admin-openrc.
72
73 Upon deployment, the host's route and iptables config will be updated to send
74 NAT'ed traffic to the Nova Compute node hosting Contrail's virtual gateway.
75 Such changes can be disabled by not defining or commenting out the variable
76 'CONFIGURE_HOST_ROUTING' in cloud-sh-contrail/config-*.sh.
77
78 The deployment can be destroyed with:
79
80 juju destroy-environment local
81
82
83 Deploy with Juju Deployer
84 -------------------------
85
86 Juju Deployer can deploy a preset configuration of charms given a yaml
87 configuration file. There is a configuration file in
88 'juju-deployer/contrail.yaml'.
89
90 You need to 'sudo apt-get install juju-deployer' first.
91
92 Then:
93
94 cd juju-deployer
95
96 juju-deployer -c contrail.yaml -d trusty-icehouse-contrail (deploy trusty)
97 or
98 juju-deployer -c contrail.yaml -d precise-icehouse-contrail (deploy precise)
99
100 Juju Deployer will branch its own copy of the remote charms.
101
102 Post-deployment scripts exist to configure OpenStack.
103 You will need 'dnsutils' package installed beforehand.
104 To run:
105
106 cd scripts
107
108 CONFIGURE_HOST_ROUTING=true ./openstack.sh
109
110 Setting 'CONFIGURE_HOST_ROUTING' environment variable will configure the host's
111 route and iptables config to send NAT'ed traffic to the Nova Compute node
112 hosting Contrail's virtual gateway. If you do not want this, run
113 './openstack.sh' directly.