{"id":22125696,"url":"https://github.com/qjoly/pulumi-kubernetes-openstack","last_synced_at":"2026-04-09T08:47:56.366Z","repository":{"id":232744893,"uuid":"784690042","full_name":"qjoly/pulumi-kubernetes-openstack","owner":"qjoly","description":"Simple example to deploy nodes for a Kubernetes cluster on Openstack using Pulumi","archived":false,"fork":false,"pushed_at":"2025-02-12T23:36:51.000Z","size":39,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T19:56:43.436Z","etag":null,"topics":["kubernetes","openstack","pulumi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qjoly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-04-10T11:06:14.000Z","updated_at":"2024-07-26T09:36:54.000Z","dependencies_parsed_at":"2024-10-18T15:16:01.924Z","dependency_job_id":"62dfd937-06d9-4d96-8c9f-ab4971ac7487","html_url":"https://github.com/qjoly/pulumi-kubernetes-openstack","commit_stats":null,"previous_names":["qjoly/pulumi-kubernetes-openstack"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qjoly%2Fpulumi-kubernetes-openstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qjoly%2Fpulumi-kubernetes-openstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qjoly%2Fpulumi-kubernetes-openstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qjoly%2Fpulumi-kubernetes-openstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qjoly","download_url":"https://codeload.github.com/qjoly/pulumi-kubernetes-openstack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245232886,"owners_count":20581701,"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":["kubernetes","openstack","pulumi","python"],"created_at":"2024-12-01T16:37:13.237Z","updated_at":"2026-04-09T08:47:51.328Z","avatar_url":"https://github.com/qjoly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://avatars.githubusercontent.com/u/82603435?v=4\" width=\"140px\" alt=\"Helm LOGO\"/\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  [![Blog](https://img.shields.io/badge/Blog-blue?style=for-the-badge\u0026logo=buymeacoffee\u0026logoColor=white)](https://une-tasse-de.cafe/)\n  [![Pulumi](https://img.shields.io/badge/Pulumi-8A3391?style=for-the-badge\u0026logo=pulumi\u0026logoColor=white)](https://www.pulumi.com/)\n  [![Kubernetes](https://img.shields.io/badge/Kubernetes-326CE5?style=for-the-badge\u0026logo=kubernetes\u0026logoColor=white)](https://kubernetes.io/)\n  [![Openstack](https://img.shields.io/badge/Openstack-%23f01742.svg?style=for-the-badge\u0026logo=openstack\u0026logoColor=white)](https://www.openstack.org/)\n\n\u003c/div\u003e\n\n## Pulumi Kubernetes Openstack Example\n\nThis example demonstrates how to deploy nodes for a Kubernetes cluster on Openstack using Pulumi.\n\nNote: By default, the values in the `Pulumi.yaml` use Infomaniak Openstack. You can change the values in the `Pulumi.yaml` file to match your Openstack configuration.\n\n### Prerequisites\n\n1. [Install Pulumi](https://www.pulumi.com/docs/get-started/install/)\n2. [Install Python3](https://www.python.org/downloads/)\n3. Create a virtual environment:\n```bash\npython3 -m venv venv\n```\n4. Install the required Python packages:\n```bash\npython3 -m pip install -r requirements.txt\n```\n\n### Running the Example\n\nLogin to your openstack account (horizon) and source the openstack rc file:\n```bash\nsource openstack.rc\n```\n\nCreate a new project using this template:\n```bash\npulumi new https://github.com/qjoly/pulumi-kubernetes-openstack/tree/main\n```\n\nRun the pulumi program:\n```bash\npulumi up\n```\n\n### Install Kubernetes cluster\n\nExport the private key that can be used to connect to the nodes:\n\n```bash\npulumi stack output nodes_keypair --show-secrets \u003e nodes_keypair.pem\n```\n\nSend it to the admin node:\n\n```bash\nscp nodes_keypair.pem debian@$(pulumi stack output admin_external_ip):.ssh/id_rsa\nssh debian@$(pulumi stack output admin_external_ip) chmod 600 .ssh/id_rsa\n```\n\n*:warning: Note that you have to set the pulumi config passphrase to access content of the private key.*\n\nGenerate the inventory file:\n\n```bash\npulumi stack output ip_addresses --json | python3 generate_inventory.py \u003e inventory.ini\nscp inventory.ini debian@$(pulumi stack output admin_external_ip):./inventory.ini\n```\n\nOn the admin node, Create a virtual environment and install the required packages:\n\n```bash\nssh debian@$(pulumi stack output admin_external_ip)\ngit clone https://github.com/kubernetes-sigs/kubespray \u0026\u0026 cd kubespray\ncp -r inventory/sample/ ./inventory/pulumi-cluster\ncp ~/inventory.ini ./inventory/pulumi-cluster/inventory.ini\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n```bash\nansible-playbook -i ./inventory/pulumi-cluster/inventory.ini -u debian --become --become-user=root cluster.yml\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll in one script\u003c/summary\u003e\n\n:warning: Only run this script if you are sure of what you are doing. :warning:\n\n```bash\npulumi stack output nodes_keypair --show-secrets \u003e nodes_keypair.pem\nscp nodes_keypair.pem debian@$(pulumi stack output admin_external_ip):.ssh/id_rsa\nssh debian@$(pulumi stack output admin_external_ip) chmod 600 .ssh/id_rsa\npulumi stack output ip_addresses --json | python3 generate_inventory.py \u003e inventory.ini\nscp inventory.ini debian@$(pulumi stack output admin_external_ip):./inventory.ini\nssh debian@$(pulumi stack output admin_external_ip) \\ '\n  git clone https://github.com/kubernetes-sigs/kubespray \u0026\u0026 cd kubespray \u0026\u0026 \\\n  cp -r inventory/sample/ ./inventory/pulumi-cluster \u0026\u0026 \\\n  cp ~/inventory.ini ./inventory/pulumi-cluster/inventory.ini \u0026\u0026 \\\n  python3 -m venv venv \u0026\u0026 \\\n  source venv/bin/activate \u0026\u0026 \\\n  pip install -r requirements.txt \u0026\u0026 \\\n  ansible-playbook -i ./inventory/pulumi-cluster/inventory.ini -u debian --become --become-user=root cluster.yml'\n\nCP_IP=$(pulumi stack output 'ip_addresses' | jq -r '.\"kube-controlplane\"[0]')\nssh debian@$(pulumi stack output admin_external_ip) \"ssh-keyscan -H $CP_IP \u003e\u003e ~/.ssh/known_hosts \u0026\u0026 mkdir -p .kube \u0026\u0026 ssh $CP_IP sudo cat /root/.kube/config \u003e .kube/config \u0026\u0026 sed -i 's/127.0.0.1/$CP_IP/g' ~/.kube/config \u0026\u0026 chmod 600 .kube/config \u0026\u0026 echo 'Done'\"\n```\n\n\u003c/details\u003e\n\n### Output of the Pulumi program\n\n\u003ca href=\"https://asciinema.org/a/P9JDxnpB8zNKDE7XHO9OOMBvD\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/P9JDxnpB8zNKDE7XHO9OOMBvD.svg\" /\u003e\u003c/a\u003e\n\n\n:warning: Note that the output of the pulumi program will be different as the resources are created dynamically.\n\n### Destroy the resources\n\nTo destroy the resources created by the Pulumi program, run the following command:\n\n```bash\npulumi destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqjoly%2Fpulumi-kubernetes-openstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqjoly%2Fpulumi-kubernetes-openstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqjoly%2Fpulumi-kubernetes-openstack/lists"}