summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxb <bittmanmax@gmail.com>2023-03-02 15:48:06 -0800
committerMaxb <bittmanmax@gmail.com>2023-03-02 16:07:05 -0800
commit34a994f0de97513ca3eee73a7873878dd7cde7d9 (patch)
tree38ebdd4fe75fbd67966f36540b8b9071ccf54bfb
parentfcc827674fae7a6c3625e7462d06ca4db7e5569b (diff)
Add virtualenv requirements and documentation
We can use python's virtualenv here instead of system packages which will also facilitate version controlling python dependencies.
-rw-r--r--.gitignore1
-rw-r--r--README.md29
-rw-r--r--requirements.txt15
3 files changed, 36 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 5cd4db8..e1295fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
*.retry
.vagrant
ansible.log
+venv
diff --git a/README.md b/README.md
index a13ba15..8ea35eb 100644
--- a/README.md
+++ b/README.md
@@ -16,13 +16,22 @@ You will need to pick a subdomain and delegate its DNS for the system to manage.
The following commands should be run ***locally on your computer*** in order to install and deploy Lilypad on the remote machines.
-## 0. Install the float and LEAP platform pre-requisites
+## 0. Clone the float repository
+
+...and enter it
+
+```shell
+git clone https://0xacab.org/leap/container-platform/lilypad
+cd lilypad
+```
+
+## 1. Install the float and LEAP platform pre-requisites
This installation guide is tested on Debian Bullseye.
Other Linux distributions might need additional steps to install all requirements in the correct version.
```shell
-sudo apt-get install golang build-essential bind9utils python3-pysodium python3-jinja2 python3-netaddr python3-openssl python3-yaml python3-six python3-pycryptodome ansible git ansible-mitogen
+sudo apt-get install golang build-essential bind9utils git
go install git.autistici.org/ale/x509ca@latest
go install git.autistici.org/ale/ed25519gen@latest
@@ -30,15 +39,17 @@ go install git.autistici.org/ai3/go-common/cmd/pwtool@latest
export PATH=$PATH:$HOME/go/bin
```
-## 1. Clone the float repository
+We'll use [virtualenv](https://virtualenv.pypa.io/en/latest/) to manage and install python packages:
+```
+virtualenv -p /usr/bin/python3 venv
+source ./venv/bin/activate
+pip install -r ./requirements.txt
+```
-...and enter it
+This will create a virtual environment where we can install+version control specific python dependencies.
+
+When working on this project, if you're in a new shell, you'll need to run the `source ./venv/bin/activate` command again to re-enter the virtual environment.
-```shell
-git clone https://0xacab.org/leap/container-platform/lilypad
-cd lilypad
-```
-
## 2. Initialize the ansible vault
... by creating a password file. Keep the public user ID of your OpenPGP keys at hand:
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..ecee867
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,15 @@
+ansible==6.2.0
+ansible-core==2.12.10
+cffi==1.15.1
+cryptography==38.0.4
+Jinja2==3.1.2
+MarkupSafe==2.1.1
+mitogen==0.3.3
+netaddr==0.8.0
+packaging==21.3
+pycparser==2.21
+pyOpenSSL==22.1.0
+pyparsing==3.0.9
+pysodium==0.7.12
+PyYAML==6.0
+resolvelib==0.5.4