mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
Merge pull request #10176 from pawanpinjarkar/modify-hw-storage-requirements-for-ove
AGENT-1309: Modify NoRegistryClusterInstall storage requirements
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ASSISTED_SERVICE_ENV_FILE="/usr/local/share/assisted-service/assisted-service.env"
|
||||
# default value
|
||||
HW_VALIDATOR_REQUIREMENTS="[{\"version\":\"default\",\"master\":{\"cpu_cores\":4,\"ram_mib\":16384,\"disk_size_gb\":100,\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":100,\"packet_loss_percentage\":0},\"arbiter\":{\"cpu_cores\":2,\"ram_mib\":8192,\"disk_size_gb\":50,\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":1000,\"packet_loss_percentage\":0},\"worker\":{\"cpu_cores\":2,\"ram_mib\":8192,\"disk_size_gb\":100,\"installation_disk_speed_threshold_ms\":10,\"network_latency_threshold_ms\":1000,\"packet_loss_percentage\":10},\"sno\":{\"cpu_cores\":8,\"ram_mib\":16384,\"disk_size_gb\":100,\"installation_disk_speed_threshold_ms\":10}}]"
|
||||
|
||||
# Increase disk size requirements for NoRegistryClusterInstall
|
||||
if [ -f /etc/assisted/extra-manifests/internalreleaseimage.yaml ]; then
|
||||
# shellcheck disable=SC2001
|
||||
HW_VALIDATOR_REQUIREMENTS=$(echo "$HW_VALIDATOR_REQUIREMENTS" |sed 's/"disk_size_gb":[0-9]\+/"disk_size_gb":220/g')
|
||||
fi
|
||||
|
||||
# Replace the final value in the env file
|
||||
sed -i "s|^HW_VALIDATOR_REQUIREMENTS=.*|HW_VALIDATOR_REQUIREMENTS=$HW_VALIDATOR_REQUIREMENTS|" "$ASSISTED_SERVICE_ENV_FILE"
|
||||
@@ -9,7 +9,7 @@ DISK_ENCRYPTION_SUPPORT=true
|
||||
DUMMY_IGNITION=false
|
||||
ENABLE_SINGLE_NODE_DNSMASQ=true
|
||||
EPHEMERAL_INSTALLER_CLUSTER_TLS_CERTS_OVERRIDE_DIR=/opt/agent/tls
|
||||
HW_VALIDATOR_REQUIREMENTS=[{"version":"default","master":{"cpu_cores":4,"ram_mib":16384,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":100,"packet_loss_percentage":0},"arbiter":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":50,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":0},"worker":{"cpu_cores":2,"ram_mib":8192,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10,"network_latency_threshold_ms":1000,"packet_loss_percentage":10},"sno":{"cpu_cores":8,"ram_mib":16384,"disk_size_gb":100,"installation_disk_speed_threshold_ms":10}}]
|
||||
HW_VALIDATOR_REQUIREMENTS=TO_BE_REPLACED_BY_SYSTEMD
|
||||
INSTALL_INVOKER=agent-installer
|
||||
IPV6_SUPPORT=true
|
||||
TNA_CLUSTERS_SUPPORT=true
|
||||
|
||||
@@ -9,15 +9,21 @@ After=network-online.target assisted-service-pod.service
|
||||
[Service]
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
EnvironmentFile=/usr/local/share/assisted-service/agent-images.env
|
||||
|
||||
Restart=on-failure
|
||||
TimeoutStartSec=500
|
||||
TimeoutStopSec=300
|
||||
|
||||
ExecStartPre=/bin/rm -f %t/%n.ctr-id
|
||||
ExecStartPre=/usr/local/bin/configure-assisted-hw-requirements.sh
|
||||
|
||||
ExecStart=/usr/bin/podman run --net host --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --sdnotify=conmon --replace -d --name=service -v /opt/agent/tls:/opt/agent/tls:z {{ if .HaveMirrorConfig }}-v /etc/containers:/etc/containers{{ end }} {{.CaBundleMount}} --env-file=/etc/assisted/rendezvous-host.env --env-file=/usr/local/share/assisted-service/assisted-service.env --env-file=/usr/local/share/assisted-service/images.env --env-file=/etc/assisted/node0 --env-file=/usr/local/share/assisted-service/agent-images.env $SERVICE_IMAGE
|
||||
|
||||
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
||||
@@ -411,6 +411,7 @@ func commonFiles() []string {
|
||||
"/usr/local/bin/add-node.sh",
|
||||
"/usr/local/bin/agent-auth-token-status.sh",
|
||||
"/usr/local/bin/common.sh",
|
||||
"/usr/local/bin/configure-assisted-hw-requirements.sh",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user