create templates for terraform files
This commit is contained in:
8
templates/matchbox/groups.tf.j2
Normal file
8
templates/matchbox/groups.tf.j2
Normal file
@@ -0,0 +1,8 @@
|
||||
// Matcher group for OCP Internal machines
|
||||
resource "matchbox_group" "{{hub_cluster_name}}" {
|
||||
name = "{{hub_cluster_hostname}}" # Physical Server
|
||||
profile = matchbox_profile.openshift-agent-install.name
|
||||
selector = {
|
||||
mac = "{{hub_cluster_mac_address}}" # PXE boots and installs to 10GbE NIC
|
||||
}
|
||||
}
|
||||
16
templates/matchbox/profiles.tf.j2
Normal file
16
templates/matchbox/profiles.tf.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
// Fedora CoreOS profile
|
||||
resource "matchbox_profile" "openshift-agent-install" {
|
||||
name = "{{ hub_cluster_name }}"
|
||||
kernel = "/assets/{{ hub_cluster_name }}/agent.x86_64-vmlinuz"
|
||||
initrd = [
|
||||
"--name initrd /assets/{{ hub_cluster_name }}/agent.x86_64-initrd.img"
|
||||
]
|
||||
|
||||
args = [
|
||||
"initrd=initrd",
|
||||
"coreos.live.rootfs_url={{ matchbox_http_endpoint }}/assets/{{ hub_cluster_name }}/agent.x86_64-rootfs.img",
|
||||
"rw",
|
||||
"ignition.firstboot",
|
||||
"ignition.platform.id=metal",
|
||||
]
|
||||
}
|
||||
20
templates/matchbox/provider.tf.j2
Normal file
20
templates/matchbox/provider.tf.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
// Configure the matchbox provider
|
||||
provider "matchbox" {
|
||||
endpoint = "{{ matchbox_rpc_endpoint }}"
|
||||
client_cert = file("/etc/matchbox/client.crt")
|
||||
client_key = file("/etc/matchbox/client.key")
|
||||
ca = file("/etc/matchbox/ca.crt")
|
||||
}
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
ct = {
|
||||
source = "poseidon/ct"
|
||||
version = "0.13.0"
|
||||
}
|
||||
matchbox = {
|
||||
source = "poseidon/matchbox"
|
||||
version = "0.5.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
25
templates/openshift-installer/install-config.yaml.j2
Normal file
25
templates/openshift-installer/install-config.yaml.j2
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
baseDomain: {{ base_domain }}
|
||||
compute:
|
||||
- name: worker
|
||||
replicas: {{ worker_node_count }}
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
name: master
|
||||
replicas: {{ master_node_count }}
|
||||
metadata:
|
||||
name: {{ cluster_name }}
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: {{ cluster_network }}
|
||||
hostPrefix: {{ cluster_network_host_prefix }}
|
||||
machineNetwork:
|
||||
- cidr: {{ machine_network }}
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- {{ service_network }}
|
||||
platform:
|
||||
{{ platform_type }}: {}
|
||||
fips: false
|
||||
pullSecret: {{ vault_pull_secret }}
|
||||
sshKey: {{ vault_ssh_key }}
|
||||
Reference in New Issue
Block a user