I first started with a clean Ubuntu server. Contrail seems to have support on 12.04LTS version of code (12.04.03 to be precise). So I downloaded the amd64-iso file and did a fresh install on a system.
After it came up I did some package adds to get the machine prepped.
First I made sure I was root.
sudo su
passwd
I gave root a password. This is to be used later when Contrail tries to install packages using root.
This are the files I noticed while looking at different blogs on the OpenContrail.org website. I'm not sure if all these dependencies are needed. This is what worked for me. (I'm pretty sure git isn't needed here, but I use git for other projects so I did it anyways.)
apt-get install -y git-core ant build-essential pkg-config linux-headers-3.2.0-35-virtual
apt-get install -y scons git python-lxml wget gcc patch make unzip flex bison g++ libssl-dev autoconf automake libtool pkg-config vim python-dev python-setuptools python-paramiko
apt-get update
Then I went onto the Juniper website and downloaded the software.
You DON'T have to install Openstack first to get this going.
This package has Contrail plus the Openstack Havana version built in.
I ftp or scp this file onto my ubuntu server.
I place it in the /tmp directory.
Next I install the package.
dpkg -i contrail-install-packages_1.05.1-234~havana_all.deb
The packages get placed in a contrail directory.
cd /opt/contrail/contrail_packages
Then I run the setup shell script.
./setup.sh
After this, you'll need to create or modify a testbed.py script. This tells contrail how install the compute, storage and control nodes. Since this is an all-in-one system, I going to clone the single box example and modify it.
cd /opt/contrail/utils/fabfile/testbeds/
cp testbed_singlebox_example.py testbed.py
Next I edit the file.
vi testbed.py
In order to execute this file, you need to back up a few directories (I know it's lame, the command doesn't seem to execute in the correct directory.)
cd /opt/contrail/utils
Next you will issue the fabric command
fab install_contrail
fab setup_all
After a few minutes, the scripts will run and more packages will be installed and configured to the specifications of your testbed file.
The server will reboot automatically.
After it comes back up sudo su when you login again
Then you need to source your authentication files.
keystonerc and openstackrc are located in /etc/contrail
source /etc/contrail/keystonerc
source /etc/contrail/openstackrc
Here are some commands you can issue after installation to check the state of openstack
openstack-status
nova-manage service list
root@ubuntu:/home/user# openstack-status
== Nova services ==
openstack-nova-api: active
openstack-nova-compute: active
openstack-nova-network: inactive (disabled on boot)
openstack-nova-scheduler: active
openstack-nova-volume: inactive (disabled on boot)
openstack-nova-conductor: active
== Glance services ==
openstack-glance-api: active
openstack-glance-registry: active
== Keystone service ==
openstack-keystone: active
== Cinder services ==
openstack-cinder-api: active
openstack-cinder-scheduler: active
openstack-cinder-volume: inactive (disabled on boot)
== Support services ==
mysql: active
libvirt-bin: active
rabbitmq-server: inactive (disabled on boot)
memcached: inactive (disabled on boot)
== Keystone users ==
+----------------------------------+---------+---------+---------------------+
| id | name | enabled | email |
+----------------------------------+---------+---------+---------------------+
| 2fa7b037efe1437a9045eab35f446511 | admin | True | admin@example.com |
| 6bb262f464a546b391b30879f1e8f10b | cinder | True | cinder@example.com |
| fdedd2c1a26d44ab9e83f000383cedf3 | demo | True | demo@example.com |
| cdc338c569af42cf87ba7bc7e7e161a8 | glance | True | glance@example.com |
| 2e28f88537064d97bfed64ad62f2fc66 | neutron | True | neutron@example.com |
| c09776b2f84744198d46c0361bfc1070 | nova | True | nova@example.com |
+----------------------------------+---------+---------+---------------------+
== Glance images ==
ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
== Nova instance flavors ==
m1.medium: Memory: 4096MB, VCPUS: 2, Root: 40GB, Ephemeral: 0Gb, FlavorID: 3, Swap: 0MB, RXTX Factor: 1.0, public, ExtraSpecs {}
m1.tiny: Memory: 512MB, VCPUS: 1, Root: 1GB, Ephemeral: 0Gb, FlavorID: 1, Swap: 0MB, RXTX Factor: 1.0, public, ExtraSpecs {}
m1.large: Memory: 8192MB, VCPUS: 4, Root: 80GB, Ephemeral: 0Gb, FlavorID: 4, Swap: 0MB, RXTX Factor: 1.0, public, ExtraSpecs {}
m1.xlarge: Memory: 16384MB, VCPUS: 8, Root: 160GB, Ephemeral: 0Gb, FlavorID: 5, Swap: 0MB, RXTX Factor: 1.0, public, ExtraSpecs {}
m1.small: Memory: 2048MB, VCPUS: 1, Root: 20GB, Ephemeral: 0Gb, FlavorID: 2, Swap: 0MB, RXTX Factor: 1.0, public, ExtraSpecs {}
== Nova instances ==
root@ubuntu:/home/user# nova-manage service list
Binary Host Zone Status State Updated_At
nova-consoleauth ubuntu internal enabled :-) 2014-09-18 17:26:26
nova-console ubuntu internal enabled :-) 2014-09-18 17:26:26
nova-scheduler ubuntu internal enabled :-) 2014-09-18 17:26:26
nova-conductor ubuntu internal enabled :-) 2014-09-18 17:26:27
nova-compute ubuntu nova enabled :-) 2014-09-18 17:26:26
You are now ready to login to the Horizon Dashboard to configure your Openstack platform.
http://x.x.x.x/horizon
To log into your contrail controller change the port number to 8143
https://x.x.x.x:8143/
Next time I'll show how create a MP-BGP connection to a MX gateway to all traffic from the virtual network to connect to a physical network.
No comments:
Post a Comment