- Spin up the VM. It needs to be a supported OS & version; see the
Vagrantfile
for the current target.
Note: for TLS configuration to work correctly the hostname of the machine must match the public DNS name of the machine. If spinning up a Digtial Ocean box, this means the name of the machine you put into DO's UI must be the fully qualified name for the machine.
-
Login as root
-
Create a non-root user with
sudo
access:useradd --create-home --user-group --groups sudo $USERNAME --shell /bin/bash
-
Set the password for that account (so it can
sudo
):passwd $USERNAME # and then follow the prompts
-
Logout and log back in as that user. This is important because our puppet configuration removes
ssh
access for the root user.Note: the remainder of thes instructions require root access, so you probably want to
sudo su
at this point. -
Configure key based SSH access for that user. This might look something like:
su $USERNAME mkdir --parents --mode=700 ~/.ssh wget https://github.com/$THEIR_GITHUB_USERNAME.keys -O ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
-
Repeat for another user, so that more than one person has access to administer the machine.
-
Bootstrap puppet:
sudo apt install --yes puppet git rm -rf /etc/puppet git clone --recurse-submodules https://github.com/PeterJCLaw/srcomp-puppet /etc/puppet
-
Set up public DNS for the machine.
-
(Optional) If setting up a deployment that will have a different upstream than
srcomp.studentrobotics.org
then you will have to modifyupstreamBase
in/etc/puppet/modules/compbox/files/comp-services.js
-
Run the install:
/etc/puppet/scripts/install
-
Deploy your compstate using
srcomp deploy
locally. For details on how to configure your deployments, see the docs for thedeploy
command.
If things change in puppet and you need to re-deploy, you can do so with this command:
/etc/puppet/scripts/update