Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Take Deploy-cli to replace deploy.sh #1447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
13 changes: 13 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,19 @@ mkdir -p "${M3PATH}"
detect_mismatch "${BMO_LOCAL_IMAGE:-}" "${BMOPATH}"
clone_repo "${BMOREPO}" "${BMOBRANCH}" "${BMOPATH}" "${BMOCOMMIT}"

# We are fading away from deploy.sh, in favor of deploy-cli. In the meantime,
# as deploy-cli is not available in all BMO branches, and as deploy.sh assumes
# to be in ${BMOPATH}/tools, we compile deploy-cli and put it in deploy.sh place,
# if it's available, and use deploy.sh otherwise.

pushd "${BMOPATH}"
if make deploy-cli; then
chmod +x tools/bin/deploy-cli
rm tools/deploy.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to delete it, we copy over it on next line.

cp tools/bin/deploy-cli tools/deploy.sh
fi
popd

detect_mismatch "${CAPM3_LOCAL_IMAGE:-}" "${CAPM3PATH}"
clone_repo "${CAPM3REPO}" "${CAPM3BRANCH}" "${CAPM3PATH}" "${CAPM3COMMIT}"

Expand Down
2 changes: 2 additions & 0 deletions 03_launch_mgmt_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ EOF

# Deploy BMO using deploy.sh script
"${BMOPATH}/tools/deploy.sh" -b "${BMO_IRONIC_ARGS[@]}"
export BMOPATH

# If BMO should run locally, scale down the deployment and run BMO
if [[ "${BMO_RUN_LOCAL}" = "true" ]]; then
Expand Down Expand Up @@ -238,6 +239,7 @@ EOF
else
# Deploy Ironic using deploy.sh script
"${BMOPATH}/tools/deploy.sh" -i "${BMO_IRONIC_ARGS[@]}"
export BMOPATH
fi
popd
}
Expand Down
2 changes: 2 additions & 0 deletions tests/roles/run_tests/tasks/move.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
KUBECTL_ARGS: "{{ KUBECTL_ARGS }}"
BMOPATH: "{{ BMOPATH }}"
args:
chdir: "{{ BMOPATH }}"

Expand All @@ -129,6 +130,7 @@
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
KUBECTL_ARGS: "{{ KUBECTL_ARGS }}"
BMOPATH: "{{ BMOPATH }}"
args:
chdir: "{{ BMOPATH }}"

Expand Down
2 changes: 2 additions & 0 deletions tests/roles/run_tests/tasks/move_back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
environment:
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
BMOPATH: "{{ BMOPATH }}"
args:
chdir: "{{ BMOPATH }}"

Expand All @@ -29,6 +30,7 @@
environment:
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
BMOPATH: "{{ BMOPATH }}"
when: EPHEMERAL_CLUSTER == "minikube"
args:
chdir: "{{ BMOPATH }}"
Expand Down