Skip to content

Instantly share code, notes, and snippets.

@alexpearce
Last active June 22, 2016 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpearce/df924109f0630e3ad19e3fd703b0b37c to your computer and use it in GitHub Desktop.
Save alexpearce/df924109f0630e3ad19e3fd703b0b37c to your computer and use it in GitHub Desktop.
Set up a CERN OpenStack virtual machine to run acron jobs. See https://alexpearce.me/2016/06/creating-a-vm-for-acron-jobs/ for more.
#!/bin/sh
echo 'Provisioning acron VM'
# Install what we'll need
sudo yum install -y cern-config-users cern-get-keytab arc-server
# Make sure we ready for Kerberos-authenticated jobs
sudo cern-get-keytab --force
# Open the firewall for the acron communication
sudo firewall-cmd --zone=public --add-port=4241/tcp --permanent
sudo firewall-cmd --reload
# Set up AFS
sudo sed -i"" "s/ \-dynroot//" /etc/sysconfig/openafs
# Let the internet daemon know about the acron communication service
echo -e 'arc 4241/tcp\n' | sudo tee -a /etc/services
sudo service xinetd restart
# Reboot for good measure
sudo reboot now
echo 'Provisioning acron VM complete'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment