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

Add option to run Dev-env with FakeIPA #1450

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mboukhalfa
Copy link
Member

@mboukhalfa mboukhalfa commented Aug 26, 2024

Run environment to test scalability with FakeIPA

To enable fakeIPA in devenv add the following lines to the config file

export vm_platform="fake"
export FAKE_IPA_I=192.168.111.1:5000/localimages/fake-ipa

@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2024
@metal3-io-bot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mboukhalfa. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 26, 2024
@metal3-io-bot metal3-io-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 29, 2024
@mboukhalfa mboukhalfa force-pushed the Integrate-fakeIPA/mohammed branch 2 times, most recently from faf54fb to f4a3e4d Compare August 29, 2024 17:22
@mboukhalfa mboukhalfa marked this pull request as ready for review August 29, 2024 17:29
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 29, 2024
@mboukhalfa mboukhalfa force-pushed the Integrate-fakeIPA/mohammed branch 2 times, most recently from 5047112 to fd4cf65 Compare August 30, 2024 06:26
@mboukhalfa mboukhalfa force-pushed the Integrate-fakeIPA/mohammed branch 4 times, most recently from 200867f to 84aba16 Compare September 19, 2024 08:22
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Some indentation issues.

# wait for ironic to be running
kubectl -n baremetal-operator-system wait --for=condition=available deployment/baremetal-operator-ironic --timeout=300s
mkdir -p /opt/metal3-dev-env/fake-ipa
kubectl -n legacy get secret -n baremetal-operator-system ironic-cert -o json -o=jsonpath="{.data.ca\.crt}" | base64 -d > /opt/metal3-dev-env/fake-ipa/ironic-ca.crt
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kubectl -n legacy get secret -n baremetal-operator-system ironic-cert -o json -o=jsonpath="{.data.ca\.crt}" | base64 -d > /opt/metal3-dev-env/fake-ipa/ironic-ca.crt
kubectl -n legacy get secret -n baremetal-operator-system ironic-cert -o json -o=jsonpath="{.data.ca\.crt}" | base64 -d > /opt/metal3-dev-env/fake-ipa/ironic-ca.crt

metadata:
name: default-node-2-bmc-secret
labels:
environment.metal3.io: baremetal
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
environment.metal3.io: baremetal
environment.metal3.io: baremetal

bootMode: legacy
EOF
kubectl apply -f "${WORKING_DIR}/bmhosts_crs.yaml" -n "$NAMESPACE"
else
apply_bm_hosts "$NAMESPACE"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
apply_bm_hosts "$NAMESPACE"
apply_bm_hosts "$NAMESPACE"

@@ -538,7 +538,69 @@ if [ "${EPHEMERAL_CLUSTER}" != "tilt" ]; then
# Thus we are deleting validatingwebhookconfiguration resource if exists to let BMO is working properly on local runs.
kubectl delete validatingwebhookconfiguration/"${BMO_NAME_PREFIX}"-validating-webhook-configuration --ignore-not-found=true
fi
# if fake platform (no VMs) run FakeIPA
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# if fake platform (no VMs) run FakeIPA
# if fake platform (no VMs) run FakeIPA

metadata:
name: default-node-1-bmc-secret
labels:
environment.metal3.io: baremetal
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
environment.metal3.io: baremetal
environment.metal3.io: baremetal

bootMACAddress: 00:5c:52:31:3a:9d
bootMode: legacy
EOF
kubectl apply -f "${WORKING_DIR}/bmhosts_crs.yaml" -n "$NAMESPACE"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kubectl apply -f "${WORKING_DIR}/bmhosts_crs.yaml" -n "$NAMESPACE"
kubectl apply -f "${WORKING_DIR}/bmhosts_crs.yaml" -n "$NAMESPACE"

apply_bm_hosts "$NAMESPACE"
fi
elif [ "${EPHEMERAL_CLUSTER}" == "tilt" ]; then

source tilt-setup/deploy_tilt_env.sh
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
source tilt-setup/deploy_tilt_env.sh
source tilt-setup/deploy_tilt_env.sh

apply_bm_hosts "$NAMESPACE"
fi
elif [ "${EPHEMERAL_CLUSTER}" == "tilt" ]; then

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Signed-off-by: Mohammed Boukhalfa <[email protected]>
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Also, add the new environment variables to vars.md, same as sushy-tools vars are there.

@@ -181,6 +181,9 @@ EOF
echo "DHCP_HOSTS=${DHCP_HOSTS}" | sudo tee -a "${IRONIC_DATA_DIR}/ironic_bmo_configmap.env"
fi

if [ "${VM_PLATFORM}" == "fake" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [ "${VM_PLATFORM}" == "fake" ]; then
if [[ "${VM_PLATFORM}" == "fake" ]]; then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants