Skip to content

Commit 5c7965d

Browse files
committed
chore: updated docs
1 parent a4be3e5 commit 5c7965d

3 files changed

Lines changed: 34 additions & 73 deletions

File tree

docs/00-guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Setup Guide
22

3-
The following describes how to setup a single Rover. Note, that the automated steps can be run in parallel.
3+
The following describes how to setup a single Rover. Note, that it can be applied to any number of rovers in parallel to speed up the automation process.
44

5-
First, download the "Debix-SD-V3.6-20240410.img" from google drive and flash the image onto an SD card with tools like [Balena Etcher](https://etcher.balena.io/). Then, put the SD card into the Rover, attach an ethernet cable to it and turn it on. After some time it should have booted the stock linux Ubuntu that it comes with and it should have an assigned IP address. Find this IP address by going into the Router's settings and finding the new device that has just connected. Let's say we are setting up Rover 7, and find that it is connected with the IP address `192.168.0.183`. Then, we must have the following entry in the `hosts.ini` file:
5+
First, download the "Debix-SD-V3.6-20240410.img" from the google drive or the debix website and flash the image onto an SD card with tools like [Balena Etcher](https://etcher.balena.io/). Then, put the SD card into the Rover, attach an ethernet cable to it and turn it on. After some time it should have booted the stock linux Ubuntu that it comes with and it should have an assigned IP address. Find this IP address by going into the Router's settings and finding the new device that has just connected. Let's say we are setting up Rover 7, and find that it is connected with the IP address `192.168.0.183`. Then, we must have the following entry in the `hosts.ini` file:
66

77
``` ini
88
[rover07]
9-
192.168.0.183 ansible_user=debix custom_address=192.168.0.107 rover_id=7 rover_name=turing rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix servo_trim=0.05
9+
192.168.0.183 ansible_user=debix rover_id=7 rover_name=turing rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix servo_trim=0.05
1010
```
1111

12-
The first IP address at the beginning of the line is the address that Ansible will use to connect to the device. The `custom_address` field is the address that the Rover will have at the end of a successful run. This means that after the first run (given that it was successful), we need to change `192.168.0.183` to `192.168.0.107`.
12+
The first IP address at the beginning of the line is the address that Ansible will use to connect to the device (the one assigned by the router `...183`). Since we use mDNS to connect to the rovers using their hostnames, we don't *need* to remember IP addresses like `192.168.0.183`, we can just remember `rover07.local`. If however there are mDNS connection issues, then we must resort to connecting with the IP directly. In theory, after a successful run of the automation the Rover will be available at the `rover07.local` address which means we could change the IP address at the start of the line from `192.168.0.183` -> `rover07.local`. This is recommended since the router might assign it a different IP address some day.
1313

14-
Once this edit has been made, run the following command to check which Rovers are reachable from Ansible:
14+
Then, we can use the following command to make sure we can access all of the rovers.
1515

1616
``` bash
1717
make ping

hosts.ini

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,94 +9,84 @@
99

1010
; --------------------------------------------------------------------
1111
; List of all debixes in the network, first IP is their currently
12-
; reachable address, while custom_address is the IP that it will be
13-
; set to when running `tasks/network.yaml`. After the very first
14-
; run, the IP address needs to be updated to what is in the
15-
; custom_address field. The rover_id should be the same as the last
16-
; `(octet of the custom_address) - 100`. The rover_name should be the
17-
; name of a famous computer scientist, and the rover_password currently
18-
; is set to the hash of 'debix'.
19-
;
20-
; As an example: the following line will ensure that the debix that is
21-
; currently at addess 1.2.3.4 will at the end of the script request
22-
; a static IP address of 5.6.7.8. It will change the hostname to
23-
; 'roverexample' and always connect with the user 'debix'.
24-
;
25-
; [roverexample]
26-
; rover01.local ansible_user=debix custom_address=192.168.0.101 rover_id=1 rover_name=Dijkstra rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
12+
; reachable address as assigned by the router, however after a successful
13+
; run of the setup, they will be reachable via "hostname.local" using mDNS.
14+
; So for example Rover 07 would be addressable via rover07.local
15+
;The rover_name should be the name of a famous computer scientist, and
16+
; the rover_password currently is set to the hash of 'debix'.
2717
;
2818
; --------------------------------------------------------------------
2919

3020

3121
[roverbuilder]
32-
192.168.0.184 ansible_user=debix custom_address=192.168.0.184 rover_id=0 rover_name=RoverBuilder rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
22+
192.168.0.184 ansible_user=debix rover_id=0 rover_name=RoverBuilder rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
3323

3424
[rover01]
35-
rover01.local ansible_user=debix custom_address=192.168.0.101 rover_id=1 rover_name=Dijkstra rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
25+
rover01.local ansible_user=debix rover_id=1 rover_name=Dijkstra rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
3626

3727
[rover02]
38-
rover02.local ansible_user=debix custom_address=192.168.0.102 rover_id=2 rover_name=Martin rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
28+
rover02.local ansible_user=debix rover_id=2 rover_name=Martin rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
3929

4030
[rover03]
41-
rover03.local ansible_user=debix custom_address=192.168.0.103 rover_id=3 rover_name=Torvalds rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
31+
rover03.local ansible_user=debix rover_id=3 rover_name=Torvalds rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
4232

4333
[rover04]
44-
rover04.local ansible_user=debix custom_address=192.168.0.104 rover_id=4 rover_name=Thompson rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa
34+
rover04.local ansible_user=debix rover_id=4 rover_name=Thompson rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa
4535

4636
[rover05]
47-
rover05.local ansible_user=debix custom_address=192.168.0.105 rover_id=5 rover_name=Lovelace rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
37+
rover05.local ansible_user=debix rover_id=5 rover_name=Lovelace rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
4838

4939
[rover06]
50-
rover06.local ansible_user=debix custom_address=192.168.0.106 rover_id=6 rover_name=Stroustrup rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
40+
rover06.local ansible_user=debix rover_id=6 rover_name=Stroustrup rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
5141

5242
[rover07]
53-
rover07.local ansible_user=debix custom_address=192.168.0.107 rover_id=7 rover_name=Gosling rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
43+
rover07.local ansible_user=debix rover_id=7 rover_name=Gosling rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
5444

5545
[rover08]
56-
rover08.local ansible_user=debix custom_address=192.168.0.108 rover_id=8 rover_name=Turing rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
46+
rover08.local ansible_user=debix rover_id=8 rover_name=Turing rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
5747

5848
[rover09]
59-
rover09.local ansible_user=debix custom_address=192.168.0.109 rover_id=9 rover_name=Hoare rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
49+
rover09.local ansible_user=debix rover_id=9 rover_name=Hoare rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
6050

6151
[rover10]
62-
rover10.local ansible_user=debix custom_address=192.168.0.110 rover_id=10 rover_name=Rossum rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
52+
rover10.local ansible_user=debix rover_id=10 rover_name=Rossum rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
6353

6454
; [rover11]
6555
; CAN'T FIND ROVER11
6656

6757
[rover12]
68-
rover12.local ansible_user=debix custom_address=192.168.0.112 rover_id=12 rover_name=Tanenbaum rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
58+
rover12.local ansible_user=debix rover_id=12 rover_name=Tanenbaum rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
6959

7060
[rover13]
71-
rover13.local ansible_user=debix custom_address=192.168.0.113 rover_id=13 rover_name=VonNeumann rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
61+
rover13.local ansible_user=debix rover_id=13 rover_name=VonNeumann rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
7262

7363
[rover14]
74-
rover14.local ansible_user=debix custom_address=192.168.0.114 rover_id=14 rover_name=Shannon rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
64+
rover14.local ansible_user=debix rover_id=14 rover_name=Shannon rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
7565

7666
[rover15]
77-
rover15.local ansible_user=debix custom_address=192.168.0.115 rover_id=15 rover_name=Hopper rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
67+
rover15.local ansible_user=debix rover_id=15 rover_name=Hopper rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
7868

7969
[rover16]
80-
rover16.local ansible_user=debix custom_address=192.168.0.116 rover_id=16 rover_name=Knuth rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
70+
rover16.local ansible_user=debix rover_id=16 rover_name=Knuth rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
8171

8272
[rover17]
83-
rover17.local ansible_user=debix custom_address=192.168.0.117 rover_id=17 rover_name=Minsky rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
73+
rover17.local ansible_user=debix rover_id=17 rover_name=Minsky rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
8474

8575
[rover18]
86-
rover18.local ansible_user=debix custom_address=192.168.0.118 rover_id=18 rover_name=Kernighan rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
76+
rover18.local ansible_user=debix rover_id=18 rover_name=Kernighan rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
8777

8878
[rover19]
89-
rover19.local ansible_user=debix custom_address=192.168.0.119 rover_id=19 rover_name=Primeagen rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
79+
rover19.local ansible_user=debix rover_id=19 rover_name=Primeagen rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
9080

9181
[rover20]
92-
rover20.local ansible_user=debix custom_address=192.168.0.120 rover_id=20 rover_name=Matsumoto rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
82+
rover20.local ansible_user=debix rover_id=20 rover_name=Matsumoto rover_password=a6caecf790605da0544a71b29fe91f21a44a0ec2d5934d77a06831a7d0afc2fa rover_password_plain=debix
9383

9484

9585

9686

87+
; This simply defines which rovers to address when running `make`
9788

9889
[fleet:children]
99-
10090
roverbuilder
10191
rover01
10292
rover02

tasks/network.yaml

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,7 @@
11
---
2-
3-
# - name: Set netplan configuration file
4-
# tags: network
5-
# become: true
6-
# copy:
7-
# dest: /etc/netplan/01-netcfg.yaml
8-
# content: |
9-
# network:
10-
# version: 2
11-
# renderer: networkd
12-
# ethernets:
13-
# ens33:
14-
# dhcp4: no
15-
# addresses:
16-
# - {{ custom_address }}/24
17-
# nameservers:
18-
# addresses: [192.168.0.1, 1.1.1.1]
19-
# wifis:
20-
# wlan0:
21-
# dhcp4: no
22-
# dhcp6: no
23-
# access-points:
24-
# "aselabs":
25-
# password: "{{ wifi_password }}"
26-
# addresses:
27-
# - "{{ custom_address }}/24"
28-
# routes:
29-
# - to: default
30-
# via: 192.168.0.1
31-
# nameservers:
32-
# addresses: [192.168.0.1, 1.1.1.1]
33-
2+
3+
# Using mDNS for addressing the Rovers via hostname
4+
# so no longer using "custom_address" field from hosts.ini file
345

356
- name: Make sure old networking files don't exist
367
tags: network

0 commit comments

Comments
 (0)