-
Notifications
You must be signed in to change notification settings - Fork 118
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
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
e270b37
to
54833a3
Compare
faf54fb
to
f4a3e4d
Compare
5047112
to
fd4cf65
Compare
200867f
to
84aba16
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source tilt-setup/deploy_tilt_env.sh | |
source tilt-setup/deploy_tilt_env.sh |
apply_bm_hosts "$NAMESPACE" | ||
fi | ||
elif [ "${EPHEMERAL_CLUSTER}" == "tilt" ]; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Mohammed Boukhalfa <[email protected]>
84aba16
to
6d6b7ed
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ "${VM_PLATFORM}" == "fake" ]; then | |
if [[ "${VM_PLATFORM}" == "fake" ]]; then |
Run environment to test scalability with FakeIPA
To enable fakeIPA in devenv add the following lines to the config file