From ab2131fb575d13ed5728e61c7e96383bc8392697 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Fri, 2 Aug 2024 09:31:18 -0500 Subject: [PATCH] begin the transition from using 'client-server' to 'engine' verbage --- .../install-crucible/install-crucible.sh | 4 +- .../actions/integration-tests/run-ci-stage1 | 38 ++++++++++--------- .github/workflows/benchmark-crucible-ci.yaml | 24 ++++++------ .github/workflows/core-crucible-ci.yaml | 36 +++++++++--------- .github/workflows/tool-crucible-ci.yaml | 12 +++--- 5 files changed, 58 insertions(+), 56 deletions(-) diff --git a/.github/actions/install-crucible/install-crucible.sh b/.github/actions/install-crucible/install-crucible.sh index 7eabd69..d39c6e7 100755 --- a/.github/actions/install-crucible/install-crucible.sh +++ b/.github/actions/install-crucible/install-crucible.sh @@ -103,7 +103,7 @@ case "${CI_ENDPOINT}" in k8s) if [ ${AUTH_TOKEN_FILE_FOUND} == 0 ]; then start_github_group "Configuring Crucible for local k8s registry" - CONTAINER_REGISTRY="localhost:32000/client-server" + CONTAINER_REGISTRY="localhost:32000/engines" REGISTRY_TLS_VERIFY="false" stop_github_group fi @@ -111,7 +111,7 @@ case "${CI_ENDPOINT}" in remotehost) if [ ${AUTH_TOKEN_FILE_FOUND} == 0 ]; then start_github_group "Configuring Crucible for local remotehost registry" - CONTAINER_REGISTRY="dir:/home/crucible-containers/client-server" + CONTAINER_REGISTRY="dir:/home/crucible-containers/engines" stop_github_group fi ;; diff --git a/.github/actions/integration-tests/run-ci-stage1 b/.github/actions/integration-tests/run-ci-stage1 index 08571ee..880b04e 100755 --- a/.github/actions/integration-tests/run-ci-stage1 +++ b/.github/actions/integration-tests/run-ci-stage1 @@ -21,14 +21,20 @@ if [ ! -d "${CRUCIBLE_HOME}" ]; then exit 1 fi -CRUCIBLE_CLIENT_SERVER_REPO_LOCATION="" -if echo "${CRUCIBLE_CLIENT_SERVER_REPO}" | grep -q "dir:"; then - CRUCIBLE_CLIENT_SERVER_REPO_LOCATION="local" - CRUCIBLE_CLIENT_SERVER_REPO=$(echo "${CRUCIBLE_CLIENT_SERVER_REPO}" | sed -e "s/dir://" -e 's|/client-server$||') -elif echo "${CRUCIBLE_CLIENT_SERVER_REPO}" | grep -q "quay.io"; then - CRUCIBLE_CLIENT_SERVER_REPO_LOCATION="quay.io" +# provide backwards compatibility with configration files that still +# have CRUCIBLE_CLIENT_SERVER_* instead of CRUCIBLE_ENGINE_* +if [ -z "${CRUCIBLE_ENGINE_REPO}" -a -n "${CRUCIBLE_CLIENT_SERVER_REPO}" ]; then + CRUCIBLE_ENGINE_REPO=${CRUCIBLE_CLIENT_SERVER_REPO} +fi + +CRUCIBLE_ENGINE_REPO_LOCATION="" +if echo "${CRUCIBLE_ENGINE_REPO}" | grep -q "dir:"; then + CRUCIBLE_ENGINE_REPO_LOCATION="local" + CRUCIBLE_ENGINE_REPO=$(echo "${CRUCIBLE_ENGINE_REPO}" | sed -e "s/dir://" -e 's|/engines$||') +elif echo "${CRUCIBLE_ENGINE_REPO}" | grep -q "quay.io"; then + CRUCIBLE_ENGINE_REPO_LOCATION="quay.io" else - CRUCIBLE_CLIENT_SERVER_REPO_LOCATION="microk8s" + CRUCIBLE_ENGINE_REPO_LOCATION="microk8s" fi CI_RUN_ENVIRONMENT="standalone" @@ -267,9 +273,7 @@ function post_run_cmd { } function remove_microk8s_images { - local rc=1 - - for image in $(do_ssh ${CI_ENDPOINT_USER}@${CI_ENDPOINT_HOST} microk8s ctr images list "name~=client-server" | grep -v REF | awk '{ print $1 }'); do + for image in $(do_ssh ${CI_ENDPOINT_USER}@${CI_ENDPOINT_HOST} microk8s ctr images list "name~=engines" | grep -v REF | awk '{ print $1 }'); do do_ssh ${CI_ENDPOINT_USER}@${CI_ENDPOINT_HOST} microk8s ctr images remove --sync ${image} rc=$? @@ -278,8 +282,6 @@ function remove_microk8s_images { break fi done - - return ${rc} } if [ "${CI_BUILD_CONTROLLER}" == "yes" ]; then @@ -599,15 +601,15 @@ for userenv in ${CI_ACTIVE_USERENVS}; do k8s) case "${CI_K8S_TYPE}" in "MICROK8S") - if [ "${CRUCIBLE_CLIENT_SERVER_REPO_LOCATION}" == "microk8s" ]; then + if [ "${CRUCIBLE_ENGINE_REPO_LOCATION}" == "microk8s" ]; then run_cmd "remove_microk8s_images" fi ;; esac ;; remotehost) - if [ "${CRUCIBLE_CLIENT_SERVER_REPO_LOCATION}" == "local" ]; then - run_cmd "rm -Rfv ${CRUCIBLE_CLIENT_SERVER_REPO}/*" + if [ "${CRUCIBLE_ENGINE_REPO_LOCATION}" == "local" ]; then + run_cmd "rm -Rfv ${CRUCIBLE_ENGINE_REPO}/*" fi ;; esac @@ -658,15 +660,15 @@ case "${CI_ENDPOINT}" in case "${CI_K8S_TYPE}" in "MICROK8S") - if [ "${CRUCIBLE_CLIENT_SERVER_REPO_LOCATION}" == "microk8s" ]; then + if [ "${CRUCIBLE_ENGINE_REPO_LOCATION}" == "microk8s" ]; then run_cmd "do_ssh ${CI_ENDPOINT_USER}@${CI_ENDPOINT_HOST} microk8s ctr images list" "force" fi ;; esac ;; remotehost) - if [ "${CRUCIBLE_CLIENT_SERVER_REPO_LOCATION}" == "local" ]; then - run_cmd "ls -laR ${CRUCIBLE_CLIENT_SERVER_REPO}" "force" + if [ "${CRUCIBLE_ENGINE_REPO_LOCATION}" == "local" ]; then + run_cmd "ls -laR ${CRUCIBLE_ENGINE_REPO}" "force" fi ;; esac diff --git a/.github/workflows/benchmark-crucible-ci.yaml b/.github/workflows/benchmark-crucible-ci.yaml index 40bed22..e173816 100644 --- a/.github/workflows/benchmark-crucible-ci.yaml +++ b/.github/workflows/benchmark-crucible-ci.yaml @@ -140,14 +140,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: @@ -212,14 +212,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: diff --git a/.github/workflows/core-crucible-ci.yaml b/.github/workflows/core-crucible-ci.yaml index bfdfbf1..5438d62 100644 --- a/.github/workflows/core-crucible-ci.yaml +++ b/.github/workflows/core-crucible-ci.yaml @@ -207,14 +207,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ needs.gen-params.outputs.build_controller == 'yes' && env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ needs.gen-params.outputs.build_controller == 'yes' && env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ needs.gen-params.outputs.build_controller == 'yes' && env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ needs.gen-params.outputs.build_controller == 'yes' && env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: @@ -289,14 +289,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: @@ -366,14 +366,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: diff --git a/.github/workflows/tool-crucible-ci.yaml b/.github/workflows/tool-crucible-ci.yaml index 9a40016..528dd64 100644 --- a/.github/workflows/tool-crucible-ci.yaml +++ b/.github/workflows/tool-crucible-ci.yaml @@ -132,14 +132,14 @@ jobs: - name: import ci secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth != '' && secrets.registry_auth || secrets.ci_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json" - name: import production secret env: - CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} - if: ${{ env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != '' }} - run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" + ENGINE_REGISTRY_AUTH_SECRET: ${{ secrets.production_registry_auth }} + if: ${{ env.ENGINE_REGISTRY_AUTH_SECRET != '' }} + run: sudo bash -c "echo \"$ENGINE_REGISTRY_AUTH_SECRET\" > /root/crucible-production-engines-token.json" - name: import quay oath token env: