{"id":19308769,"url":"https://github.com/mtulio/ansible-collection-okd-installer","last_synced_at":"2025-07-15T20:46:41.848Z","repository":{"id":41254162,"uuid":"508518178","full_name":"mtulio/ansible-collection-okd-installer","owner":"mtulio","description":"Ansible Collection for OKD Installation","archived":false,"fork":false,"pushed_at":"2023-10-24T15:58:12.000Z","size":526,"stargazers_count":1,"open_issues_count":11,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-10T00:02:18.925Z","etag":null,"topics":["ansible","automation","kubernetes","okd","openshift"],"latest_commit_sha":null,"homepage":"https://mtulio.github.io/ansible-collection-okd-installer/","language":"Makefile","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/mtulio.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}},"created_at":"2022-06-29T02:21:54.000Z","updated_at":"2023-04-30T05:18:38.000Z","dependencies_parsed_at":"2023-10-21T18:23:45.701Z","dependency_job_id":null,"html_url":"https://github.com/mtulio/ansible-collection-okd-installer","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-collection-okd-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-collection-okd-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-collection-okd-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fansible-collection-okd-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtulio","download_url":"https://codeload.github.com/mtulio/ansible-collection-okd-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223896808,"owners_count":17221475,"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":["ansible","automation","kubernetes","okd","openshift"],"created_at":"2024-11-10T00:16:24.014Z","updated_at":"2024-11-10T00:16:24.765Z","avatar_url":"https://github.com/mtulio.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection okd_installer\n\n[![Project Status: WIP – Initial development is in progress, it is not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![](https://github.com/mtulio/ansible-collection-okd-installer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mtulio/ansible-collection-okd-installer/actions/workflows/ci.yml)\n[![](https://img.shields.io/ansible/collection/1867)](https://galaxy.ansible.com/mtulio/okd_installer)\n\nAnsible Collection to install OKD clusters.\n\nThe okd_install Ansible Collection was designed to be distributed and easier to implement and deploy infrastructure resources required for OKD Installation, reusing the existing resources (modules and roles) from the Ansible community, implementing only the OKD specific roles, packaging together all necessary dependencies (external Roles).\n\nThe infrastructure provisioning is distributed into 'Stacks'. The Playbooks orchestrate each Stack provisioning by sending the correct embeded/user-provided variables to the Ansible Roles, which interacts with Cloud Provider API through oficial Ansible Modules. In general there is one Ansible Role for each stack. The Ansible Roles for Infrastructure Stacks are not OKD specific, so it can be reused in other projects like BYO Cloud IaC, making it maintained by Ansible community builders. The 'topologies' for each Ansbile Role are defined as variables included on OKD Ansible Collection to satisfy valid cluster topologies.\n\nFor example, these components are used on the Network Stack to provision the VPC on AWS:\n\n- Ansible Playbook `playbooks/stack_network.yaml` implements the orchestration to create the VPC and required resources (Subnets, Nat and Internet Gateways, security groups, etc), then calls the Ansible Role `cloud_network`\n- Var file `playbooks/vars/aws/network.yaml`: Defines the topology of the Network declaring the variable `cloud_networks` (required by role `cloud_network`). Can be replaced when setting `var_file`\n- Ansible Role `cloud_network`: Resolve the dependencies and create the resources using community/vendor Ansible Modules, according the `cloud_networks` variable. The [Ansible Role `cloud_network`](https://github.com/mtulio/ansible-role-cloud-network) is an external role.\n- Ansible Modules from Community/Vendor: it is distributed as Collection. For AWS the community.aws and amazon.aws are used inside the Ansible Role `cloud_network`\n\n## Content\n\nThat collection distribute a set of Ansible Roles and Playbooks used to provision the OKD cluster on specific Platform. Some of resources are managed in an external repository to keep it reusable, easy to maintain, and improve. The external resources are included as Git modules and updated once it needed (is validated).\n\n### Roles\n\nExternal Roles (included as Git modules/fixed version):\n\n- [cloud_compute](https://github.com/mtulio/ansible-role-cloud-compute): Manage Compute resources\n- [cloud_network](https://github.com/mtulio/ansible-role-cloud-network): Manage networks/VPCs\n- [cloud_iam](https://github.com/mtulio/ansible-role-cloud-iam): Manage Cloud identities\n- [cloud_load_balancer](https://github.com/mtulio/ansible-role-cloud-load-balancer): Manage Load Balancers\n- [cloud_dns](https://github.com/mtulio/ansible-role-cloud-dns): Manage DNS Domains on the Cloud Providers\n\nInternal Roles:\n\n- [bootstrap](https://github.com/mtulio/ansible-collection-okd-installer/tree/main/roles/bootstrap): Setup bootstrap dependencies, like uploading ignition to a blob storage to be used on bootstrap's node user-data.\n- [okd_cluster_destroy](https://github.com/mtulio/ansible-collection-okd-installer/tree/main/roles/okd_cluster_destroy): Destroy the cluster for a given provider\n- [clients](https://github.com/mtulio/ansible-collection-okd-installer/tree/main/roles/clients): Install openshift clients used by the playbooks. Some tools installed is: openshift-install, oc, ccoctl, etc\n- [config](https://github.com/mtulio/ansible-collection-okd-installer/tree/main/roles/config): Generate Install config and ignition files based on the desired cluster setup\n- [csr_approver](https://github.com/mtulio/ansible-collection-okd-installer/tree/main/roles/csr_approver): Approve the CSRs from compute nodes (a.k.a: workers)\n\n### Playbooks\n\nPlaybooks distributed on this Ansible Collection:\n\n- playbooks/install_clients.yaml\n- playbooks/config.yaml\n- playbooks/stack_network.yaml\n- playbooks/stack_iam.yaml\n- playbooks/stack_dns.yaml\n- playbooks/stack_loadbalancer.yaml\n- playbooks/create_node.yaml\n- playbooks/create_node_all.yaml\n- playbooks/create_all.yaml\n- playbooks/approve_certs.yaml\n- playbooks/destroy_cluster.yaml\n- playbooks/destroy_bootstrap.yaml\n- playbooks/ping.yaml\n\n## Supported Cloud Platforms\n\nSupported Cloud Platforms* and installation types:\n\n| Platform/Install Type | IPI | UPI | Agnostic** |\n| -- | -- | -- | -- |\n| AWS | No | Yes | Yes |\n| Azure | No | No | No |\n| GCP | No | No | No |\n| AlibabaCloud | No | No | No |\n\u003c!-- | DigitalOcean | N/A | N/A | Init |\n| Vultr | N/A | N/A | No |\n| Ionos | N/A | N/A | No | --\u003e\n\n\n*To okd-installer Collection support a cloud provider, the stacks should be defined and the collection should be tested. The focus on okd-installer collection will provide flexibility to customize infrastructure in OKD supported and non-supported providers. If you would a fully automated installation you can use the installer (`openshift-install`) directly.\n\n**Agnostic installation means that OKD there's no native integration with the Platform (config `platform.None: {}`). `None` means there is playbooks to create the infrastrucutre resources to install OCP/OKD on the Cloud Provider, but no native integration with the platform will be available on the OKD, which means every controller to interact with the Cloud Resource should be added separatelly.\n\nWe will add a guide to describe how to integrate a new provider by defining the playbooks to create the resource/stacks, calling it from okd-installer Collection. The basic requirement is to have the Ansible Modules publicaly available, some examples: [AWS](https://docs.ansible.com/ansible/latest/collections/community/aws/index.html), [GCP](https://docs.ansible.com/ansible/latest/collections/community/google/index.html), [Azure](https://docs.ansible.com/ansible/latest/collections/azure/azcollection/index.html), [IBM Cloud](https://github.com/IBM-Cloud/ansible-collection-ibm) [VMWare](https://docs.ansible.com/ansible/latest/collections/vmware/vmware_rest/index.html#plugins-in-vmware-vmware-rest), [Digital Ocean](https://docs.ansible.com/ansible/latest/collections/community/digitalocean/index.html), [Vultr](https://docs.ansible.com/ansible/latest/collections/vultr/cloud/index.html#plugins-in-vultr-cloud), [HetznerCloud](https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud/index.html#plugins-in-hetzner-hcloud), [AlibabaCloud](https://docs.ansible.com/ansible/latest/scenario_guides/guide_alicloud.html), [HuaweiCloud](https://github.com/huaweicloud/huaweicloud-ansible-modules), [OracleCloud](https://docs.oracle.com/en-us/iaas/tools/oci-ansible-collection/4.6.0/) etc.\n\n## Usage\n\nQuick start:\n\n- Install the okd-installer Collection\n\n\u003e Navigate to the [Collection page](https://galaxy.ansible.com/mtulio/okd_installer) to change the version.\n\n~~~\nansible-galaxy collection install mtulio.okd_installer:=0.1.0-beta4\n~~~\n\n- Install the OKD/OCP clients: oc and openshift-install\n\n~~~\nansible-playbook mtulio.okd_installer.install_clients -e version=4.11.4\n~~~\n\n- Export the env vars to create a OKD cluster in AWS with agnostic integraion (platform=none)\n\n~~~bash\nCLUSTER_NAME=\"aws-none\"\ncat \u003c\u003cEOF\u003e ./.env-${CLUSTER_NAME}\nexport CONFIG_CLUSTER_NAME=${CLUSTER_NAME}\nexport CONFIG_PROVIDER=aws\nexport CONFIG_CLUSTER_REGION=us-east-1\nexport CONFIG_PLATFORM=none\nexport CONFIG_BASE_DOMAIN=devcluster.example.com\nexport CONFIG_PULL_SECRET_FILE=${HOME}/.openshift/pull-secret-latest.json\nexport CONFIG_SSH_KEY=\"$(cat ~/.ssh/id_rsa.pub)\"\nEOF\n\nsource ./.env-${CLUSTER_NAME}\n~~~\n\n- Generate the Install Config\n\n~~~bash\nansible-playbook mtulio.okd_installer.config \\\n    -e mode=create \\\n    -e cluster_name=${CONFIG_CLUSTER_NAME}\n~~~\n\n- Create a Cluster - installing all the Stacks (Network, IAM, DNS, Compute ...)\n\n\u003e All the resource/stacks will be created with Ansible, instead of `openshift-install` utility\n\n~~~bash\nansible-playbook mtulio.okd_installer.create_all \\\n    -e provider=${CONFIG_PROVIDER} \\\n    -e cluster_name=${CONFIG_CLUSTER_NAME} \\\n    -e certs_max_retries=20 \\\n    -e cert_wait_interval_sec=60\n~~~\n\n- Check the Cluster installation\n\n~~~bash\n~/.ansible/okd-installer/bin/openshift-install \\\n    wait-for install-complete \\\n    --dir ~/.ansible/okd-installer/clusters/${CONFIG_CLUSTER_NAME}/ \\\n    --log-level debug\n~~~\n\n- Explore your cluster\n\n~~~bash\nexport KUBECONFIG=~/.ansible/okd-installer/clusters/${CONFIG_CLUSTER_NAME}/auth/kubeconfig\n\noc get clusteroperators\n\n# Or use the CLI downloaed by the okd-installer\n~/.ansible/okd-installer/bin/oc get co\n~~~\n\n- Delete a Cluster\n\n~~~bash\nansible-playbook mtulio.okd_installer.destroy_cluster \\\n    -e provider=${CONFIG_PROVIDER} \\\n    -e cluster_name=${CONFIG_CLUSTER_NAME}\n~~~\n\n#### Read more the documentation\n\nThe Guides and Documentation are being created under the directoy [docs](./docs/README.md).\n\n## Contribute!\n\nYou can see the value and would like to contribute?! We are open to hearing from you.\n\nSee some items we need immediate contributions:\n\n- CI improvement: implement more tests; mock provider API; improve linter items\n- Documentation: Deployment documentation; Usage documentation\n- Examples: Implement example playbooks\n\nIf you would like to contribute to any other item not listed above, feel free to open an issue or a Pull request. =]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fansible-collection-okd-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtulio%2Fansible-collection-okd-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fansible-collection-okd-installer/lists"}