-
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
1 parent
40182bf
commit 27063f9
Showing
8 changed files
with
119 additions
and
32 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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SUSHY_EMULATOR_LIBVIRT_URI = "qemu+ssh://root@192.168.111.1/system?&keyfile=/root/ssh/id_rsa_virt_power&no_verify=1&no_tty=1" | ||
SUSHY_EMULATOR_IGNORE_BOOT_DEVICE = False | ||
SUSHY_EMULATOR_VMEDIA_VERIFY_SSL = False | ||
SUSHY_EMULATOR_AUTH_FILE = "/root/sushy/htpasswd" | ||
SUSHY_EMULATOR_FAKE_DRIVER = True | ||
SUSHY_EMULATOR_FAKE_IPA = True | ||
FAKE_IPA_API_URL = "http://172.22.0.2:6385" | ||
FAKE_IPA_INSPECTION_CALLBACK_URL = "http://172.22.0.2:5050/v1/continue" | ||
FAKE_IPA_ADVERTISE_ADDRESS_IP = "192.168.111.1" | ||
SUSHY_EMULATOR_FAKE_SYSTEMS = [ | ||
{ | ||
'uuid': '27946b59-9e44-4fa7-8e91-f3527a1ef094', | ||
'name': 'fake1', | ||
'power_state': 'Off', | ||
'fake_ipa': False, | ||
'nics': [ | ||
{ | ||
'mac': '00:5c:52:31:3a:9c', | ||
'ip': '172.22.0.100' | ||
} | ||
] | ||
}, | ||
{ | ||
'uuid': '27946b59-9e44-4fa7-8e91-f3527a1ef095', | ||
'name': 'fake2', | ||
'power_state': 'Off', | ||
'fake_ipa': False, | ||
'nics': [ | ||
{ | ||
'mac': '00:5c:52:31:3a:9d', | ||
'ip': '172.22.0.101' | ||
} | ||
] | ||
} | ||
] |
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,19 @@ | ||
#!/bin/bash | ||
|
||
DIR="$(dirname "$(readlink -f "$0")")" | ||
|
||
if [ -d "${PWD}/_clouds_yaml" ]; then | ||
MOUNTDIR="${PWD}/_clouds_yaml" | ||
else | ||
echo "cannot find _clouds_yaml" | ||
exit 1 | ||
fi | ||
|
||
if [ "$1" == "baremetal" ] ; then | ||
shift 1 | ||
fi | ||
|
||
# shellcheck disable=SC2086 | ||
sudo podman run --net=host --tls-verify=false \ | ||
-v "${MOUNTDIR}:/etc/openstack" --rm \ | ||
-e OS_CLOUD="${OS_CLOUD:-metal3}" "172.22.0.1:5000/localimages/ironic-client" "$@" |
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,36 @@ | ||
baremetal node delete default-node | ||
|
||
su -c './build-sushytools-image-with-fakeipa-changes.sh' cloud-user | ||
SUSHY_TOOLS_IMAGE="127.0.0.1:5000/localimages/sushy-tools" | ||
LIBVIRT_URI="qemu+ssh://root@192.168.111.1/system?&keyfile=/root/ssh/id_rsa_virt_power&no_verify=1&no_tty=1" | ||
API_URL="http://172.22.0.2:6385" | ||
CALLBACK_URL="http://172.22.0.2:5050/v1/continue" | ||
ADVERTISE_HOST="192.168.111.1" | ||
ADVERTISE_PORT="9999" | ||
|
||
# Set configuration options | ||
cp conf.py $HOME/sushy-tools/conf.py | ||
|
||
# Create an htpasswd file | ||
cat <<'EOF' >$HOME/sushy-tools/htpasswd | ||
admin:$2b$12$/dVOBNatORwKpF.ss99KB.vESjfyONOxyH.UgRwNyZi1Xs/W2pGVS | ||
EOF | ||
|
||
podman stop fake-ipa | ||
podman rm fake-ipa | ||
podman run --entrypoint='["sushy-fake-ipa", "--config", "/root/sushy/conf.py"]' \ | ||
-d --net host --name fake-ipa --pod infra-pod \ | ||
-v $HOME/sushy-tools:/root/sushy \ | ||
-v /root/.ssh:/root/ssh \ | ||
"${SUSHY_TOOLS_IMAGE}" | ||
|
||
mkdir /opt/metal3-dev-env/ironic/html/images | ||
touch /opt/metal3-dev-env/ironic/html/images/image.qcow2 | ||
baremetal node create --driver redfish --driver-info \ | ||
redfish_address=http://192.168.111.1:8000 --driver-info \ | ||
redfish_system_id=/redfish/v1/Systems/27946b59-9e44-4fa7-8e91-f3527a1ef094 --driver-info \ | ||
redfish_username=admin --driver-info redfish_password=password \ | ||
--name default-node | ||
|
||
baremetal node set default-node --driver-info deploy_kernel="http://172.22.0.2:6180/images/ironic-python-agent.kernel" --driver-info deploy_ramdisk="http://172.22.0.2:6180/images/ironic-python-agent.initramfs" | ||
baremetal node set default-node --instance-info image_source=http://172.22.0.1/images/image.qcow2 --instance-info image_checksum=http://172.22.0.1/images/image.qcow2 |