diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-17 17:48:09 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-21 14:38:07 +0700 |
| commit | 0f1a82f3abecfeb6142c671d3d5c9f1cdbe5871f (patch) | |
| tree | a0fd3080426eb60d2cbf0a5a5ccadb146918bebb /_ops | |
| parent | 7d89f4c684e85911426937f531ec190854321d65 (diff) | |
| download | awwan-0f1a82f3abecfeb6142c671d3d5c9f1cdbe5871f.tar.xz | |
all: setup tour.awwan.org
Now that the _tour is ready we can deploy it to tour.awwan.org.
The website is updated to include link to tour domain.
Implements: https://todo.sr.ht/~shulhan/awwan/4
Diffstat (limited to '_ops')
| -rw-r--r-- | _ops/.ssh/config | 5 | ||||
| -rw-r--r-- | _ops/tour.awwan.org/10_setup.aww | 13 | ||||
| -rw-r--r-- | _ops/tour.awwan.org/11_setup_container.aww | 9 |
3 files changed, 27 insertions, 0 deletions
diff --git a/_ops/.ssh/config b/_ops/.ssh/config new file mode 100644 index 0000000..76e384b --- /dev/null +++ b/_ops/.ssh/config @@ -0,0 +1,5 @@ +Host awwan.org + Hostname awwan.internal + +Host tour.awwan.org + Hostname tour.awwan.internal diff --git a/_ops/tour.awwan.org/10_setup.aww b/_ops/tour.awwan.org/10_setup.aww new file mode 100644 index 0000000..d10805d --- /dev/null +++ b/_ops/tour.awwan.org/10_setup.aww @@ -0,0 +1,13 @@ +sudo mkdir -p /data/awwan/src +sudo chown -R {{.SSHUser}} /data/awwan + +git -C /data/awwan/src clone https://git.sr.ht/~shulhan/awwan . \ +|| git -C /data/awwan/src fetch --all --tags --prune + +git -C /data/awwan/src submodule update --init + +## Currently we use the dev branch for quick fixes. + +git -C /data/awwan/src checkout -B dev +git -C /data/awwan/src reset --hard origin/dev +CGO_ENABLED=0 make -C /data/awwan/src build diff --git a/_ops/tour.awwan.org/11_setup_container.aww b/_ops/tour.awwan.org/11_setup_container.aww new file mode 100644 index 0000000..82c3449 --- /dev/null +++ b/_ops/tour.awwan.org/11_setup_container.aww @@ -0,0 +1,9 @@ +sudo pacman -Sy --noconfirm mkosi + +make -C /data/awwan/src build-tour + +sudo machinectl --force import-tar /data/awwan/awwan-tour.tar +sudo cp /data/awwan/awwan-tour.nspawn /etc/systemd/nspawn/awwan-tour.nspawn +sudo machinectl start awwan-tour + +sudo machinectl -l |
