aboutsummaryrefslogtreecommitdiffstats
path: root/inventory/README.md
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2023-02-08 23:21:14 +0400
committerGravatar GitHub <[email protected]>2023-02-08 19:21:14 +0000
commitbe393aeab0e27fa28d033ad6a687f58e35fe4e79 (patch)
treee123d1ec2140ba932a903ff6292a7879db4c3bbe /inventory/README.md
parentAdd MOTD and sudo lecture roles (#76) (diff)
Update & Deploy Kubespray (#77)
* Move Kubespray Inventory Move the kuberspray inventory to the repo root to make accessing it easier, and unify inventories. * Document Kubespray Deploy Instructions Signed-off-by: Hassan Abouelela <[email protected]> * Ignore Kubespray In Ansible Lint Signed-off-by: Hassan Abouelela <[email protected]> * Fix Ansible Lint The `.github` folder was inappropriately being included in linting due to actions being in yaml format. Signed-off-by: Hassan Abouelela <[email protected]> --------- Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'inventory/README.md')
-rw-r--r--inventory/README.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/inventory/README.md b/inventory/README.md
new file mode 100644
index 0000000..0c621b7
--- /dev/null
+++ b/inventory/README.md
@@ -0,0 +1,36 @@
+# Inventory
+The main inventory for the pydis cluster, including configuration for kubespray.
+
+## Content
+- `group_vars`: Configuration variables for kubespray in various contexts.
+This directory is not covered by ansible-lint, and should generally not be used to add new configuration.
+Instead, that should be placed appropriately within the project as normal.
+- `patches`
+- `hosts.yaml`: The main hosts file for our infrastructure.
+
+## Deployment
+To deploy the kuberspray roles on our infrastructure, run the following commands in the root directory.
+
+### Environment
+Run the following commands, then enter your sudo password in the file that opens:
+
+```shell
+python3.10 -m venv venv
+source venv/bin/activate
+pip install -r kubespray/requirements-2.12.txt
+export ANSIBLE_CONFIG=ansible.cfg
+```
+
+### Deployment
+Enter your username into the command below, and run (this will take a while, so go grab a drink):
+
+```
+ansible-playbook kubespray/cluster.yml -v -u <user>
+```
+
+One useful argument for the command above is `--become-password-file`
+which should point to a file with your sudo password for seamless execution.
+
+Additionally, you may find it helpful to pre-configure all hosts in known_hosts
+to prevent the prompt from timing out during execution. This can be achieved by SSHing
+into the machines beforehand, or running an ad-hoc command and confirming all hosts.