From 170c1a33ec6e64c03be7472ad775f0d856f43c05 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Mon, 10 Jun 2019 12:08:18 +0100 Subject: [PATCH] WIP run ironic on the bootstrap VM This is being used to test https://github.com/openshift-metal3/kni-installer/pull/100 --- 04_setup_ironic.sh | 22 ++-------------------- 06_create_cluster.sh | 14 -------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/04_setup_ironic.sh b/04_setup_ironic.sh index add589b17..f36a7d623 100755 --- a/04_setup_ironic.sh +++ b/04_setup_ironic.sh @@ -34,37 +34,19 @@ if sudo podman pod exists ironic-pod ; then sudo podman pod rm ironic-pod -f fi -# set password for mariadb -mariadb_password=$(echo $(date;hostname)|sha256sum |cut -c-20) - # Create pod sudo podman pod create -n ironic-pod -# Start dnsmasq, http, mariadb, and ironic containers using same image -sudo podman run -d --net host --privileged --name dnsmasq --pod ironic-pod \ - -v $IRONIC_DATA_DIR:/shared --entrypoint /bin/rundnsmasq ${IRONIC_IMAGE} - +# We start only the httpd and *downloader containers so that we can provide +# cached images to the bootstrap VM sudo podman run -d --net host --privileged --name httpd --pod ironic-pod \ -v $IRONIC_DATA_DIR:/shared --entrypoint /bin/runhttpd ${IRONIC_IMAGE} -sudo podman run -d --net host --privileged --name mariadb --pod ironic-pod \ - -v $IRONIC_DATA_DIR:/shared --entrypoint /bin/runmariadb \ - --env MARIADB_PASSWORD=$mariadb_password ${IRONIC_IMAGE} - -sudo podman run -d --net host --privileged --name ironic --pod ironic-pod \ - --env MARIADB_PASSWORD=$mariadb_password \ - --env OS_CONDUCTOR__HEARTBEAT_TIMEOUT=120 \ - -v $IRONIC_DATA_DIR:/shared ${IRONIC_IMAGE} - sudo podman run -d --net host --privileged --name ipa-downloader --pod ironic-pod \ -v $IRONIC_DATA_DIR:/shared ${IPA_DOWNLOADER_IMAGE} /usr/local/bin/get-resource.sh sudo podman run -d --net host --privileged --name coreos-downloader --pod ironic-pod \ -v $IRONIC_DATA_DIR:/shared ${COREOS_DOWNLOADER_IMAGE} /usr/local/bin/get-resource.sh $RHCOS_IMAGE_URL -# Start Ironic Inspector -sudo podman run -d --net host --privileged --name ironic-inspector \ - --pod ironic-pod -v $IRONIC_DATA_DIR:/shared "${IRONIC_INSPECTOR_IMAGE}" - # Wait for images to be downloaded/ready while ! curl --fail http://localhost:80/images/rhcos-ootpa-latest.qcow2.md5sum ; do sleep 1 ; done diff --git a/06_create_cluster.sh b/06_create_cluster.sh index 6159feff2..94a0fd3d7 100755 --- a/06_create_cluster.sh +++ b/06_create_cluster.sh @@ -51,20 +51,6 @@ if [ ! -d ocp ]; then generate_ocp_install_config ocp fi -# Make sure Ironic is up -export OS_TOKEN=fake-token -export OS_URL=http://localhost:6385/ - -wait_for_json ironic \ - "${OS_URL}/v1/nodes" \ - 20 \ - -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: wait-for-json" -H "X-Auth-Token: $OS_TOKEN" - -if [ $(sudo podman ps | grep -w -e "ironic$" -e "ironic-inspector$" -e "dnsmasq" -e "httpd" | wc -l) != 4 ]; then - echo "Can't find required containers" - exit 1 -fi - # Run the fix_certs.sh script periodically as a workaround for # https://github.com/openshift-metalkube/dev-scripts/issues/260 sudo systemd-run --on-active=30s --on-unit-active=1m --unit=fix_certs.service $(dirname $0)/fix_certs.sh