- Spin up the VM. It needs to be a supported OS & version; see the
Vagrantfilefor 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
sudoaccess: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
sshaccess for the root user.Note: the remainder of thes instructions require root access, so you probably want to
sudo suat 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.orgthen you will have to modifyupstreamBasein/etc/puppet/modules/compbox/files/comp-services.js -
Run the install:
/etc/puppet/scripts/install
-
Deploy your compstate using
srcomp deploylocally. For details on how to configure your deployments, see the docs for thedeploycommand.
If things change in puppet and you need to re-deploy, you can do so with this command:
/etc/puppet/scripts/update