Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ RestartSec=30
RemainAfterExit=true

[Install]
WantedBy=start-cluster-installation.service agent-add-node.service agent-start-ui.service
WantedBy=start-cluster-installation.service agent-add-node.service agent-ui.service
2 changes: 1 addition & 1 deletion data/data/agent/systemd/units/agent-ui.service.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EnvironmentFile=/etc/assisted/rendezvous-host.env
Restart=on-failure
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStartPre=/usr/local/bin/wait-for-assisted-service.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 --replace -d --name=agent-installer-ui --env AIUI_APP_API_URL $INSTALLER_UI_IMAGE
ExecStart=/usr/bin/podman run --sdnotify=conmon --net host --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --replace -d --name=agent-installer-ui --env AIUI_APP_API_URL $INSTALLER_UI_IMAGE
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions pkg/asset/agent/image/ignition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}

Expand Down