diff --git a/build.pkr.hcl b/build.pkr.hcl index 1b6e49e..3ba6457 100644 --- a/build.pkr.hcl +++ b/build.pkr.hcl @@ -33,11 +33,6 @@ build { destination = "${local.context_directory}" } - provisioner "file" { - source = "${path.root}/config.yaml" - destination = "${local.context_directory}/config.yaml" - } - provisioner "shell" { environment_vars = [ "DEBIAN_FRONTEND=noninteractive", @@ -117,11 +112,6 @@ build { destination = "${local.context_directory}" } - provisioner "file" { - source = "${path.root}/config.yaml" - destination = "${local.context_directory}/config.yaml" - } - # this restart is necessary to make sure the environment variables are # available to the subsequent scripts provisioner "windows-restart" {} diff --git a/config.yaml b/config.yaml deleted file mode 100644 index c943dfa..0000000 --- a/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# This file is used in the following ways: -# - In GitHub Actions: to filter which Packer sources are used for a given -# job. -# - In Packer: the file is copied to the Packer instance so that the domain -# can be used to configure the instance. - -aws: - domain: arc-eks -qemu: - domain: local diff --git a/linux/context/buildkitd.toml b/linux/context/buildkitd.toml index 09e2e8c..e53937e 100644 --- a/linux/context/buildkitd.toml +++ b/linux/context/buildkitd.toml @@ -1,2 +1,2 @@ [registry."docker.io"] - mirrors = ["https://dc.$DOMAIN.gha-runners.nvidia.com"] + mirrors = ["https://dc.local.gha-runners.nvidia.com"] diff --git a/linux/context/dockerd.json b/linux/context/dockerd.json index 85223e0..ad60fb2 100644 --- a/linux/context/dockerd.json +++ b/linux/context/dockerd.json @@ -1,4 +1,4 @@ { "exec-opts": ["native.cgroupdriver=cgroupfs"], - "registry-mirrors": ["https://dc.$DOMAIN.gha-runners.nvidia.com"] + "registry-mirrors": ["https://dc.local.gha-runners.nvidia.com"] } diff --git a/linux/context/fluent-bit/common.conf b/linux/context/fluent-bit/common.conf index c239c37..5a79f5e 100644 --- a/linux/context/fluent-bit/common.conf +++ b/linux/context/fluent-bit/common.conf @@ -14,7 +14,7 @@ [OUTPUT] Name http Match cpu - Host logs.${DOMAIN}.gha-runners.nvidia.com + Host logs.local.gha-runners.nvidia.com Port 443 Uri /cpu Format json @@ -27,7 +27,7 @@ [OUTPUT] Name http Match kernel - Host logs.${DOMAIN}.gha-runners.nvidia.com + Host logs.local.gha-runners.nvidia.com Port 443 Uri /kernel Format json @@ -41,7 +41,7 @@ [OUTPUT] Name http Match memory - Host logs.${DOMAIN}.gha-runners.nvidia.com + Host logs.local.gha-runners.nvidia.com Port 443 Uri /memory Format json @@ -54,7 +54,7 @@ [OUTPUT] Name http Match systemd - Host logs.${DOMAIN}.gha-runners.nvidia.com + Host logs.local.gha-runners.nvidia.com Port 443 Uri /systemd Format json diff --git a/linux/installers/docker.sh b/linux/installers/docker.sh index 6e63d47..23eda8f 100755 --- a/linux/installers/docker.sh +++ b/linux/installers/docker.sh @@ -31,10 +31,8 @@ sudo mv docker-compose* /usr/libexec/docker/cli-plugins/docker-compose # Add Docker mirror to daemon.json and buildkitd.toml sudo mkdir -p /etc/docker /etc/buildkit -DOMAIN=$(yq '.[env(NV_RUNNER_ENV)].domain' "${NV_CONTEXT_DIR}/config.yaml") -export DOMAIN -envsubst < "${NV_CONTEXT_DIR}/dockerd.json" | sudo tee /etc/docker/daemon.json -envsubst < "${NV_CONTEXT_DIR}/buildkitd.toml" | sudo tee /etc/buildkit/buildkitd.toml +sudo cp "${NV_CONTEXT_DIR}/dockerd.json" /etc/docker/daemon.json +sudo cp "${NV_CONTEXT_DIR}/buildkitd.toml" /etc/buildkit/buildkitd.toml # Set MTU for qemu env # shellcheck disable=SC2002 diff --git a/linux/installers/fluent-bit.sh b/linux/installers/fluent-bit.sh index 29c6b8d..1c326a8 100755 --- a/linux/installers/fluent-bit.sh +++ b/linux/installers/fluent-bit.sh @@ -19,14 +19,11 @@ sudo apt-get update sudo apt-get install --no-install-recommends -y fluent-bit sudo systemctl enable fluent-bit -DOMAIN=$(yq '.[env(NV_RUNNER_ENV)].domain' "${NV_CONTEXT_DIR}/config.yaml") -export DOMAIN - FLUENTBIT_CONFD="/etc/fluent-bit/conf.d" sudo mkdir -p "${FLUENTBIT_CONFD}" sudo cp "${NV_CONTEXT_DIR}/fluent-bit/fluent-bit.conf" /etc/fluent-bit/fluent-bit.conf -envsubst < "${NV_CONTEXT_DIR}/fluent-bit/common.conf" | sudo tee "${FLUENTBIT_CONFD}/common.conf" +sudo cp "${NV_CONTEXT_DIR}/fluent-bit/common.conf" "${FLUENTBIT_CONFD}/common.conf" if [ -d "${NV_CONTEXT_DIR}/fluent-bit/${NV_RUNNER_ENV}" ]; then sudo cp -r "${NV_CONTEXT_DIR}/fluent-bit/${NV_RUNNER_ENV}"/* "${FLUENTBIT_CONFD}/" diff --git a/windows/installers/docker.ps1 b/windows/installers/docker.ps1 index a2ab100..cc00ce3 100644 --- a/windows/installers/docker.ps1 +++ b/windows/installers/docker.ps1 @@ -24,12 +24,11 @@ Remove-Item docker.zip $dockerDefaultConfigPath = "$env:ProgramData/docker/config" mkdir -Force -ErrorAction SilentlyContinue -Path "$dockerDefaultConfigPath" -$domain = yq '.[env(NV_RUNNER_ENV)].domain' "${env:NV_CONTEXT_DIR}/config.yaml" @" { "group": "docker", - "registry-mirrors": ["https://dc.${domain}.gha-runners.nvidia.com"] + "registry-mirrors": ["https://dc.local.gha-runners.nvidia.com"] } "@ > "$dockerDefaultConfigPath/daemon.json"