OPNFV Fuel/ODL Build Server Setup

Transcription

OPNFV Fuel/ODL Build Server Setup
OpnfV Fuel/ODL
Build Demo Session
Daniel Smith
Welcome … Getting in
 Below you will find the information necessary to connect to todays session. As well, the basic requirements
for a simple build node are outlined below. note: for those of you that requested a build node VM from me,
you will receive a email from me 20 minutes prior with the login info.
 GOTO Meeting Information:
 https://global.gotomeeting.com/join/450573965





Call In Numbers:
United States (Long distance): +1 (571) 317-3129
Australia (Long distance): +61 2 8355 1020
Access Code: 450-573-965
More phone numbers: https://global.gotomeeting.com/450573965/numbersdisplay.html
 Basic Build System requirements:
 4 CPUs, 6GB RAM (8 is preferable).
 Internet Connection
 Ubuntu14.04
 *I will show on Ubuntu, however this is simply a question of my preference, the tools we will install/run the build setup can be done in
OS that supports the toolset. (outlines later)
 Additional Requirements (for Nested Environment):
 Fuel – 4GB RAM - 2 CPU 100GB HD
 Control 4GB :4CPU – 500GB HD
 Compute 4GB RAM 2 CPU
Topics for Today
 Approach to Training Sessions – Today we cover the BUILD setup.
 A step by step walkthrough starting from a base OS and going through all
the steps you will need to do to produce a FUEL/ODL ISO that is ready for
deployment.
 In the next sessions, we will cover Deploying Fuel and ODL
 Starting at the end.
 I will give a short overview of the current deployed state of ODL in an
Openstack environment, showing the integration of the OVSDB to ODL a
look at DLUX and show the paths, etc
Setting up your Build Environment
 Note: this assumes you have just finished doing a basic installation of
Ubuntu 14.04 (or similar OS) and have nothing but the default setup
(OpenSSH is the only package I have added at this point).
 Other assumptions:
 You have direct or proxy so that apt, git and similar repositiory programs will
function
 You have sudo / root access on your machine (you will need it during the
build of Fuel).
u
The Big Picture
 Perhaps before we dive in.. We should look at the following “flow” of
what we will do
Setup Build
Environment
Apply Puppet
Fetch Fuel
Fetch ODL
From Repo
From Repo
Manifest, ISO &
And Build
And Build
Docker Pkg.
ISO
ODL &
DOCKER PKG
Release ISO
Build Environment
 On your build server you will need the following:
 Git & Gerrit Access to the Genesis Repo
 Used to fetch the OPNFV code base
 Docker
 Used to create both the Fuel ISO (From Repo) and ODL Containers
Packages for Installation
 Login to your Build server, and install the following packages via apt (or zypper or whichever flavour you like).
 Install Docker:

http://docs.docker.com/install/ubuntulinux
 Here is the simple steps (from command line):
 sudo apt-get update
 sudo apt-key adv –keyserver { ….. See the link for copy/paste … }

Answer yes if prompted
 sudo sh –c “echo deb https://get.docker.com/ubuntu docker main
> /etc/apt/source.list/docker.list”




\
note: the “\” should not be included
apt-get update
apt-get install docker.io ( note: Ubuntu specific cause there is already a “docker” pkg)
Add “DOCKER_OPTS=“ –dns=8.8.8.8 –dns=8.8.8.8” in /etc/default/docker
usermod –a –G docker <userid>
Restart Docker
 service docker.io restart
 Verify Docker is working:
 sudo docker run –i –t ubuntu /bin/bash
Great! – lets take 5 minutes to let
everyone get done and Q&A
Setup Gerrit with OPNFV
 In order to access the OPNFV stuff, you need to get into the Repositories on Gerrit. The following steps need to be done in
order to get setup.
-
Create a Linux Foundation account (you need it for Gerrit)
-
-
Create a SSH Key (if you don’t have one already) with ssh-keygen
-
-
Select SSH Keys (on the left hand side) then Add Key
Copy Paste your key into the Text Box below and select Save
Install GIT
-
-
ssh-keygen (pick a passphrase and remember where you save the file)
cat ~<userid>/.ssh.id_rsa.pub
Login to Gerrit at https://gerrit.opnfv.org and go into Settings (its under your name in the Right Corner)
-
-
http://identity.linuxfoundation.org
apt-get install git (should be installed by default, but you never know :P)
Clone the OPNFV Repo (Here’s where the fun starts).
-
git clone ssh://<you linux foundation id>@gerrit.opnfv.org:29418/genesis
If you do a “ls –l” in the directory where you cloned, you should see the following (or similar depending on changes):
genesis----/
common/
foreman/
fuel/
opensteak/
puppet/
--- We will examine this in greater detail
We now have all the inputs for our build…
Breakdown of FUEL in OPNFV
Fuel
CI
Build
F_docker_
packadd
Docker
Discussion: All “Additions to Fuel-Vanilla” are
packaged in directory F_xyzabc.
Each package directory will contain the following:
F_isoroot
Makefile
F_openda
ylight
puppet/modules/opnfv/xyzabc.pp
F_patchpackages
any addition items you require for your patch
DOC
F_ntp
F_resolvc
onf
F_OPNFV_PUPPET
F_ODL_DOC
Examination of NTP.PP module
 For this part of the session, lets open the
~userid/genesis/fuel/build/f_ntp/puppet/modules/opfv/manifests/ntp.pp file.
 Lets Take about the parts:
 1st ) OPNFV::<your package name>
 This is where you declare your subclass into the OPNFV of whatever you are “adding”
(e.g, Docker, Java, some scripts you want pushed into the ISO) all puppet manifests in the
OPNFV class will be packaged and delivered and the applied to target system (based on
type) during deployment
 2nd) fuel_settings [role],[opnfv],[ntp] are used in a regex to match a target node.
You can also use controller / compute to separate what you want to install where.
 There are many directives in Puppet available (we wont go through all you can do
in a manifest, however here is a resource that I like).
 http://docs.puppetlabs.com/guides
Examination of Makefile
 For the purpose of this demo I would assume that everyone knows
what a Makefile is. I would like to highlight the following options /
switches in the Main Makefile (~/genesis/fuel/build/Makefile).
Namely:
Incorporating your class into the INCLUDE statement (so its
gets built along with everything else).
Building out “build, build-clean” and other functions are available
– refer to the Main Makefile.
Examination of
F_OPNFV_PUPPET
 Its important that we examine ~genesis/fuel/build/f_opnfv_puppet
init.pp manifest file, since this is the TOP-Class of the OPNFV Puppet
packages (not to be confused with the ones that Fuel has of their
own).
 Namely we want to highlight the following:
 Add your class name (not the directory = f_xyzabc) in the include section to
ensure your added subclass is picked up at runtime
Building your ISO
 Ok ok – enough talking, lets do a build….
 We need a couple more tools though first
 Install the following
 apt-get install make
 Then “make all”
 Sit back, get a coffee.. You will find your ISO in the releases/. Directory