moved templates
This commit is contained in:
8
10-sno-hub-cluster/templates/matchbox/groups.tf.j2
Normal file
8
10-sno-hub-cluster/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
10-sno-hub-cluster/templates/matchbox/profiles.tf.j2
Normal file
16
10-sno-hub-cluster/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
10-sno-hub-cluster/templates/matchbox/provider.tf.j2
Normal file
20
10-sno-hub-cluster/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: AgentConfig
|
||||
metadata:
|
||||
name: {{ group_vars['hub-cluster'].cluster_name }}
|
||||
rendezvousIP: {{ hostvars['ocp-hub'].ip_address }}
|
||||
bootArtifactsBaseURL: https://matchbox.int.mk-labs.cloud:8080/assets/hub/
|
||||
hosts:
|
||||
- hostname: {{ hostvars['ocp-hub'].hostname }}
|
||||
role: master
|
||||
interfaces:
|
||||
- name: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
macAddress: {{ hostvars['ocp-hub'].mac_address }}
|
||||
networkConfig:
|
||||
interfaces:
|
||||
- name: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
type: ethernet
|
||||
state: up
|
||||
identifier: mac-address
|
||||
mac-address: {{ hostvars['ocp-hub'].mac_address }}
|
||||
ipv4:
|
||||
enabled: true
|
||||
dhcp: true
|
||||
dns-resolver:
|
||||
config:
|
||||
server:
|
||||
- 10.1.71.254
|
||||
- 10.1.71.253
|
||||
routes:
|
||||
config:
|
||||
- destination: 0.0.0.0/0
|
||||
next-hop-address: 10.1.71.1
|
||||
next-hop-interface: {{ hostvars['ocp-hub'].primary_interface }}
|
||||
table-id: 254
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
baseDomain: {{ group_vars['hub-cluster'].base_domain }}
|
||||
compute:
|
||||
- name: worker
|
||||
replicas: {{ group_vars['hub-cluster'].worker_node_count }}
|
||||
controlPlane:
|
||||
hyperthreading: Enabled
|
||||
name: master
|
||||
replicas: {{ master_node_count }}
|
||||
metadata:
|
||||
name: {{ group_vars['hub-cluster'].cluster_name }}
|
||||
networking:
|
||||
clusterNetwork:
|
||||
- cidr: {{ group_vars['hub-cluster'].cluster_network }}
|
||||
hostPrefix: {{ group_vars['hub-cluster'].cluster_network_host_prefix }}
|
||||
machineNetwork:
|
||||
- cidr: {{ group_vars['hub-cluster'].machine_network }}
|
||||
networkType: OVNKubernetes
|
||||
serviceNetwork:
|
||||
- {{ group_vars['hub-cluster'].service_network }}
|
||||
platform:
|
||||
{{ group_vars['hub-cluster'].platform_type }}: {}
|
||||
fips: false
|
||||
pullSecret: {{ vault_pull_secret }}
|
||||
sshKey: {{ vault_ssh_key }}
|
||||
Reference in New Issue
Block a user