The purpose of this guide is to walk through necessary steps to install and run the puppet modules required to setup and OPNFV environment.
Puppet installation guide can be found here.
The following will show how to install puppet modules required for OPNFV. The directories used will be in the context of using production environment, which is what we use with Foreman. You are free to use whatever you want if not using Foreman.
If you have a proxy you will need to edit your puppet.conf:
vi /etc/puppet/puppet.conf
and add:
[main]
http_proxy_host = your_proxy_server
http_proxy_port = your_proxy_port
Now you can install your puppet modules:
Example :sudo puppet module install -i /etc/puppet/environments/production/modules saz/ntp
Now download the openstack puppet modules:
sudo yum install https://repos.fedorapeople.org/repos/openstack/openstack-juno/epel-7/openstack-puppet-modules-2014.2.8-1.el7.centos.noarch.rpm
You will need to edit your puppet.conf to include the path:
sudo vi /etc/puppet/puppet.conf
Append at the end of basemodulepath the newly installed module path which is /usr/share/openstack-puppet/modules/ :
basemodulepath = /etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules:/usr/share/openstack-puppet/modules/
Now just restart your Apache server:
sudo service httpd restart
cd /etc/puppet/environments/production/modules/
There clone the git repo of TryStack. This is a temporary copy of OPNFV, this should be changed to OPNFV repo once the commit is finished.
sudo git clone -b quickstack https://github.com/trozet/puppet-trystack.git
And rename it:
sudo mv puppet-trystack trystack
QuickStack is part of a project called Astapor. Clone the following to any temporary directory. We will move the QuickStack module after.
sudo git clone -b opendaylight https://github.com/trozet/astapor.git
sudo mv /astapor/puppet/modules/quickstack/ /etc/puppet/environments/production/modules/quickstack
cd /etc/puppet/environments/production/modules/
There clone the git repo of OpenDaylight.
sudo git clone https://github.com/dfarrell07/puppet-opendaylight.git
And rename it:
sudo mv puppet-opendaylight opendaylight
This module is used to wait for ODL to come up before OVS is connected.
cd /etc/puppet/environments/production/modules/
There clone the git repo of wait-for.
sudo git clone https://github.com/basti1302/puppet-wait-for.git
And rename it:
sudo mv puppet-wait-for wait-for
The OPNFV puppet modules are the only ones that need to be invoked onto a node. They will call the other puppet modules we just installed. The OPNFV modules require a bunch of global parameters to be set before puppet is invoked. With Foreman we do this by setting global parameters and overriding those parameters per host that are host specific.
If using puppet only you may want to create a site.pp file with your nodes in it and declare your variables there along with calls to the correct OPNFV class. Each node should have the generic genesis class (trystack) along with genesis::node_type (trystack::node_type), where node_type is compute, controller_networker, or tempest.
Then the global variables for OPNFV are as below. For the sake of simplicity all passwords/tokens can have the same value.