All configuration needed for development setup is in the Makefile.
make setup-dev
Ansible is installed via Poetry. (this is done automatically in VS Code)
source .venv/bin/activate
Secrets are stored in vault. We use the hashi_vault module to access those secrets.
You must have a valid token stored in the VAULT_TOKEN
variable, run these commands before running any of
the below commands:
vault login -method=userpass username=ansible
export VAULT_TOKEN=$(cat ~/.vault-token)
ansible-playbook site.yaml
In this case, we limit the run to nodes in the k8s2 group
ansible-playbook site.yaml -l k8s2
NOTE: If you find that some of the nodes are not properly rebuilding, try resetting the iSCSI service on the TrueNas server.
```bash
ansible-playbook kubernetes/full_rebuild.yaml --extra-vars "cluster=k8s1"
- It's likely a good idea to update the template node first
- Open Virtual Box, start
server.template
- Login and run
apt-get update && apt-get upgrade
- Open Virtual Box, start
- Delete the old test environment
./delete_test_env.sh
- Create the new test environment
./create_test_env.sh
- Bootstrap ansible
ansible-playbook bootstrap/test-bootstrap.yaml -i test-inventory.yaml --extra-vars "cluster=k8stest"
- Install the latest playbooks
ansible-playbook site.yaml -i test-inventory.yaml
cd ~/code/sig-storage-local-static-provisioner
git pull
helm template ./helm/provisioner -f ./helm/provisioner/values.yaml --namespace pv-provisioner > ~/code/ansible/roles/prod_services/files/provisioner-generated.yaml