Skip to content

Commit

Permalink
Take Deploy-cli into use to replace deploy.sh
Browse files Browse the repository at this point in the history
Now that we have deploy-cli in BMO main, we can start using it to
replace deploy.sh in installing BMO and Ironic.

Signed-off-by: Huy Mai <[email protected]>
  • Loading branch information
mquhuy committed Dec 19, 2024
1 parent f29cc50 commit 4e4db6a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,15 @@ 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}"
make deploy-cli && chmod +x tools/bin/deploy-cli && rm tools/deploy.sh && cp tools/bin/deploy-cli tools/deploy.sh
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

0 comments on commit 4e4db6a

Please sign in to comment.