Skip to content

Commit c0b3438

Browse files
committed
docs: update cloudlab.md to reflect recent changes elsewhere
1 parent cd14af3 commit c0b3438

File tree

1 file changed

+71
-30
lines changed

1 file changed

+71
-30
lines changed

docs/cloudlab.md

+71-30
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# CloudLab getting started guide
22

3-
## Create CloudLab experiments
3+
## 1 Prerequisites
44

55
First, submit an account request to CloudLab (https://www.cloudlab.us/). Things to note:
66

7-
- Select "Join Existing Project" and type: `Sieve-Acto`
7+
- If you're an internal member, select "Join Existing Project" and type: `Sieve-Acto`. Otherwise, you'll have to join other existing projects or create a new one, which is not detailed here.
88
- The username and key you provide will be used for SSH login
99

1010
Wait for the admin to approve your account. Once you are able to login, familiarize yourself with the web-based dashboard, and [the concept of *profiles* and *experiments*](https://docs.cloudlab.us/basic-concepts.html).
1111

12-
Although you should be able to login onto any machine instantiated by your project collaborators (i.e. a Linux user will be automatically created for you on every machine with `authorized_keys` set up), our current practice is to let everyone run code **on their own experiments**.
12+
Although you should be able to log in to any machine instantiated by your project collaborators (i.e. a Linux user will be automatically created for you on every machine with `authorized_keys` set up), for us (`Sieve-Acto`), the current practice is to let everyone run code **on their own experiments**.
13+
14+
Next you'll prepare the dependencies either manually ([section 2](#2-manually-set-up-the-dependencies)) or automatically ([section 3](#3-automatically-set-up-the-dependencies), recommended).
15+
16+
## 2 Manually set up the dependencies
17+
18+
<details><summary>Click to show details</summary>
19+
20+
### 2.1 Create CloudLab experiments
1321

1422
Launch an experiment via the web dashboard:
1523

@@ -18,56 +26,89 @@ Launch an experiment via the web dashboard:
1826
- "Select OS image": `UBUNTU 20.04`
1927
- "Optional physical node type": `c6420`
2028
- Leave other parameters as default. (Especially those regarding temporary filesystem -- we'll deal with it after provisioning using Ansible.)
21-
3. "Next". Give your experiment a name. "Next". "Next".
29+
3. "Next". Give your experiment a name. "Next". "Finish".
2230

23-
Wait for the provisioning to finish. The web dashboard will show you the server address, in the form of `clnodeXXX.clemson.cloudlab.us`.
31+
Wait for the provisioning to finish. The web dashboard will show you the server address, in the form of `<node>.<cluster>.cloudlab.us`. E.g. `clnode123.clemson.cloudlab.us`.
2432

25-
## Configure CloudLab machines
33+
### 2.2 Install dependencies
2634

27-
We are going to manage CloudLab machines with Ansible **from our local machine**. (Ideally this "local machine" can be a CloudLab one too. However, the scripts were not designed to do so and may mess things up. For the time being, minor tweaks are needed in order to let them function properly in such cases.)
35+
We are going to manage CloudLab machines with Ansible from a controller node. This "controller" can be your local machine, or one of the CloudLab machines themselves.
2836

29-
**On your local machine**:
37+
**On your controller node**:
3038

31-
```shell
32-
#
33-
# Install Ansible
34-
#
39+
Install Ansible:
3540

41+
```shell
3642
sudo apt update
37-
sudo apt install software-properties-common
43+
sudo apt -y install software-properties-common
3844
sudo add-apt-repository --yes --update ppa:ansible/ansible
39-
sudo apt install ansible
45+
sudo apt -y install ansible
4046
ansible-galaxy collection install ansible.posix
4147
ansible-galaxy collection install community.general
48+
```
4249

43-
#
44-
# Checkout the repository
45-
#
50+
Clone the Ansible scripts:
4651

47-
cd ~
48-
git clone https://github.com/xlab-uiuc/acto.git
49-
cd acto/
52+
```shell
53+
git clone https://github.com/xlab-uiuc/acto-cloudlab.git /tmp/acto-cloudlab
54+
```
5055

51-
#
52-
# Prepare the CloudLab machine(s) with Ansible
53-
#
56+
Set up `ansible_hosts` file (remember to replace the placeholders with your real domain and user name):
5457

55-
cd scripts/ansible/
56-
# TODO: replace the placeholders with your real domain and user name you
57-
# obtained or submitted in the previous section
58+
```shell
5859
domain="clnodeXXX.clemson.cloudlab.us"
5960
user="alice"
61+
62+
cd /tmp/acto-cloudlab/scripts/ansible/
6063
echo "$domain ansible_connection=ssh ansible_user=$user ansible_port=22" > ansible_hosts
64+
```
65+
66+
> If the controller is a CloudLab machine too, this step can be automated:
67+
>
68+
> ```shell
69+
> component_name=$( geni-get portalmanifest | xmlstarlet sel -N x="http://www.geni.net/resources/rspec/3" -t -v "//x:node/@component_id" )
70+
> cluster_domain=$( echo $component_name | cut -d '+' -f 2 )
71+
> node_subdomain=$( echo $component_name | cut -d '+' -f 4 )
72+
> domain="${node_subdomain}.${cluster_domain}"
73+
> user=$( geni-get user_urn | rev | cut -d '+' -f -1 | rev )
74+
>
75+
> cd /tmp/acto-cloudlab/scripts/ansible/
76+
> echo "$domain ansible_connection=ssh ansible_user=$user ansible_port=22" > ansible_hosts
77+
> ```
78+
>
79+
> Or even simpler, use `127.0.0.1` directly:
80+
>
81+
> ```shell
82+
> cd /tmp/acto-cloudlab/scripts/ansible/
83+
> echo 127.0.0.1 > ansible_hosts
84+
> ```
85+
86+
(Only if the controller is a CloudLab machine too) work around the key authentication:
87+
88+
```shell
89+
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N "" && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
90+
```
91+
92+
Finally, run the Ansible scripts to install dependencies:
93+
94+
```shell
6195
ansible-playbook -i ansible_hosts configure.yaml
6296
```
6397
64-
## Run Acto
98+
</details>
99+
100+
(Only if the controller is a CloudLab machine too) log out and log in again before jumping to section 4.
101+
102+
## 3 Automatically set up the dependencies
103+
104+
TODO
105+
106+
## 4 Run Acto
65107
66-
Login onto **the CloudLab machine**, and run:
108+
Log in to the CloudLab machine, and run:
67109
68110
```shell
69-
cd ~/acto
70-
pip install -r requirements.txt # FIXME: see #247
111+
cd ~/workdir/acto
71112
make
72113
python3 -m acto.reproduce \
73114
--reproduce-dir test/cassop-330/trial-demo \

0 commit comments

Comments
 (0)