From cb94d67abb2104f545615a82a83d4ed688b9fa51 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 | 25 ++++--------------------- 06_create_cluster.sh | 14 -------------- common.sh | 4 ++-- 3 files changed, 6 insertions(+), 37 deletions(-) diff --git a/04_setup_ironic.sh b/04_setup_ironic.sh index b1cf9b72a..a5d82a9c3 100755 --- a/04_setup_ironic.sh +++ b/04_setup_ironic.sh @@ -34,33 +34,16 @@ 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 \ - -v $IRONIC_DATA_DIR:/shared ${IRONIC_IMAGE} - -sudo podman run -d --net host --privileged --name ipa-downloader --pod ironic-pod \ +sudo podman run -d --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 \ +sudo podman run -d --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}" diff --git a/06_create_cluster.sh b/06_create_cluster.sh index 219cafa27..df1bb0d09 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 - # Call kni-installer to deploy the bootstrap node and masters create_cluster ocp diff --git a/common.sh b/common.sh index 2e2106b3b..e4f587229 100644 --- a/common.sh +++ b/common.sh @@ -54,8 +54,8 @@ export RHCOS_IMAGE_FILENAME_LATEST="rhcos-ootpa-latest.qcow2" # Ironic vars export IRONIC_IMAGE=${IRONIC_IMAGE:-"quay.io/metal3-io/ironic:master"} export IRONIC_INSPECTOR_IMAGE=${IRONIC_INSPECTOR_IMAGE:-"quay.io/metal3-io/ironic-inspector:master"} -export IPA_DOWNLOADER_IMAGE=${IPA_DOWNLOADER_IMAGE:-"quay.io/higginsd/resource-downloader-ipa:master"} -export COREOS_DOWNLOADER_IMAGE=${COREOS_DOWNLOADER_IMAGE:-"quay.io/higginsd/resource-downloader-coreos:master"} +export IPA_DOWNLOADER_IMAGE=${IPA_DOWNLOADER_IMAGE:-"quay.io/metal3-io/ironic-ipa-downloader:master"} +export COREOS_DOWNLOADER_IMAGE=${COREOS_DOWNLOADER_IMAGE:-"quay.io/openshift-metal3/rhcos-downloader:master"} export IRONIC_DATA_DIR="$WORKING_DIR/ironic" export KUBECONFIG="${SCRIPTDIR}/ocp/auth/kubeconfig"