Custom Search

Monday, November 17, 2014

Howto Install Contrail with OpenStack In Ubuntu Single Node setup

Howto Install Contrail Release 1.20 with OpenStack In Ubuntu 12.04.4 LTS Single Node setup

http://www.juniper.net/techpubs/en_US/contrail1.0/information-products/topic-collections/release-notes/index.html?jd0e331.html

http://www.opencontrail.org/opencontrail-quick-start-guide/

1)
Create a VirtualBox VM with 4GB RAM, 20GB Disk and Ubuntu 12.04.4 LTS
http://releases.ubuntu.com/12.04/ubuntu-12.04.4-server-amd64.iso



2)
Download contrail install packages
http://www.juniper.net/support/downloads/?p=contrail#sw

* Download "Contrail Package for Ubuntu 12.04.4 LTS"

3)
Install the Contrail packages
a)
Login as root user
#su -

b)
Install Packages
#dpkg -i contrail-install-packages_1.20-63~icehouse_all.deb

4)
Goto /opt/contrail/
There you can see two directories "contrail_packages" and  "puppet".
Goto /opt/contrail/contrail_packages and run "setup.sh"
Run the setup.sh script. This step will create the Contrail packages repository as well as the Fabric utilities needed for provisioning
#cd /opt/contrail/contrail_packages
#./setup.sh

5)
Populate the testbed definitions file, see http://www.juniper.net/techpubs/en_US/contrail1.0/topics/task/installation/testbed-file-vnc.html
a)
Create /opt/contrail/utils/fabfile/testbeds/testbed.py
#cp /opt/contrail/utils/fabfile/testbeds/testbed_singlebox_example.py /opt/contrail/utils/fabfile/testbeds/testbed.py

b)
Edit testbed.py

* Replace “root@1.1.1.1” by “root@server ip”
* Replace “secret” by "root password"
* Replace “secret123” by "Openstack admin password"

#vim /opt/contrail/utils/fabfile/testbeds/testbed.py

host1 = 'root@127.0.0.1'

ext_routers = []

router_asn = 64512

host_build = 'root@127.0.0.1'

env.roledefs = {
     'all': [host1],
     ‘database’: [host1],
     'cfgm': [host1],
     'control': [host1],
     'compute': [host1],
     'collector': [host1],
     'webui': [host1],
     'build': [host_build],
}

#Openstack admin password
env.openstack_admin_password = 'secret123'

#Hostnames
env.hostnames = {
    'all': ['contrailsys']
}

env.password = 'rootpass'

#Passwords of each host
env.passwords = {
    host1: 'rootpass',
    host_build: 'rootpass',
}

#For reimage purpose
env.ostypes = {
    host1:'ubuntu',
}

6)
Install Contrail with OpenStack
Doc: /opt/contrail/utils/README.fabric

a)
Install contrail
#cd /opt/contrail/utils/
#fab -c fabrc install_contrail

b)
Install OpenStack and Configure
#fab setup_all
* Your system will reboot

7)
Open Horizon Dashboard
http://ip-of-contrail-vm/horizon/ #IP of your VirtualBox VM
username: admin
password: secret123

8)
Open Contrail Webui
https://ip-of-contrail-vm:8080
https://ip-of-contrail-vm:8143/login
username: admin
password: secret123

9)
Do following steps if you are trying to setup in a Virtual Machine
a)
#sudo vim /etc/nova/nova-compute.conf

[DEFAULT]
libvirt_type=qemu
compute_driver=libvirt.LibvirtDriver


b)
#sudo service nova-compute restart

http://fosshelp.blogspot.com/2014/11/openstack-libvirterror-internal-error.html

c)
Create a VM vis horizon dashboard http://ip-of-contrail-vm/horizon

d)
Open the log file and check for error
#tail -f /var/log/nova/nova-scheduler.log 

10)
#sudo netstat -tuplen | grep cont
tcp        0      0 0.0.0.0:8091            0.0.0.0:*               LISTEN      0          13132       2389/contrail-query
tcp        0      0 0.0.0.0:34302           0.0.0.0:*               LISTEN      0          23312       2381/contrail-vrout
tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN      0          23358       2381/contrail-vrout
tcp        0      0 0.0.0.0:8083            0.0.0.0:*               LISTEN      0          12666       2382/contrail-contr
tcp        0      0 0.0.0.0:179             0.0.0.0:*               LISTEN      0          12589       2382/contrail-contr
tcp        0      0 0.0.0.0:8085            0.0.0.0:*               LISTEN      0          23360       2381/contrail-vrout
tcp        0      0 0.0.0.0:5269            0.0.0.0:*               LISTEN      0          12610       2382/contrail-contr
tcp        0      0 0.0.0.0:8086            0.0.0.0:*               LISTEN      0          13219       2386/contrail-colle
tcp        0      0 0.0.0.0:8089            0.0.0.0:*               LISTEN      0          13270       2386/contrail-colle
udp        0      0 0.0.0.0:56703           0.0.0.0:*                           0          23342       2381/contrail-vrout
udp        0      0 0.0.0.0:32957           0.0.0.0:*                           0          23343       2381/contrail-vrout

11)
Introspect

Please note the Ports

Modules for ControlNode
http://ip-of-contrail-node:8083

Modules for ApiServer
http://ip-of-contrail-node:8084

Modules for VRouterAgent
http://ip-of-contrail-node:8085

Modules for Schema
http://ip-of-contrail-node:8087

Modules for ServiceMonitor
http://ip-of-contrail-node:8088

Modules for Collector
http://ip-of-contrail-node:8089

Modules for OpServer
http://ip-of-contrail-node:8090

Modules for QueryEngine
http://ip-of-contrail-node:8091

Modules for DnsAgent
http://ip-of-contrail-node:8092

22 comments:

  1. http://fosshelp.blogspot.com/2014/10/howto-install-contrail-with-openstack.html

    ReplyDelete
  2. # fab tasks.install.install_pkg_all:contrail-install-packages_1.21-74~icehouse_all.deb

    ReplyDelete
  3. export OS_USERNAME=admin
    export OS_PASSWORD=secret123
    export OS_TENANT_NAME=admin
    export OS_AUTH_URL=http://127.0.0.1:35357/v2.0

    ReplyDelete
  4. $fab tasks.install.create_install_repo

    ReplyDelete
  5. $ fab tasks.install.install_pkg_all:contrail-install-packages_1.21-74~icehouse_all.deb
    $ fab tasks.install.create_install_repo

    ReplyDelete
  6. Hi admin,
    Can u Please help me in installing Open contrail in ubuntu server 14.04. I am getting confused while changing/modifying the "Tested.py" File..

    ReplyDelete
  7. please, can be upload Contrail package on any upload site , because Juniper disapprove because of public mail and not have private mail for download

    Thanks

    ReplyDelete
    Replies
    1. Hi, I can upload. Please share logins for upload

      Delete
    2. While installing contrail as in step 6a, its asking for 'root' password. But when I enter the password it is not taking. Its keep on asking the password again. Am I doing it right?

      Delete
    3. It should proceed further with correct password but you can try setting your system root password to "secret" and retry as by default its what is specified in openstack configuration files.

      Delete
  8. While installing contrail as in step 6a, its asking for 'root' password. But when I enter the password it is not taking. Its keep on asking the password again. Am I doing it right?

    ReplyDelete
  9. While installing contrail as in step 6a, its asking for 'root' password. But when I enter the password it is not taking. Its keep on asking the password again. Am I doing it right?

    ReplyDelete
    Replies
    1. It should proceed further with correct password but you can try setting your system root password to "secret" and retry as by default its what is specified in openstack configuration files.

      Delete
  10. Hello Saju,

    Nice Post on how to install Opencontrail!!

    however Im running the below issue

    fab -c fabrc install_contrail
    [root@127.0.0.1] Executing task 'install_contrail'
    2016-03-06 20:45:59:468669: [root@127.0.0.1] Executing task 'pre_check'
    2016-03-06 20:45:59:469803: [root@127.0.0.1] Executing task 'check_disk_space'
    No handlers could be found for logger "paramiko.transport"
    2016-03-06 20:45:59:515840: 2016-03-06 20:45:59:473889: Traceback (most recent call last):
    2016-03-06 20:45:59:549130: File "/usr/local/lib/python2.7/dist-packages/fabric/main.py", line 743, in main
    2016-03-06 20:45:59:549700: *args, **kwargs
    2016-03-06 20:45:59:551298: File "/usr/local/lib/python2.7/dist-packages/fabric/tasks.py", line 375, in execute

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. hi admin,

    i am not able to download contrail debian package from below link:

    http://www.juniper.net/support/downloads/?p=contrail#sw

    please help its urgent.

    ReplyDelete
  13. Hi Admin,

    I am also not able to download the packages from Juniper website, can you please help on this.

    ReplyDelete
    Replies
    1. hello plz if you had the package , can you help me ?

      Delete
    2. hello plz if you had the package , can you help me ?

      Delete
  14. There's no reply/autogen-mail from Juniper website to enable the downloads

    ReplyDelete
  15. This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

    how to install openstack on ubuntu

    ReplyDelete
    Replies
    1. hello plz can you help me i nned to get the packages from Juniper website for ubuntu 14.04

      Delete