Skip to content

fjcloud/terraform-microshift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Florian Jacquin
Dec 14, 2022
32579e6 · Dec 14, 2022

History

19 Commits
Sep 21, 2022
Sep 21, 2022
Dec 14, 2022
Dec 14, 2022
Sep 21, 2022
Aug 8, 2022

Repository files navigation

Deploy microshift with terraform

This collections of playbooks/HCL files will permits you to deploy easily microshift on a cloud provider

Requirements

  • Ansible >= 2.10
  • Terraform >= 1.2.6
  • oc >= 4.8
  • podman >= 4.1.1
  • libvirt >= 8.0.0
  • jq
$ ansible-galaxy install -r requirements.yml

Deployment on Hetzner

Export HCLOUD_TOKEN

$ export HCLOUD_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx

Deploy microshift

$ ansible-playbook deploy_microshift.yml -e provider=hetzner

Deployment on libvirt

Download Fedora CoreOS

$ FCOS_URL=$(curl -s https://builds.coreos.fedoraproject.org/streams/stable.json | jq -r '.architectures.x86_64.artifacts.qemu.formats."qcow2.xz"'.disk.location)
$ curl -s ${FCOS_URL} | xzcat > fcos-latest.qcow2

Deploy microshift

$ ansible-playbook deploy_microshift.yml -e provider=libvirt

General Config

Export KUBECONFIG

$ export KUBECONFIG=../kubeconfig

Validate deployment

$ oc get po -A

Pods should all be in Running state

Delete Microshift instance

$ ansible-playbook deploy_microshift.yml -e tf_state=absent -e provider=<provider>