Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Specs:
- 8x CPU
- 32GB RAM
- 128GB HD
- 1 NIC
- Ubuntu 14.04.2 (ubuntu-14.04.2-server-amd64.iso)
- Contrail 3.0 (contrail-install-packages_3.0.0.0-2725-ubuntu-14-04kilo_all.deb)
- ## INSTALL UBUNTU
- - No DHCP
- - Install SSH Server
- - Create "contrail" user (password: contrail)
- - Log in once finished
- ## EDIT NETWORK IF NECESSARY
- sudo nano /etc/network/interfaces
- auto eth0
- iface eth0 inet static
- address 192.168.1.128
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- gateway 192.168.1.1
- dns-nameservers 8.8.8.8
- sudo ifdown eth0 && sudo ifup eth0
- sudo nano /etc/resolvconf/resolv.conf.d/base
- search sdnessentials.com
- nameserver 8.8.8.8
- nameserver 8.8.4.4
- sudo nano /etc/hostname
- sudo nano /etc/hosts
- 10.0.1.130 contrail-compute
- 10.0.1.131 contrail-controller-a
- 10.0.1.132 contrail-controller-b
- 192.168.4.101 contrail-controller
- 192.168.4.102 contrail-compute
- 192.168.4.103 contrail-docker
- sudo service hostname restart
- ## ADD ROOT PASSWORD AND ALLOW LOGIN
- sudo passwd root
- sudo sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- sudo service ssh reload
- su root
- ## COPY PACKAGE TO CONFIG NODE
- scp /Users/cjones/Documents/Contrail3.0/contrail-install-packages* root@10.0.16.100:~
- ## UNPACK & SETUP
- dpkg -i /root/contrail*
- cd /opt/contrail/contrail_packages/ ; ./setup.sh
- ## CONFIG TESTBED.PY FILE
- cd /opt/contrail/utils/fabfile/testbeds/ ; cp testbed_singlebox_example.py testbed.py ; nano testbed.py
- cd /opt/contrail/utils/fabfile/testbeds/ ; nano testbed.py
- ===========================================
- from fabric.api import env
- host1 = 'root@10.10.10.100'
- ext_routers = []
- router_asn = 64512
- host_build = 'root@10.10.10.100'
- env.roledefs = {
- 'all': [host1],
- 'cfgm': [host1],
- 'openstack': [host1],
- 'control': [host1],
- 'compute': [host1],
- 'collector': [host1],
- 'webui': [host1],
- 'database': [host1],
- 'build': [host_build],
- 'storage-master': [host1],
- 'storage-compute': [host1]
- }
- env.openstack_admin_password = 'contrail'
- env.hostnames = {
- host1: 'contrail3',
- }
- env.passwords = {
- host1: 'contrail',
- host_build: 'contrail',
- }
- env.ostypes = {
- host1:'ubuntu',
- }
- minimum_diskGB = 50
- ===========================================
- Modify:
- Replace 1.1.1.1 with <IP>
- Replace a0s1 with <hostname>
- Replace secret123 with contrail
- Replace secret with contrail
- Replace centos with ubuntu
- Uncomment and change minimum_diskGB = 50
- cd /opt/contrail/utils/ ; fab install_pkg_all:/root/contrail
- ## RUN INSTALL_CONTRAIL
- ## Install the required Contrail packages in each node of the cluster
- cd /opt/contrail/utils/ ; fab install_contrail
- (will reboot)
- ## RUN SETUP
- cd /opt/contrail/utils/ ; fab setup_all
- ## INSTALL VMWARE TOOLS
- sudo apt-get install open-vm-tools
- ## MODIFY COMPUTE NODES WITH ETHTOOL
- Add to /etc/rc.local:
- # Disable sequence checking on Compute Nodes
- ethtool -K eth0 gso off
- ethtool -K eth0 tx off
- ethtool -K eth0 rx off
- source /etc/contrail/openstackrc
- glance image-create \
- --name Webserver-VM \
- --disk-format qcow2 \
- --container-format bare \
- --is-public True \
- --file /root/Webserver-VM.img
- glance image-create \
- --name Database-VM \
- --disk-format qcow2 \
- --container-format bare \
- --is-public True \
- --file /root/Database-VM.img
- glance image-create \
- --name Juniper-vSRX \
- --disk-format qcow2 \
- --container-format bare \
- --is-public True \
- --file /root/Juniper-vSRX.img
- glance image-list
- glance image-download --file ./example-test.img 0a[...]5dd
- =========================
- DOCKER
- =========================
- source /etc/contrail/openstackrc
- docker pull cirros
- docker save cirros | glance image-create --is-public=True --container-format=docker --disk-format=raw --name cirros
- glance image-create \
- --name Ubuntu-Trusty \
- --disk-format qcow2 \
- --container-format bare \
- --is-public True \
- --file /root/trusty-server-cloudimg-amd64-disk1.img
- #cloud-config
- password: contrail
- chpasswd: { expire: False }
- ssh_pwauth: True
- manage_etc_hosts: true
- cirros/cubswin:)
- cd /opt/contrail/utils/fabfile/testbeds/ ; nano testbed.py
- cd /opt/contrail/utils/ ; fab install_pkg_node:/root/contrail-install-packages_3.0.0.0-2725-ubuntu-14-04kilo_all.deb,root@192.168.4.103
- cd /opt/contrail/utils/ ; fab add_vrouter_node:root@192.168.4.103
- scp /etc/contrail/openstackrc root@192.168.4.103:/etc/contrail
- cd /opt/contrail/utils ; fab install_new_contrail:new_ctrl='root@10.10.10.12'
- auto eth1
- iface eth1 inet static
- address 10.10.20.102
- netmask 255.255.255.0
- network 10.10.20.0
- broadcast 10.10.20.255
- ONE STEP:
- dpkg -i /root/contrail* && \
- cd /opt/contrail/contrail_packages/ && \
- ./setup.sh && \
- cp /root/testbed.py /opt/contrail/utils/fabfile/testbeds/ && \
- cd /opt/contrail/utils/ && \
- fab install_pkg_all:/root/contrail-install-packages_3.0.1.0-23-ubuntu-14-04kilo_all.deb && \
- fab install_contrail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement