diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-16 16:05:38 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-16 16:05:38 +0000 |
commit | dff2646cf7e8ec68ad87798beb6083f5945c32e5 (patch) | |
tree | 36a1c7f5bb91aa36efa53fb136b0a9d153aeff7b | |
parent | 39277c2aa64f71c1061ec7b3d9c2a98d2415abb3 (diff) | |
parent | ec9191180bc1ef0137127b274b458f7dbc57ec53 (diff) | |
download | puomi-dff2646cf7e8ec68ad87798beb6083f5945c32e5.tar.gz |
Merge branch 'tidy' into 'main'
tidy up and make this work again
See merge request larswirzenius/puomi!5
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | env/env.yaml | 2 | ||||
-rw-r--r-- | env/files/puomi.yaml | 8 | ||||
-rw-r--r-- | env/hosts | 2 | ||||
-rw-r--r-- | env/playbook.yml | 4 | ||||
-rwxr-xr-x | env/setup.sh | 11 | ||||
-rw-r--r-- | env/ssh/config | 2 | ||||
-rw-r--r-- | puomi.md | 6 | ||||
-rw-r--r-- | puomi.yaml | 4 |
9 files changed, 22 insertions, 21 deletions
@@ -3,7 +3,7 @@ Puomi will be software for a simple Internet router and access point for home and small office use. A device running Puomi connects one or more machines via Ethernet and wifi to the Internet, while providing a -firewall against outside intrusions. +firewall against outside intrusions. Puomi will be based on the Debian GNU/Linux operating system. It needs to be run on a small PC or other suitable hardware. Puomi will have no @@ -11,7 +11,7 @@ interactive user interface, and will be managed entirely via Ansible. ## To build and test -Create a VM, accessible with the name `puomienv`, then run this to +Create a VM, accessible with the name `puomi-dev`, then run this to provision and verify it works: ~~~sh diff --git a/env/env.yaml b/env/env.yaml index b25eedb..677d7e5 100644 --- a/env/env.yaml +++ b/env/env.yaml @@ -1,6 +1,6 @@ # This is a vmadm spec file for a VM in which to test Puomi. -puomienv: +puomi-dev: cpus: 4 memory_mib: 8192 image_size_gib: 20 diff --git a/env/files/puomi.yaml b/env/files/puomi.yaml index 65fba58..cceda0d 100644 --- a/env/files/puomi.yaml +++ b/env/files/puomi.yaml @@ -1,10 +1,10 @@ puomi: networks: - - lan - - wan + - network=lan + - network=wan webby: networks: - - wan + - network=wan lappy: networks: - - lan + - network=lan @@ -1 +1 @@ -puomienv +puomi-dev diff --git a/env/playbook.yml b/env/playbook.yml index f5cfa53..3dd7f7f 100644 --- a/env/playbook.yml +++ b/env/playbook.yml @@ -1,4 +1,4 @@ -- hosts: puomienv +- hosts: puomi-dev remote_user: debian become: yes roles: @@ -165,7 +165,7 @@ sane_debian_system_version: 2 unix_users_version: 2 - sane_debian_system_hostname: puomienv + sane_debian_system_hostname: puomi-dev sane_debian_system_codename: buster sane_debian_system_mirror: deb.debian.org diff --git a/env/setup.sh b/env/setup.sh index cf8e704..6ac8197 100755 --- a/env/setup.sh +++ b/env/setup.sh @@ -7,10 +7,9 @@ set -eu -o pipefail url="https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64.qcow2" image=debian-10-openstack-amd64.qcow2 -if [ ! -e "files/$image" ] -then - echo "Download Debian cloud image (only happens on first run)" - wget -q -c -O "files/$image" "$url" +if [ ! -e "files/$image" ]; then + echo "Download Debian cloud image (only happens on first run)" + wget -q -c -O "files/$image" "$url" fi # git does not preserve file modes properly, so set the permissions of @@ -21,11 +20,11 @@ echo "Provision outer VM" chronic ansible-playbook -i hosts playbook.yml echo "Create and provision the inner VMs" -ssh -F ssh/config puomi@puomienv ./setup-inner.sh +ssh -F ssh/config puomi@puomi-dev ./setup-inner.sh # Disable network forwarding in outer VM. This can't be done until the # inner VMs are provisioned, or they can't install anything. Hide the # standard output, as it's useless. -ssh debian@puomienv sudo sysctl -w net.ipv4.ip_forward=0 > /dev/null +ssh debian@puomi-dev sudo sysctl -w net.ipv4.ip_forward=0 >/dev/null echo "Finished; the router test environment is ready for use" diff --git a/env/ssh/config b/env/ssh/config index 66e36fc..24884f8 100644 --- a/env/ssh/config +++ b/env/ssh/config @@ -1,5 +1,5 @@ Host puomi webby lappy - ProxyJump puomi@puomienv + ProxyJump puomi@puomi-dev User debian Host * @@ -81,7 +81,7 @@ the network outside the outer VM. This chapter documents and verifies the detailed acceptance criteria for the Puomi testing environment using [Subplot][] scenarios. It is meant to be used against a previously set up instance of the -environment called `puomienv`. +environment called `puomi-dev`. [Subplot]: https://subplot.liw.fi/ @@ -93,8 +93,8 @@ them from the test environment. ~~~scenario given a router testing environment -when I run ssh -F .ssh/config -v puomi@puomienv hostname -then stdout is exactly "puomienv\n" +when I run ssh -F .ssh/config -v puomi@puomi-dev hostname +then stdout is exactly "puomi-dev\n" when I run ssh -F .ssh/config -v puomi hostname then stdout is exactly "puomi\n" when I run ssh -F .ssh/config -v webby hostname @@ -1,2 +1,4 @@ - given: "a router testing environment" - function: env_setup + impl: + python: + function: env_setup |