{"id":24886834,"url":"https://github.com/thomas-mauran/openstack-tf","last_synced_at":"2025-03-27T10:27:57.979Z","repository":{"id":273099342,"uuid":"917772765","full_name":"thomas-mauran/openstack-tf","owner":"thomas-mauran","description":"Terraform git ops openstack + argocd infra","archived":false,"fork":false,"pushed_at":"2025-02-02T18:13:48.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T19:19:40.767Z","etag":null,"topics":["argocd","openstack","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomas-mauran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-16T16:08:38.000Z","updated_at":"2025-02-02T18:13:51.000Z","dependencies_parsed_at":"2025-01-18T17:34:18.567Z","dependency_job_id":"a63fa650-31a6-465d-b4a4-1a86d931e588","html_url":"https://github.com/thomas-mauran/openstack-tf","commit_stats":null,"previous_names":["thomas-mauran/openstack-tf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-mauran%2Fopenstack-tf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-mauran%2Fopenstack-tf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-mauran%2Fopenstack-tf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-mauran%2Fopenstack-tf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomas-mauran","download_url":"https://codeload.github.com/thomas-mauran/openstack-tf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245825796,"owners_count":20678650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","openstack","terraform"],"created_at":"2025-02-01T15:16:49.424Z","updated_at":"2025-03-27T10:27:57.957Z","avatar_url":"https://github.com/thomas-mauran.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform TP\n\nThe goal here is to familiarize ourselves with Terraform to declare and manage infrastructure as code.\n\nThe deployed infrastructure will be a RKE2 cluster with a master and 2 workers nodes with an argocd application deployed on it.\n\n## Prerequisites\n\n- [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli)\n\n\n### Terraform\n\n#### How to run it\n\n```\nsource \u003copenrc file\u003e\ncd terraform\nterraform apply\n```\n\n\nThis will take a long time go take a break ...\n\n3 modules are created, to run the commands you need to go modify the compute.auto.tfvars.example file with your own values.\n\nthen terraform apply, make sure you sourced the openrc file before running the terraform commands.\n\n\nBasically we are creating 3 instances then we are using cloud init ansible method to deploy the rke2 cluster on the 3 instances. Once the cluster is created we add argocd to the cluster, \ncreate a new project with the app we want to deploy, here [this one](https://github.com/thomas-mauran/kanas)\n\n\n```mermaid\ngraph TD\n    A[Create instances] --\u003e B[Deploy RKE2 cluster]\n    B --\u003e C[Add argocd to the cluster]\n    C --\u003e D[Create a new project]\n    D --\u003e E[Deploy the app]\n```\n\n![alt text](./assets/result_get_nodes.png)\n\n\n### Argocd\n\nIt is available on the master node port 30670\n\n[here](https://162.38.112.24:30670/login?return_url=https%3A%2F%2F162.38.112.24%3A30670%2Fapplications)\n\nThe credentials are admin and the password you set in tf\n\n### Ansible deploy a simple pod\n\nSimple exercice to just deploy a vm in openstack (not tf related)\n\n```bash\nansible-galaxy collection install openstack.cloud\n```\n\nto apply the ansible config\n\nansible-playbook -vvv ansible/ansible-create-os-instance/create_os_vm.yml   \n\n### Heat\n\nThe heat file is available [here](./heat.yaml)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-mauran%2Fopenstack-tf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-mauran%2Fopenstack-tf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-mauran%2Fopenstack-tf/lists"}