Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Following steps are needed in a VM environment for contrail all-in-one (assuming trusty r201)
sudo apt-get –y install curl
prep right hostname without this fab get_all_time fails
echo " $(hostname)" >>  /etc/hosts
prep keys WARNING do not do this if there is already id_rsa key.
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/ >> ~/.ssh/authorized_keys
point to repo and install fabric
curl -L | sudo apt-key add -
curl -L | sudo OPENSTACK=icehouse CONTRAIL=r201 DISTRO=ubuntu1404 sh
curl -L | sudo sh
prep testbed file
cp /opt/contrail/utils/fabfile/testbeds/ /opt/contrail/utils/fabfile/testbeds/
sed -i 's/' /opt/contrail/utils/fabfile/testbeds/
sed -i "s/host1 = 'root@'/&\nhost1_compute = 'root@<ip>'/" /opt/contrail/utils/fabfile/testbeds/

< REPLACE with ip of eth0 or eth1 as case may be >

sed -i "s/    'compute': \[host1\],/    'compute': \[host1_compute\],/" /opt/contrail/utils/fabfile/testbeds/
contrail-webui needs specific version of nodejs
apt-get install nodejs=0.8.15-1contrail1
install packages
cd /opt/contrail/utils && fab install_contrail
set workers to 1 to reduce load on all-in-one
sed -i 's/40$/1/' /opt/contrail/bin/
cd /opt/contrail/utils && fab setup_all:reboot='False'

< REMOVE /etc/network/interfaces.d/.cfg where physintf is eth0 or eth1 as case may be >

pre fab-setup fixups
# fab setup_all seems to be starting neutron before setting port
# causing conflict with haproxy. so set port here itself
openstack-config --set /etc/neutron/neutron.conf DEFAULT bind_port 9697
fab does its thing
fab setup_all:reboot='False'

< VERIFY /etc/network/interfaces that vhost0 config is ok >

fetch the firstboot file to fixup vhost0's ip and agent config and add it to rc.local
curl -L > /etc/contrail/
echo "reboot" >> /etc/contrail/
chmod a+x /etc/contrail/
sed -i 's#^exit 0#\(/etc/contrail/\n&#' /etc/rc.local
disable cloud-init networking
sed -i 's/dowait .*/#&/' /etc/init/cloud-init-nonet.conf
disable cloud-init
for x in $(ls /etc/init/cloud*.conf); do echo manual >> $(echo $x | sed 's/\.conf/\.override/'); done
finally reboot. firstboot will fixup and do one more reboot and then everything should be up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.