|
1 |
| -## infrastructure |
| 1 | +## Infrastructure |
2 | 2 |
|
3 |
| -infrastructure-as-code lab, hosting my personal projects |
| 3 | +Infrastructure-as-code lab, hosting my personal projects |
| 4 | + |
| 5 | +## getting started |
| 6 | + |
| 7 | +Insall ansible |
| 8 | + |
| 9 | +```bash |
| 10 | +python3 -m pip install --user ansible |
| 11 | +``` |
| 12 | + |
| 13 | +Configure the machine ip in `inventory.yml`. You must set it both in |
| 14 | +`virtualmachines` and `virtualmachines_INITIAL`, which is the initial way |
| 15 | +ssh access is configured, that the first ansible playbook will change |
| 16 | + |
| 17 | +Test that the INITIAL machines are accessible |
| 18 | + |
| 19 | +```bash |
| 20 | +ansible virtualmachines_INITIAL -m ping -i inventory.yml |
| 21 | +``` |
| 22 | + |
| 23 | +### Roadmap |
| 24 | + |
| 25 | +#### provisioning |
| 26 | + |
| 27 | +The ubuntu machine provisioning will be handled manually. I don't need fancy stuff |
| 28 | + |
| 29 | +#### machine |
| 30 | + |
| 31 | +write ansible files to configure the host ubuntu machine. |
| 32 | + |
| 33 | +Initial step (INITIAL host,port=22,user=root): add ansible user, change ssh port |
| 34 | + |
| 35 | +all other steps (host, port=xxxx,user=ansible) |
| 36 | +- remove root login |
| 37 | +- add "al" user, define keys, docker group |
| 38 | +- install docker |
| 39 | +- install database |
| 40 | + |
| 41 | + |
| 42 | +#### References |
| 43 | + |
| 44 | +https://docs.ansible.com/ansible/latest/getting_started/index.html |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +### Old roadmap |
| 50 | + |
| 51 | +#### k8s files |
| 52 | + |
| 53 | +define all the k8s infrastructure in a reproducible way: |
| 54 | + |
| 55 | +- introspection services, grafana, loki, prometheus. |
| 56 | +- analytics |
| 57 | +- database web management (to find, something like phpmyadmin but serious) |
| 58 | +- argocd |
| 59 | +- secrets management |
| 60 | +- secrets management integrated into argo (i put a link to a tutorial in telegram) |
| 61 | + |
| 62 | + |
| 63 | +The idea is that all the personal projects will be managed via argo, secrets and databases will be configured manually from the respective admin panels. |
| 64 | + |
| 65 | +The rest of the stuff on the cluster, such as the admin interfaces, argo, grafana etch will be defined in this repository. |
| 66 | +Ideally, the charts and manifests in this repo should be managed via terraform. |
| 67 | + |
| 68 | +#### machine |
| 69 | + |
| 70 | +write ansible files to configure the host ubuntu machine. |
| 71 | + |
| 72 | +- define ssh users and keys |
| 73 | +- install mariadb |
| 74 | +- install k3s |
| 75 | + |
| 76 | +the idea is that mariadb (an other future databases) will be installed outside of k3s, but on the same machine, listening on the loopback interface. The access will be provided via a Service in the namespace external-services |
| 77 | + |
| 78 | + |
| 79 | +#### provisioning |
| 80 | + |
| 81 | +The ubuntu machine provisioning will be handled manually. I don't need fancy stuff |
0 commit comments