My environment includes the first physical machine (stackmaster) to be my provisioning machine, which uses xCAT 2.8.4, which is an OpenSource provisioning system developed and maintained by IBM. I will assume, that a basic installation of xCAT is done as per the Quick Start Guide
The hostnames/IPs I will be using are listed below
Nodename | Function | External IP | Management IP |
---|---|---|---|
stackmaster | xCAT Management Node | 192.168.33.200 | 10.0.0.201 |
stack01 | OpenStack Controller Node | 192.168.33.151 | 10.0.0.1 |
stack02 | OpenStack Nova Node | 192.168.33.152 | 10.0.0.2 |
stack03 | Openstack Nova Node | 192.168.33.153 | 10.0.0.3 |
So the initial stage was to synchronise the repositories that I was going to need, for example my environment being CentOS 7, I needed the following repositories downloaded
- CentOS 7 base, updates and extras
- EPEL 7 base
- Puppet base and dependancies
- RDO Openstack IceHouse and Juno
The base repository for CentOS 7 was done automatically by the copycds
command
in xCAT, so we didn't need to worry about that one, this is usually found in
/install/centos7.0/x86_64
A new directory was created on stackmaster in /install/post/otherpkgs/repos
.
We synchronised the repositories, using the reposync
command, this required
.repo
files located in an arbitrary directory. We decided that to be
/etc/reposync.repos.d
. We need yum.conf that points to new directory, so
copying /etc/yum.conf
to /etc/reposync.repos.d/yum.conf
, with the relevant
changes, i.e. the reposdir
variable to be changed to /etc/reposync.repos.d
A new script in /install/post/otherpkgs/repos/createrepo.sh
was created that
synchronised the repos, and runs the createrepo
command to create yum
repositories. Note if you don't have the bandwidth, and the space, don't do
this, as this may take a few hours to days, depending on your connection. The
total space required for this is approx 17G.
For the purpose of xCAT, we created the following symlinks in
/install/post/otherpkgs/el7
cd /install/post/otherpkgs/el7
ln -s ../repos/epel-7 epel
ln -s ../repos/extras-7 extra
ln -s ../repos/puppet-7 puppet
ln -s ../repos/rdo-openstack-epel-7 rdo-openstack
ln -s ../repos/rdo-openstack-juno-epel-7 rdo-openstack-juno
cd /install/centos7.0/updates/
ln -s ../../post/otherpkgs/repos/updates-7 x86_64
The osimages from the repo can be downloaded, which in turn can be added to xCAT by using the following command.
cat c7-os-juno.osimage | chdef -z
To confirm that the osimage has been imported correctly, you can run the following command
[root@stackmaster ~]# lsdef -t osimage c7-os-juno
Object name: c7-os-juno
imagetype=linux
osarch=x86_64
osname=Linux
osvers=centos7.0
otherpkgdir=/install/post/otherpkgs/el7
otherpkglist=/install/templates/c7-os/controller.juno.otherpkgs.pkglist
partitionfile=/install/templates/c7-os/controller.partfile
pkgdir=/install/centos7.0/x86_64,/install/centos7.0/updates/x86_64
pkglist=/install/templates/c7-os/controller.pkglist
postbootscripts=setup_extnw -n xcat_pub,packstack-openstack,add_glance_images
postscripts=confignics,hardeths
profile=controller
provmethod=install
synclists=/install/templates/c7-os/controller.synclist
template=/install/templates/c7-os/common.juno.tmpl
Then we create the directory required for the templates
mkdir /install/templates
then copy the contents of the xcat directory to /install/templates
, the
contents looking like below
./c6-os
./c6-os/controller.pkglist
./c6-os/controller.partfile
./c6-os/nova.pkglist
./c6-os/nova.otherpkgs.pkglist
./c6-os/nova.partfile
./c6-os/controller.otherpkgs.pkglist
./c7-os
./c7-os/nova.juno.otherpkgs.pkglist
./c7-os/common.juno.tmpl
./c7-os/controller.pkglist
./c7-os/controller.partfile
./c7-os/nova.pkglist
./c7-os/nova.otherpkgs.pkglist
./c7-os/controller.juno.otherpkgs.pkglist
./c7-os/nova.partfile
./c7-os/controller.otherpkgs.pkglist
./c7-os/controller.synclist
Once the files have been synchronised, we can install the controller node, by running the following command
rinstall stack01 -O c7-os-juno
rinstall stack02+1 -O c7-os-juno-nova