Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions agent/06_agent_create_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ function wait_for_cluster_ready() {
exit 1
fi

if [ "${AGENT_WAIT_FOR_INSTALL_COMPLETE}" == "false" ]; then
echo "Skipping agent wait-for install-complete"
exit 0
fi

echo "Waiting for cluster ready... "
"${openshift_install}" --dir="${dir}" --log-level=debug agent wait-for install-complete 2>&1 | grep --line-buffered -v 'password'
if [ ${PIPESTATUS[0]} != 0 ]; then
Expand Down
8 changes: 7 additions & 1 deletion agent/roles/manifests/tasks/install-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@
template:
src: "templates/install-config_yaml.j2"
dest: "{{ install_path }}/install-config.yaml"
when: platform_type != "baremetal"
when: platform_type != "baremetal" and platform_type != "vsphere"

- name: write the install-config.yaml
template:
src: "templates/install-config_baremetal_yaml.j2"
dest: "{{ install_path }}/install-config.yaml"
when: platform_type == "baremetal"

- name: write the install-config.yaml
template:
src: "templates/install-config_vsphere_yaml.j2"
dest: "{{ install_path }}/install-config.yaml"
when: platform_type == "vsphere"
Comment thread
rwsu marked this conversation as resolved.

- name: write the agent-config.yaml
template:
src: "agent-config_yaml.j2"
Expand Down
99 changes: 99 additions & 0 deletions agent/roles/manifests/templates/install-config_vsphere_yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: v1
baseDomain: {{ base_domain }}
compute:
- hyperthreading: Enabled
name: worker
replicas: {{ num_workers }}
architecture: {{ goCPUArchitecture }}
controlPlane:
architecture: {{ goCPUArchitecture }}
hyperthreading: Enabled
name: master
replicas: {{ num_masters }}
fips: {{ fips_mode }}
metadata:
name: {{ cluster_name }}
{% if boot_mode != "DISKIMAGE" %}
namespace: {{ cluster_namespace }}
{% endif %}
networking:
{% if ip_stack == "v4" %}
clusterNetwork:
- cidr: {{ cluster_subnet_v4 }}
hostPrefix: {{ cluster_host_prefix_v4 }}
machineNetwork:
- cidr: {{ external_subnet_v4 }}
serviceNetwork:
- {{ service_subnet_v4 }}
{% elif ip_stack == "v6" %}
clusterNetwork:
- cidr: {{ cluster_subnet_v6 }}
hostPrefix: {{ cluster_host_prefix_v6 }}
machineNetwork:
- cidr: {{ external_subnet_v6 }}
serviceNetwork:
- {{ service_subnet_v6 }}
{% else %}
clusterNetwork:
- cidr: {{ cluster_subnet_v4 }}
hostPrefix: {{ cluster_host_prefix_v4 }}
- cidr: {{ cluster_subnet_v6 }}
hostPrefix: {{ cluster_host_prefix_v6 }}
machineNetwork:
- cidr: {{ external_subnet_v4 }}
- cidr: {{ external_subnet_v6 }}
serviceNetwork:
- {{ service_subnet_v4 }}
- {{ service_subnet_v6 }}
{% endif %}
networkType: {{ network_type }}
platform:
vsphere:
vcenters:
- datacenters:
- testDatacenter
password: testPassword
server: vcenter.test.com
user: testUser@vcenter.test.com
failuredomains:
- name: test-failure-baseDomain
server: vcenter.test.com
region: testRegion
topology:
datacenter: testDatacenter
datastore: /testDatacenter/datastore/testDatastore
computeCluster: /testDatacenter/host/testClusters
folder: /testDatacenter/vm/testFolder
networks:
- testNetwork
zone: testZone
apiVIPs:
{% set a_vips = api_vips.split(',') %}
{% for api_vip in a_vips %}
- {{ api_vip }}
{% endfor %}
ingressVIPs:
{% set i_vips = ingress_vips.split(',') %}
{% for ingress_vip in i_vips %}
- {{ ingress_vip }}
{% endfor %}
pullSecret: {{ pull_secret_contents }}
sshKey: {{ ssh_pub_key }}
{% if mirror_images %}
imageContentSources:
{{ image_content_sources }}
{% if (mirror_command == "oc-mirror") and (agent_deploy_mce == "true") %}
- mirrors:
- "{{ local_registry_dns_name }}:{{ local_registry_port }}/multicluster-engine"
source: "registry.redhat.io/multicluster-engine"
- mirrors:
- "{{ local_registry_dns_name }}:{{ local_registry_port }}/rhel8"
source: "registry.redhat.io/rhel8"
- mirrors:
- "{{ local_registry_dns_name }}:{{ local_registry_port }}/redhat"
source: "registry.redhat.io/redhat"
{% endif %}
additionalTrustBundle: {{ ca_bundle_crt }}
{% elif enable_local_registry %}
additionalTrustBundle: {{ registry_certificate }}
{% endif %}
3 changes: 3 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ export ENABLE_LOCAL_REGISTRY=${ENABLE_LOCAL_REGISTRY:-}
# Defaults the DISABLE_MULTICAST variable
export DISABLE_MULTICAST=${DISABLE_MULTICAST:-false}

# Defaults the AGENT_WAIT_FOR_INSTALL_COMPLETE variable
export AGENT_WAIT_FOR_INSTALL_COMPLETE=${AGENT_WAIT_FOR_INSTALL_COMPLETE:-true}

# Agent specific configuration

function invalidAgentValue() {
Expand Down
8 changes: 7 additions & 1 deletion config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ set -x
# for the cluster image-registry
# export PERSISTENT_IMAGEREG=true


################################################################################
## Network Settings
##
Expand Down Expand Up @@ -805,6 +804,13 @@ set -x
# agent-config.yaml.
# export AGENT_BM_HOSTS_IN_INSTALL_CONFIG=false

# AGENT_WAIT_FOR_INSTALL_COMPLETE
# Default: true
#
# Setting this to false skips the "wait-for install-complete" step.
#
# export AGENT_WAIT_FOR_INSTALL_COMPLETE=false

# Image reference for OpenShift-based Appliance Builder.
# See: https://github.com/openshift/appliance
# Default: "quay.io/edge-infrastructure/openshift-appliance:latest"
Expand Down