| C1 machines: |
| |
| $ ssh -i ~/keys/id_ed25519_golang1 root@$C1_SERVER_IP |
| (key: http://go/go-builders-ssh) |
| |
| Machine setup: |
| |
| * start with Ubuntu bionic |
| * install docker-ce from Docker |
| * GOOS=linux GOARCH=arm go install golang.org/x/build/cmd/rundockerbuildlet |
| * scp -C -i ~/keys/id_ed25519_golang1 $(GOOS=linux GOARCH=arm go list -f {{.Target}} golang.org/x/build/cmd/rundockerbuildlet) root@$C1_SERVER_IP:/usr/local/bin |
| * scp -i ~/keys/id_ed25519_golang1 rundockerbuildlet.service root@$C1_SERVER_IP:/etc/systemd/user/ |
| * ssh -i ~/keys/id_ed25519_golang1 root@$C1_SERVER_IP systemctl enable /etc/systemd/user/rundockerbuildlet.service |
| * ssh -i ~/keys/id_ed25519_golang1 root@$C1_SERVER_IP systemctl start rundockerbuildlet |
| |
| * stop it |
| * snapshot its attached volume, name it (e.g. "buildlet-2019-11-05-1"), note its UUID |
| * click "Images" in top tab, create an image from that same snapshot. Can use the same name. (different namespaces) |
| * click "..." and "More info" on that image, get its ID (e.g. "13f4c905-3a4b-475a-aaba-a13168e2b6c7") |
| * copy that to cmd/scaleway's default flag value |
| * also update cmd/scaleway's bootscript value, if needed: |
| |
| First, find out which bootscript (netboot kernel, initrd, etc) that the original image was using: |
| |
| bradfitz@go:~$ scw images --no-trunc | grep Bionic |
| Ubuntu_Bionic_ML_10_1 latest 47d58f71-8382-48d1-88cd-75e5f1ed7df6 8 months [ par1] [x86_64] |
| Ubuntu_Bionic_ML_9_2 latest 905865bf-e34c-46b0-b7e2-5e11922e6511 8 months [ par1] [x86_64] |
| Ubuntu_Bionic latest e640c621-305b-45f5-975f-a3f80c1cec66 18 months [ams1 par1] [arm arm64 x86_64] |
| bradfitz@go:~$ scw inspect e640c621-305b-45f5-975f-a3f80c1cec66 |
| IMAGEID FROM NAME ZONE ARCH |
| - f974feac image:ubuntu-bionic Ubuntu Bionic par1 x86_64 |
| - f63fe42a image:ubuntu-bionic Ubuntu Bionic par1 arm |
| - b4bdbee1 image:ubuntu-bionic Ubuntu Bionic par1 arm64 |
| FATA[0000] Too many candidates for e640c621-305b-45f5-975f-a3f80c1cec66 (3) |
| bradfitz@go:~$ scw inspect f63fe42a |
| [{ |
| "id": "f63fe42a-900f-4a5e-ba99-ab0e59469b7e", |
| "name": "Ubuntu Bionic Beaver", |
| "creation_date": "2019-03-05T10:27:18.195593+00:00", |
| "modification_date": "2019-03-05T13:32:45.036625+00:00", |
| "root_volume": { |
| "id": "81992ee7-89b5-44f7-a260-5b4594c74b86", |
| "size": 10000000000, |
| "name": "snapshot-664f5068-f21e-44ba-8a99-ea2dfd6fd91f-2019-03-05_10:27", |
| "volume_type": "l_ssd" |
| }, |
| "public": true, |
| "default_bootscript": { |
| "bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16", |
| "dtb": "dtb/c1-armv7l-mainline-lts-4.9-4.9.93-rev1", |
| "initrd": "initrd/uInitrd-Linux-armv7l-v3.14.6", |
| "kernel": "kernel/armv7l-mainline-lts-4.9-4.9.93-rev1", |
| "architecture": "arm", |
| "id": "5c8e4527-d166-4844-b6c6-087d7a6f5fb0", |
| "organization": "11111111-1111-4111-8111-111111111111", |
| "title": "armv7l mainline 4.9.93 rev1" |
| }, |
| "organization": "51b656e3-4865-41e8-adbc-0c45bdd780db", |
| "arch": "arm" |
| }] |
| |
| Look use that default_bootscript.id value as cmd/scaleway's --bootscript flag. |
| |
| Updating the docker image on eu.gcr.io: |
| |
| * create a dev Ubuntu image on scaleway |
| * install Docker on it |
| * copy Dockerfile to it |
| |
| root@scaleway:~# cat Dockerfile | docker build -t eu.gcr.io/symbolic-datum-552/scaleway-builder - |
| |
| * in your normal gcloud dev environment, get a short-lived access token: |
| |
| you@dev:~$ gcloud auth print-access-token |
| |
| * copy/paste it |
| * back on scaleway, log in, and paste the token when it asks for the password: |
| |
| root@scaleway:~# docker login -u oauth2accesstoken https://eu.gcr.io |
| Password: <paste> |
| WARNING! Your password will be stored unencrypted in /root/.docker/config.json. |
| |
| root@scaleway:~# docker push eu.gcr.io/symbolic-datum-552/scaleway-builder |