Create local repository of Contrail and Set common configuration
This topic describes how to create apt local repository for Contrail and set common configuration of Linux server.This topic is same in each Linux servers. Please execute in all of them.
**Target server: Contrail1-3, Compute1
1.Install packages
Save downloaded "contrail-install-packages_3.0.0.0-2725~ubuntu-14-04kilo_all.deb" into /tmp. install deb file by dpkg commoand.
dpkg -i contrail-install-packages_3.0.0.0-2725~ubuntu-14-04kilo_all.deb
2.Unarchive Contrail packages
mkdir -p /opt/contrail/contrail_install_repo
cd /opt/contrail/contrail_install_repo
tar zxvf /opt/contrail/contrail_packages/contrail_debs.tgz
3.Install shell scripts of Contrail to /opt/contrail/bin
mkdir -p /opt/contrail/bin
cd /opt/contrail/contrail_install_repo
dpkg -i binutils_*.deb make_*.deb libdpkg-perl_*.deb dpkg-dev_*.deb patch_*.deb
4.Modify apt repository to refer local packages
sed -e '1ideb file:\/opt\/contrail\/contrail_install_repo \.\/' -i /etc/apt/sources.list
5.Allow to install unauthenticated packages
echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf
6.Intall local repository to /etc/apt/apt.conf from /opt/contral, then package it
cp /opt/contrail/contrail_packages/preferences /etc/apt/preferences
cd /opt/contrail/contrail_install_repo
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
7.Install Contrail-setup
apt-get -y update
apt-get -y install contrail-setup
8.Change Linux Kernel(option)
**If you want to align Juniper recommended version, do this item.
Contrail can be installed even the version is different.
apt-get -y install linux-headers-3.13.0-40 linux-image-extra-3.13.0-40-generic
9.Modify GRUB(option)
**If you want to align Juniper recommended version, do this item.
sed -i "s/GRUB_DEFAULT=0/GRUB_DEFAULT='Advanced options for Ubuntu\>Ubuntu\,\ with Linux 3.13.0-40-generic'/g" /etc/default/grub
update-grub
reboot
10.Set common configuration of Linux server
sysctl net.ipv4.ip_forward=1
sysctl kernel.core_pattern=/var/crashes/core.%e.%p.%h.%t
sysctl fs.file-max=65535
sysctl -p
mkdir -m 0777 -p /var/crashes
echo 'fs.file-max = 65535' >> /etc/sysctl.conf
echo 'kernel.core_pattern = /var/crashes/core.%e.%p.%h.%t' >> /etc/sysctl.conf
11.Disable SE Linux(option)
sed -i 's/SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
12.Modify /etc/hosts
Add items below to /etc/hosts. Note: "host name" + "-ctrl" is used by RabbitMQ.
127.0.0.1 localhost
10.84.50.131 contrail1 contrail1-ctrl
10.84.50.132 contrail2 contrail2-ctrl
10.84.50.133 contrail3 contrail3-ctrl
10.84.50.134 controller
10.84.50.135 compute1
13.Install ntp
apt-get -y install ntp
Confirm NTP sync by "ntpq -p"Next topic is "Install HA modules".
No comments:
Post a Comment