modified to change the logic to create fabric and vlan if not
[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 3 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, Contrail Web UI, Zookeeper
36
37 *KVM #2 - Nova Compute with Contrail vRouter
38
39 *KVM #3 - Cassandra
40
41 You'll require approx. 25Gb RAM with 60Gb+ disk space.
42 Deployment can take anywhere between 20 mins to 1 hour.
43
44 You need to 'sudo apt-get install juju juju-local uvtool', and
45 logout/login in order to pick up libvirt group permissions before
46 proceeding. See https://bugs.launchpad.net/juju-core/+bug/1308088.
47
48 Follow these steps:
49
50 ssh-keygen
51   (if you don't already have a key at ~/.ssh/id_rsa).
52
53 cp cloud-sh-contrail/environments.yaml ~/.juju
54   (or create your own default local environment in your existing
55    environments.yaml file)
56
57 cd cloud-sh-contrail
58
59 ./deploy-trusty.sh (deploys under trusty)
60 or
61 ./deploy-precise.sh (deploys under precise)
62
63 This will log to 'out.log'.
64
65 This will deploy OpenStack and import Trusty's daily image into Glance.
66
67 Horizon will be located on the machine 'juju status openstack-dashboard' -
68 http://<ip>/horizon.
69
70 Contrail Web UI will be located on the machine 'juju status contrail-webui' -
71 http://<ip>:8080.
72
73 Admin credentials will be written to cloud/admin-openrc.
74
75 Upon deployment, the host's route and iptables config will be updated to send
76 NAT'ed traffic to the Nova Compute node hosting Contrail's virtual gateway.
77 Such changes can be disabled by not defining or commenting out the variable
78 'CONFIGURE_HOST_ROUTING' in cloud-sh-contrail/config-*.sh.
79
80 The deployment can be destroyed with:
81
82 juju destroy-environment local
83
84
85 Deploy with Juju Deployer
86 -------------------------
87
88 Juju Deployer can deploy a preset configuration of charms given a yaml
89 configuration file. There is a configuration file in
90 'juju-deployer/contrail.yaml'.
91
92 You need to 'sudo apt-get install juju-deployer' first.
93
94 Then:
95
96 cd juju-deployer
97
98 juju-deployer -c contrail.yaml -d trusty-icehouse-contrail (deploy trusty)
99 or
100 juju-deployer -c contrail.yaml -d precise-icehouse-contrail (deploy precise)
101
102 Juju Deployer will branch its own copy of the remote charms.
103
104 Post-deployment scripts exist to configure OpenStack.
105 You will need 'dnsutils' package installed beforehand.
106 To run:
107
108 cd scripts
109
110 CONFIGURE_HOST_ROUTING=true ./openstack.sh
111
112 Setting 'CONFIGURE_HOST_ROUTING' environment variable will configure the host's
113 route and iptables config to send NAT'ed traffic to the Nova Compute node
114 hosting Contrail's virtual gateway. If you do not want this, run
115 './openstack.sh' directly.