Skip to content

Commit

Permalink
Test Deploy-cli
Browse files Browse the repository at this point in the history
Signed-off-by: Huy Mai <[email protected]>
  • Loading branch information
mquhuy committed Sep 16, 2024
1 parent 1b32846 commit 36505c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ mkdir -p "${M3PATH}"
detect_mismatch "${BMO_LOCAL_IMAGE:-}" "${BMOPATH}"
clone_repo "${BMOREPO}" "${BMOBRANCH}" "${BMOPATH}" "${BMOCOMMIT}"

pushd "${BMOPATH}"
make deploy-cli
sudo install tools/bin/deploy-cli /usr/bin/
popd

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

Expand Down
8 changes: 4 additions & 4 deletions 03_launch_mgmt_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if [ "${EPHEMERAL_CLUSTER}" != "tilt" ]; then
fi

# Update Configmap parameters with correct urls
cat << EOF | sudo tee "${BMOPATH}/config/default/ironic.env"
cat << EOF | sudo tee "${IRONIC_DATA_DIR}/ironic.env"
DEPLOY_KERNEL_URL=${DEPLOY_KERNEL_URL}
DEPLOY_RAMDISK_URL=${DEPLOY_RAMDISK_URL}
IRONIC_ENDPOINT=${IRONIC_URL}
Expand All @@ -73,8 +73,8 @@ EOF
echo "DEPLOY_ISO_URL=${DEPLOY_ISO_URL}" | sudo tee -a "${BMOPATH}/config/default/ironic.env"
fi

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

# If BMO should run locally, scale down the deployment and run BMO
if [ "${BMO_RUN_LOCAL}" == "true" ]; then
Expand Down Expand Up @@ -214,7 +214,7 @@ EOF
${RUN_LOCAL_IRONIC_SCRIPT}
else
# Deploy Ironic using deploy.sh script
"${BMOPATH}/tools/deploy.sh" -i "${BMO_IRONIC_ARGS[@]}"
deploy-cli -i "${BMO_IRONIC_ARGS[@]}"
fi
popd
}
Expand Down
5 changes: 3 additions & 2 deletions tests/roles/run_tests/tasks/move.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@

# Install BMO
- name: Install Baremetal Operator
shell: "{{ BMOPATH }}/tools/deploy.sh -b {{ BMO_IRONIC_ARGS }}"
# shell: "{{ BMOPATH }}/tools/deploy.sh -b {{ BMO_IRONIC_ARGS }}"
shell: "deploy-cli -b {{ BMO_IRONIC_ARGS }}"
environment:
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
Expand All @@ -124,7 +125,7 @@

# Install Ironic
- name: Install Ironic
shell: "{{ BMOPATH }}/tools/deploy.sh -i {{ BMO_IRONIC_ARGS }}"
shell: "deploy-cli -i {{ BMO_IRONIC_ARGS }}"
environment:
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
Expand Down
6 changes: 4 additions & 2 deletions tests/roles/run_tests/tasks/move_back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

# Install BMO in Source cluster
- name: Install Baremetal Operator in Source cluster
shell: "{{ BMOPATH }}/tools/deploy.sh -b {{ BMO_IRONIC_ARGS }}"
shell: "deploy-cli -b {{ BMO_IRONIC_ARGS }}"
environment:
IRONIC_HOST: "{{ IRONIC_HOST }}"
IRONIC_HOST_IP: "{{ IRONIC_HOST_IP }}"
BMOPATH: "{{ BMOPATH }}"
args:
chdir: "{{ BMOPATH }}"

Expand All @@ -25,10 +26,11 @@
when: EPHEMERAL_CLUSTER == "kind"

- name: Install Ironic in Source cluster (Ephemeral Cluster is minikube)
shell: "{{ BMOPATH }}/tools/deploy.sh -i {{ BMO_IRONIC_ARGS }}"
shell: "deploy-cli -i {{ BMO_IRONIC_ARGS }}"
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 36505c0

Please sign in to comment.