-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
430 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
Support/Multitenancy/Multiple-Ironic-conductors/bmo-config/ironic-password
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Support/Multitenancy/Multiple-Ironic-conductors/bmo-config/ironic-username
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
Support/Multitenancy/Multiple-Ironic-conductors/bmo-config/ironic.env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HTTP_PORT=6180 | ||
PROVISIONING_INTERFACE=ironicendpoint | ||
DHCP_RANGE=192.168.222.100,192.168.222.200 | ||
DEPLOY_KERNEL_URL=http://192.168.222.100:6180/images/ironic-python-agent.kernel | ||
DEPLOY_RAMDISK_URL=http://192.168.222.100:6180/images/ironic-python-agent.initramfs | ||
IRONIC_ENDPOINT=https://192.168.222.100:6385/v1/ | ||
IRONIC_INSPECTOR_ENDPOINT=https://192.168.222.100:5050/v1/ | ||
CACHEURL=http://192.168.222.100/images | ||
IRONIC_FAST_TRACK=true |
17 changes: 10 additions & 7 deletions
17
Support/Multitenancy/Multiple-Ironic-conductors/build-api-server-container-image.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
#!/bin/bash | ||
# | ||
__dir__=$(realpath $(dirname $0)) | ||
IMAGE_NAME="172.22.0.1:5000/localimages/capim:latest" | ||
IMAGE_NAME="quay.io/metal3-io/api-server:latest" | ||
|
||
if [[ ${1:-""} == "-f" ]]; then | ||
podman rmi "${IMAGE_NAME}" | ||
docker rmi "${IMAGE_NAME}" | ||
kubectl delete -f capim-modified.yaml | ||
fi | ||
|
||
if [[ $(podman images | grep ${IMAGE_NAME}) != "" ]]; then | ||
podman push --tls-verify=false "${IMAGE_NAME}" | ||
if [[ $(docker images | grep ${IMAGE_NAME}) != "" ]]; then | ||
# docker push "${IMAGE_NAME}" | ||
minikube image load "${IMAGE_NAME}" | ||
exit 0 | ||
fi | ||
CAPI_DIR="/tmp/cluster-api" | ||
if [[ ! -d "${CAPI_DIR}" ]]; then | ||
git clone https://github.com/kubernetes-sigs/cluster-api.git "${CAPI_DIR}" | ||
cd "${CAPI_DIR}" || exit | ||
git checkout 17a5a7466dbd87db086 | ||
fi | ||
|
||
cd "${CAPI_DIR}" | ||
cd "${CAPI_DIR}" || exit | ||
|
||
INMEMORY_DIR="${CAPI_DIR}/test/infrastructure/inmemory" | ||
|
||
cp "${__dir__}/main.go" "${INMEMORY_DIR}/main.go" | ||
|
||
cd "${INMEMORY_DIR}" || exit | ||
|
||
podman build --build-arg=builder_image=docker.io/library/golang:1.20.8 --build-arg=goproxy=https://proxy.golang.org,direct --build-arg=ARCH=amd64 --build-arg=ldflags="-X 'sigs.k8s.io/cluster-api/version.buildDate=2023-10-10T11:47:30Z' -X 'sigs.k8s.io/cluster-api/version.gitCommit=8ba3f47b053da8bbf63cf407c930a2ee10bfd754' -X 'sigs.k8s.io/cluster-api/version.gitTreeState=dirty' -X 'sigs.k8s.io/cluster-api/version.gitMajor=1' -X 'sigs.k8s.io/cluster-api/version.gitMinor=0' -X 'sigs.k8s.io/cluster-api/version.gitVersion=v1.0.0-4041-8ba3f47b053da8-dirty' -X 'sigs.k8s.io/cluster-api/version.gitReleaseCommit=e09ed61cc9ba8bd37b0760291c833b4da744a985'" ../../.. -t "${IMAGE_NAME}" --file Dockerfile | ||
docker build --build-arg=builder_image=docker.io/library/golang:1.20.8 --build-arg=goproxy=https://proxy.golang.org,direct --build-arg=ARCH=amd64 --build-arg=ldflags="-X 'sigs.k8s.io/cluster-api/version.buildDate=2023-10-10T11:47:30Z' -X 'sigs.k8s.io/cluster-api/version.gitCommit=8ba3f47b053da8bbf63cf407c930a2ee10bfd754' -X 'sigs.k8s.io/cluster-api/version.gitTreeState=dirty' -X 'sigs.k8s.io/cluster-api/version.gitMajor=1' -X 'sigs.k8s.io/cluster-api/version.gitMinor=0' -X 'sigs.k8s.io/cluster-api/version.gitVersion=v1.0.0-4041-8ba3f47b053da8-dirty' -X 'sigs.k8s.io/cluster-api/version.gitReleaseCommit=e09ed61cc9ba8bd37b0760291c833b4da744a985'" ../../.. -t "${IMAGE_NAME}" --file Dockerfile | ||
|
||
podman push --tls-verify=false "${IMAGE_NAME}" | ||
# docker push "${IMAGE_NAME}" | ||
minikube image load "${IMAGE_NAME}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#!/bin/bash | ||
# | ||
export N_NODES=10 | ||
export N_SUSHY=2 | ||
export N_FAKE_IPA=2 | ||
export N_IRONICS=4 | ||
export N_NODES=1000 | ||
export N_SUSHY=60 | ||
export N_FAKE_IPA=40 | ||
export N_IRONICS=50 | ||
export N_APISERVER_PODS=5 | ||
# export N_NODES=50 | ||
# export N_SUSHY=2 | ||
# export N_FAKE_IPA=2 | ||
# export N_IRONICS=3 | ||
|
||
# Translating N_IRONICS to IRONIC_ENDPOINTS. Don't change this part | ||
IRONIC_ENDPOINTS="172.22.0.2" | ||
IRONIC_ENDPOINTS="192.168.222.100" | ||
for i in $(seq 2 $N_IRONICS); do | ||
IRONIC_ENDPOINTS="${IRONIC_ENDPOINTS} 172.22.0.$(( i + 1 ))" | ||
IRONIC_ENDPOINTS="${IRONIC_ENDPOINTS} 192.168.222.$(( 100+i ))" | ||
done | ||
export IRONIC_ENDPOINTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Support/Multitenancy/Multiple-Ironic-conductors/create-ironic-client.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
ironic_client="ironicclient.sh" | ||
openstack_dir="${PWD}/_clouds_yaml" | ||
rm -rf "${openstack_dir}" | ||
mkdir -p "${openstack_dir}" | ||
__dir__=$(realpath "$(dirname "$0")") | ||
cp ${__dir__}/opt/metal3-dev-env/ironic/certs/ironic-ca.pem "${openstack_dir}/ironic-ca.crt" | ||
cat << EOT >"${openstack_dir}/clouds.yaml" | ||
clouds: | ||
metal3: | ||
auth_type: none | ||
baremetal_endpoint_override: https://172.22.0.2:6385 | ||
baremetal_introspection_endpoint_override: https://172.22.0.2:5050 | ||
verify: false | ||
EOT | ||
|
||
docker run --net=host \ | ||
--name openstack-client \ | ||
--detach \ | ||
--entrypoint=/bin/sleep \ | ||
-v "${openstack_dir}:/etc/openstack" \ | ||
-e OS_CLOUD="${OS_CLOUD:-metal3}" \ | ||
"172.22.0.1:5000/localimages/ironic-client" \ | ||
"inf" | ||
|
||
|
||
cat << EOT >"${ironic_client}" | ||
#!/bin/bash | ||
DIR="$(dirname "$(readlink -f "$0")")" | ||
if [ -d $openstack_dir ]; then | ||
MOUNTDIR=$openstack_dir | ||
else | ||
echo 'cannot find $openstack_dir' | ||
exit 1 | ||
fi | ||
if [ \$1 == "baremetal" ] ; then | ||
shift 1 | ||
fi | ||
# shellcheck disable=SC2086 | ||
docker exec openstack-client /usr/bin/baremetal "\$@" | ||
EOT | ||
|
||
sudo chmod a+x "${ironic_client}" | ||
sudo ln -sf "$PWD/${ironic_client}" "/usr/local/bin/baremetal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.