NOTE: If you are new to CloudLab, it is highly recommended that you read through CloudLab manual: Getting Started before proceeding.
This repository contains:
- A CloudLab experiment profile
slate-localdev
for SLATE local development. - An associated Ansible playbook used to further provision an experiment based on this profile.
Install the required Python packages using a preferred method.
For convenience, this repository includes several pre-defined methods:
- Anaconda (Conda):
./environment.yml
- Pip:
./requirements.txt
The CloudLab profile is defined in ./profile.py
using the geni-lib
Pip package. Further details on authoring the profile can be found in CloudLab manual: Describing a profile with python and geni-lib.
WARNING: The experiment is not a private machine. As such, create a short-lived GitHub ssh key with no passphrase (this will become your
github_ssh_key
in Ansible).
-
Create an experiment on CloudLab using this profile (
slate-localdev
). -
Clone this repository and copy
./ansible/playbook/group_vars/cloudlab.yml.tmpl
to./ansible/playbook/group_vars/cloudlab.yml
. -
Replace the placeholder variables with actual values.
-
Append the following to your SSH config file (
~/.ssh/config
) using actual values:## CloudLab & SLATE Local Development Host cloudlab-slate-localdev HostName <cloudlab hostname> IdentityFile </path/to/privatekey> Port 22 User <cloudlab user>
-
Provision the running experiment via Ansible:
(python env) /path/to/repo/ansible $ ./provision.sh Using /path/to/repo/ansible/playbook/ansible.cfg as config file PLAY [cloudlab] ************************ PLAY RECAP ************************ node1 : ok=18 changed=9 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
-
Test connecting to the experiment via SSH:
$ ssh cloudlab-slate-localdev Enter passphrase for key '/path/to/privatekey': Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-56-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Last login: Fri Jan 13 10:18:00 2023 from 38.94.243.206 cloudlab_user@node1 ~ $
- The Ansible playbook will only check out the
github_branch
branch ofgithub_repo_url
the first time the experiment is provisioned. - Running the Ansible playbook over and over again will not overwrite the cloned git repository.
- CloudLab experiments expire roughly 16 hours after creation unless otherwise extended.
- Make sure to commit and push to GitHub before the experiment expires.