Skip to content
Snippets Groups Projects
Forked from rc / hpc-factory
676 commits behind the upstream repository.
user avatar
Eesaan Atluri authored
- Set build_instance_name to match the hosts defined in OOD play
- Currently, use_proxy defaults to true for all connection types.
  In the future, this option will be changed to default to false
  for SSH and WinRM connections where the provisioner has access
  to a host IP. Further details in documentation
  https://www.packer.io/plugins/provisioners/ansible/ansible#use_proxy
- As stated in docs link above use_proxy will be set to false in
  the future ansible versions. Currently we set it to False.
  Provide a valid username & ssh key to the ansible provisioner
  directly or make sure that username and ssh key being used by
  ssh communicator will work for your needs. We chose option 2.
cdf5b805

Create Openstack images for use with Cheaha

Prerequities

  1. packer
  2. python 3.5+
  3. an openstack RC file
  4. 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

  1. Use your openstack rc file
  2. Install ansible (preferably in a virtualenv) and ensure ansible-playbook is in PATH
  3. Copy openstack.pkrvars.hcl.example to openstack.pkrvars.hcl and edit in the documented variables
  4. Run packer build -var-file=openstack.pkrvars.hcl openstack

Bright considerations

In order to have this node "behave" as a normal slurm node, you'll need to do the following:

  1. Create an entry for it in devices - this is specifically to create the dns entry (the most important thing to set up is the IP under interfaces)
  2. Add the node entry to /etc/slurm/slurm.conf (both as a node definition and to a partition)

Running the openstack image

  1. Create an instance with the image, at whatever size you need
  2. Make sure to assign it to the openstack-cheaha-internal network with the cheaha-network security group
  3. Associagte a cheaha floating ip from the cheaha-cluster pool