Create Openstack images for use with Cheaha
Prerequities
- packer
- python 3.5+
- an openstack RC file
- Copies of certain files you can find around cheaha (place in
ansible/files
):
-
/etc/yum.repos.d/cm.repo
from a bright node -
/etc/pki/rpm-gpg/RPM-GPG-KEY-cm
from a bright node -
/etc/munge/munge.key
from a bright node -
/cm/local/apps/opendlap/etc/certs/*.{key,pem}
(all certs in this directory) from a bright node -
/etc/nslcd.conf
from a bright node
Quickstart
Use your openstack rc file and use the following and you should be able to quickly create an instance:
python -mvenv env
. env/bin/activate
pip install ansible
cp openstack.pkrvars.hcl{.example,}
packer build -var-file=openstack.pkrvars.hcl openstack
Running
- Use your openstack rc file
- Install ansible (preferably in a virtualenv) and ensure
ansible-playbook
is inPATH
- Copy
openstack.pkrvars.hcl.example
toopenstack.pkrvars.hcl
and edit in the documented variables - Run
packer build -var-file=openstack.pkrvars.hcl openstack