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
7 changes: 7 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,13 @@ mkdir -p "${M3PATH}"
detect_mismatch "${BMO_LOCAL_IMAGE:-}" "${BMOPATH}"
clone_repo "${BMOREPO}" "${BMOBRANCH}" "${BMOPATH}" "${BMOCOMMIT}"

# Clone a separate BMO main branch, to install deploy-cli.
clone_repo "${BMOREPO}" "main" "/tmp/bmo-main"
pushd /tmp/bmo-main
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