Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. ## Specs:
  2.  
  3. 8x CPU
  4. 32GB RAM
  5. 128GB HD
  6. 1 NIC
  7.  
  8. Ubuntu 14.04.2 (ubuntu-14.04.2-server-amd64.iso)
  9. Contrail 3.0 (contrail-install-packages_3.0.0.0-2725-ubuntu-14-04kilo_all.deb)
  10.  
  11. ## INSTALL UBUNTU
  12.  
  13. - No DHCP
  14. - Install SSH Server
  15. - Create "contrail" user (password: contrail)
  16. - Log in once finished
  17.  
  18. ## EDIT NETWORK IF NECESSARY
  19.  
  20. sudo nano /etc/network/interfaces
  21. auto eth0
  22. iface eth0 inet static
  23.  
  24. address 192.168.1.128
  25. netmask 255.255.255.0
  26. network 192.168.1.0
  27. broadcast 192.168.1.255
  28. gateway 192.168.1.1
  29. dns-nameservers 8.8.8.8
  30.  
  31. sudo ifdown eth0 && sudo ifup eth0
  32.  
  33. sudo nano /etc/resolvconf/resolv.conf.d/base
  34. search sdnessentials.com
  35. nameserver 8.8.8.8
  36. nameserver 8.8.4.4
  37.  
  38. sudo nano /etc/hostname
  39. sudo nano /etc/hosts
  40.  
  41. 10.0.1.130 contrail-compute
  42. 10.0.1.131 contrail-controller-a
  43. 10.0.1.132 contrail-controller-b
  44.  
  45. 192.168.4.101 contrail-controller
  46. 192.168.4.102 contrail-compute
  47. 192.168.4.103 contrail-docker
  48.  
  49. sudo service hostname restart
  50.  
  51. ## ADD ROOT PASSWORD AND ALLOW LOGIN
  52.  
  53. sudo passwd root
  54. sudo sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
  55. sudo service ssh reload
  56. su root
  57.  
  58. ## COPY PACKAGE TO CONFIG NODE
  59.  
  60. scp /Users/cjones/Documents/Contrail3.0/contrail-install-packages* root@10.0.16.100:~
  61.  
  62. ## UNPACK & SETUP
  63.  
  64. dpkg -i /root/contrail*
  65. cd /opt/contrail/contrail_packages/ ; ./setup.sh
  66.  
  67. ## CONFIG TESTBED.PY FILE
  68. cd /opt/contrail/utils/fabfile/testbeds/ ; cp testbed_singlebox_example.py testbed.py ; nano testbed.py
  69.  
  70. cd /opt/contrail/utils/fabfile/testbeds/ ; nano testbed.py
  71.  
  72. ===========================================
  73. from fabric.api import env
  74.  
  75. host1 = 'root@10.10.10.100'
  76.  
  77. ext_routers = []
  78.  
  79. router_asn = 64512
  80. host_build = 'root@10.10.10.100'
  81.  
  82. env.roledefs = {
  83. 'all': [host1],
  84. 'cfgm': [host1],
  85. 'openstack': [host1],
  86. 'control': [host1],
  87. 'compute': [host1],
  88. 'collector': [host1],
  89. 'webui': [host1],
  90. 'database': [host1],
  91. 'build': [host_build],
  92. 'storage-master': [host1],
  93. 'storage-compute': [host1]
  94. }
  95.  
  96. env.openstack_admin_password = 'contrail'
  97.  
  98. env.hostnames = {
  99. host1: 'contrail3',
  100. }
  101.  
  102. env.passwords = {
  103. host1: 'contrail',
  104. host_build: 'contrail',
  105. }
  106.  
  107. env.ostypes = {
  108. host1:'ubuntu',
  109. }
  110.  
  111. minimum_diskGB = 50
  112. ===========================================
  113.  
  114.  
  115.  
  116. Modify:
  117. Replace 1.1.1.1 with <IP>
  118. Replace a0s1 with <hostname>
  119. Replace secret123 with contrail
  120. Replace secret with contrail
  121. Replace centos with ubuntu
  122. Uncomment and change minimum_diskGB = 50
  123.  
  124. cd /opt/contrail/utils/ ; fab install_pkg_all:/root/contrail
  125.  
  126. ## RUN INSTALL_CONTRAIL
  127. ## Install the required Contrail packages in each node of the cluster
  128. cd /opt/contrail/utils/ ; fab install_contrail
  129.  
  130. (will reboot)
  131.  
  132. ## RUN SETUP
  133.  
  134. cd /opt/contrail/utils/ ; fab setup_all
  135.  
  136.  
  137. ## INSTALL VMWARE TOOLS
  138.  
  139. sudo apt-get install open-vm-tools
  140.  
  141. ## MODIFY COMPUTE NODES WITH ETHTOOL
  142.  
  143. Add to /etc/rc.local:
  144.  
  145. # Disable sequence checking on Compute Nodes
  146.  
  147. ethtool -K eth0 gso off
  148. ethtool -K eth0 tx off
  149. ethtool -K eth0 rx off
  150.  
  151.  
  152.  
  153. source /etc/contrail/openstackrc
  154.  
  155. glance image-create \
  156. --name Webserver-VM \
  157. --disk-format qcow2 \
  158. --container-format bare \
  159. --is-public True \
  160. --file /root/Webserver-VM.img
  161.  
  162. glance image-create \
  163. --name Database-VM \
  164. --disk-format qcow2 \
  165. --container-format bare \
  166. --is-public True \
  167. --file /root/Database-VM.img
  168.  
  169. glance image-create \
  170. --name Juniper-vSRX \
  171. --disk-format qcow2 \
  172. --container-format bare \
  173. --is-public True \
  174. --file /root/Juniper-vSRX.img
  175.  
  176. glance image-list
  177. glance image-download --file ./example-test.img 0a[...]5dd
  178.  
  179. =========================
  180. DOCKER
  181. =========================
  182.  
  183.  
  184.  
  185. source /etc/contrail/openstackrc
  186. docker pull cirros
  187.  
  188. docker save cirros | glance image-create --is-public=True --container-format=docker --disk-format=raw --name cirros
  189.  
  190.  
  191. glance image-create \
  192. --name Ubuntu-Trusty \
  193. --disk-format qcow2 \
  194. --container-format bare \
  195. --is-public True \
  196. --file /root/trusty-server-cloudimg-amd64-disk1.img
  197.  
  198.  
  199. #cloud-config
  200. password: contrail
  201. chpasswd: { expire: False }
  202. ssh_pwauth: True
  203. manage_etc_hosts: true
  204.  
  205. cirros/cubswin:)
  206.  
  207.  
  208.  
  209.  
  210. cd /opt/contrail/utils/fabfile/testbeds/ ; nano testbed.py
  211.  
  212. 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
  213.  
  214.  
  215.  
  216. cd /opt/contrail/utils/ ; fab add_vrouter_node:root@192.168.4.103
  217.  
  218.  
  219. scp /etc/contrail/openstackrc root@192.168.4.103:/etc/contrail
  220.  
  221.  
  222.  
  223.  
  224.  
  225. cd /opt/contrail/utils ; fab install_new_contrail:new_ctrl='root@10.10.10.12'
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234. auto eth1
  235. iface eth1 inet static
  236. address 10.10.20.102
  237. netmask 255.255.255.0
  238. network 10.10.20.0
  239. broadcast 10.10.20.255
  240.  
  241.  
  242. ONE STEP:
  243.  
  244. dpkg -i /root/contrail* && \
  245. cd /opt/contrail/contrail_packages/ && \
  246. ./setup.sh && \
  247. cp /root/testbed.py /opt/contrail/utils/fabfile/testbeds/ && \
  248. cd /opt/contrail/utils/ && \
  249. fab install_pkg_all:/root/contrail-install-packages_3.0.1.0-23-ubuntu-14-04kilo_all.deb && \
  250. fab install_contrail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement