diff options
-rw-r--r-- | .gitmodules | 62 | ||||
m--------- | build/f_repos/sub/fuel-agent | 0 | ||||
m--------- | build/f_repos/sub/fuel-astute | 0 | ||||
m--------- | build/f_repos/sub/fuel-library | 0 | ||||
m--------- | build/f_repos/sub/fuel-main | 0 | ||||
m--------- | build/f_repos/sub/fuel-menu | 0 | ||||
m--------- | build/f_repos/sub/fuel-nailgun-agent | 0 | ||||
m--------- | build/f_repos/sub/fuel-ostf | 0 | ||||
m--------- | build/f_repos/sub/fuel-ui | 0 | ||||
m--------- | build/f_repos/sub/fuel-web | 0 | ||||
m--------- | build/f_repos/sub/network-checker | 0 | ||||
m--------- | build/f_repos/sub/python-fuelclient | 0 | ||||
m--------- | build/f_repos/sub/shotgun | 0 | ||||
-rwxr-xr-x | ci/deploy.sh | 4 | ||||
-rwxr-xr-x | mcp/reclass/scripts/infra.sh | 13 | ||||
-rwxr-xr-x | mcp/reclass/scripts/openstack.sh | 2 | ||||
-rwxr-xr-x | mcp/reclass/scripts/salt.sh | 4 |
17 files changed, 13 insertions, 72 deletions
diff --git a/.gitmodules b/.gitmodules index 7a28aac6d..65eefe0b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,63 +1,5 @@ -[submodule "fuel-main"] - path = build/f_repos/sub/fuel-main - url = https://github.com/openstack/fuel-main.git - branch = stable/newton - ignore = all -[submodule "fuel-library"] - path = build/f_repos/sub/fuel-library - url = https://github.com/openstack/fuel-library.git - branch = stable/newton - ignore = all -[submodule "fuel-web"] - path = build/f_repos/sub/fuel-web - url = https://github.com/openstack/fuel-web.git - branch = stable/newton - ignore = all -[submodule "python-fuelclient"] - path = build/f_repos/sub/python-fuelclient - url = https://github.com/openstack/python-fuelclient.git - branch = stable/newton - ignore = all -[submodule "fuel-agent"] - path = build/f_repos/sub/fuel-agent - url = https://github.com/openstack/fuel-agent.git - branch = stable/newton - ignore = all -[submodule "fuel-nailgun-agent"] - path = build/f_repos/sub/fuel-nailgun-agent - url = https://github.com/openstack/fuel-nailgun-agent.git - branch = stable/newton - ignore = all -[submodule "fuel-astute"] - path = build/f_repos/sub/fuel-astute - url = https://github.com/openstack/fuel-astute.git - branch = stable/newton - ignore = all -[submodule "fuel-ostf"] - path = build/f_repos/sub/fuel-ostf - url = https://github.com/openstack/fuel-ostf.git - branch = stable/newton - ignore = all -[submodule "fuel-menu"] - path = build/f_repos/sub/fuel-menu - url = https://github.com/openstack/fuel-menu.git - branch = stable/newton - ignore = all -[submodule "shotgun"] - path = build/f_repos/sub/shotgun - url = https://github.com/openstack/shotgun.git - branch = stable/newton - ignore = all -[submodule "network-checker"] - path = build/f_repos/sub/network-checker - url = https://github.com/openstack/network-checker.git - branch = stable/newton - ignore = all -[submodule "fuel-ui"] - path = build/f_repos/sub/fuel-ui - url = https://github.com/openstack/fuel-ui.git - branch = stable/newton - ignore = all [submodule "mcp/reclass/classes/system"] path = mcp/reclass/classes/system url = https://github.com/Mirantis/reclass-system-salt-model + branch = master + ignore = all diff --git a/build/f_repos/sub/fuel-agent b/build/f_repos/sub/fuel-agent deleted file mode 160000 -Subproject 7d35078a9d67a9015f49f5813dbad225837095a diff --git a/build/f_repos/sub/fuel-astute b/build/f_repos/sub/fuel-astute deleted file mode 160000 -Subproject 87ba44dcde92a0bfe50fdba6e0a2f271e685991 diff --git a/build/f_repos/sub/fuel-library b/build/f_repos/sub/fuel-library deleted file mode 160000 -Subproject 0281ca8ee1900271252edc5e6e1ceb2112cfd0d diff --git a/build/f_repos/sub/fuel-main b/build/f_repos/sub/fuel-main deleted file mode 160000 -Subproject a0f955fc5bff09c02d538ae2c9a7373b6ee511e diff --git a/build/f_repos/sub/fuel-menu b/build/f_repos/sub/fuel-menu deleted file mode 160000 -Subproject 9aedc10ffea536d7d353cb5869c492a1729a98f diff --git a/build/f_repos/sub/fuel-nailgun-agent b/build/f_repos/sub/fuel-nailgun-agent deleted file mode 160000 -Subproject 0cfe06be939f92c3a8158a0e8a96a7ab8cf5403 diff --git a/build/f_repos/sub/fuel-ostf b/build/f_repos/sub/fuel-ostf deleted file mode 160000 -Subproject 132f287fb769276cde63ac283222d5447bc6830 diff --git a/build/f_repos/sub/fuel-ui b/build/f_repos/sub/fuel-ui deleted file mode 160000 -Subproject 5b66f907e628ba16d03a3fd3f259099b727a5fa diff --git a/build/f_repos/sub/fuel-web b/build/f_repos/sub/fuel-web deleted file mode 160000 -Subproject d04c1108b2b19e5d681a07fd3492b93d133c461 diff --git a/build/f_repos/sub/network-checker b/build/f_repos/sub/network-checker deleted file mode 160000 -Subproject 5efbc91a120ae3dc12e8751ba4bdf2644590939 diff --git a/build/f_repos/sub/python-fuelclient b/build/f_repos/sub/python-fuelclient deleted file mode 160000 -Subproject 8ac48ac48facc47923ba00c09bf96080ca88d31 diff --git a/build/f_repos/sub/shotgun b/build/f_repos/sub/shotgun deleted file mode 160000 -Subproject 43b5d6d905b1179fd36fa26255d58dc0113b388 diff --git a/ci/deploy.sh b/ci/deploy.sh index bdcd15d99..b6926a7cf 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -240,6 +240,10 @@ pushd ${DEPLOY_DIR} > /dev/null # Prepare the deploy config files based on lab/pod information, deployment # scenario, etc. +export SSH_KEY=mcp.rsa +export SALT_MASTER=192.168.10.100 +export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${SSH_KEY}" + ./infra.sh ./salt.sh ./openstack.sh diff --git a/mcp/reclass/scripts/infra.sh b/mcp/reclass/scripts/infra.sh index 7f5c210db..b83f21508 100755 --- a/mcp/reclass/scripts/infra.sh +++ b/mcp/reclass/scripts/infra.sh @@ -1,7 +1,5 @@ #!/bin/bash -SSH_KEY=mcp.rsa -SALT_MASTER=192.168.10.100 BASE_IMAGE=https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img declare -A NODES=( [cfg01]=4096 [ctl01]=6144 [ctl02]=6144 [ctl03]=6144 [gtw01]=2048 [cmp01]=2048 ) @@ -13,7 +11,7 @@ apt-get install -y mkisofs curl virtinst cpu-checker qemu-kvm # get base image mkdir -p images -wget -nc $BASE_IMAGE +wget -P /tmp -nc $BASE_IMAGE for node in "${!NODES[@]}"; do # clean up existing nodes @@ -24,7 +22,7 @@ for node in "${!NODES[@]}"; do # create/prepare images [ -f images/mcp_${node}.iso ] || ./create-config-drive.sh -k ${SSH_KEY}.pub -u user-data.sh -h ${node} images/mcp_${node}.iso - cp ${BASE_IMAGE/*\/} images/mcp_${node}.qcow2 + cp /tmp/${BASE_IMAGE/*\/} images/mcp_${node}.qcow2 qemu-img resize images/mcp_${node}.qcow2 100G done @@ -47,6 +45,7 @@ for node in "${!NODES[@]}"; do --network network:internal,model=virtio \ --network network:public,model=virtio \ --disk path=$(pwd)/images/mcp_${node}.qcow2,format=qcow2,bus=virtio,cache=none,io=native \ + --os-type linux --os-variant none \ --boot hd --vnc --console pty --autostart --noreboot \ --disk path=$(pwd)/images/mcp_${node}.iso,device=cdrom done @@ -64,20 +63,16 @@ done CONNECTION_ATTEMPTS=20 SLEEP=15 -# refresh salt master host key -ssh-keygen -R $SALT_MASTER - # wait until ssh on Salt master is available echo "Attempting to ssh to Salt master ..." ATTEMPT=1 while (($ATTEMPT <= $CONNECTION_ATTEMPTS)); do - ssh -i ${SSH_KEY} ubuntu@$SALT_MASTER uptime + ssh $SSH_OPTS ubuntu@$SALT_MASTER uptime case $? in (0) echo "${ATTEMPT}> Success"; break ;; (*) echo "${ATTEMPT}/${CONNECTION_ATTEMPTS}> ssh server ain't ready yet, waiting for ${SLEEP} seconds ..." ;; esac sleep $SLEEP - ssh-keyscan -t ecdsa $SALT_MASTER >> ~/.ssh/known_hosts ((ATTEMPT+=1)) done diff --git a/mcp/reclass/scripts/openstack.sh b/mcp/reclass/scripts/openstack.sh index b757e8ecf..3f6b0617c 100755 --- a/mcp/reclass/scripts/openstack.sh +++ b/mcp/reclass/scripts/openstack.sh @@ -3,7 +3,7 @@ # Deploy Openstack # -ssh -i mcp.rsa ubuntu@192.168.10.100 bash -s << OPENSTACK_INSTALL_END +ssh $SSH_OPTS ubuntu@$SALT_MASTER bash -s << OPENSTACK_INSTALL_END sudo -i salt-call state.apply salt diff --git a/mcp/reclass/scripts/salt.sh b/mcp/reclass/scripts/salt.sh index 6495bbce2..6c60c5662 100755 --- a/mcp/reclass/scripts/salt.sh +++ b/mcp/reclass/scripts/salt.sh @@ -4,7 +4,7 @@ # # ssh to cfg01 -ssh -i mcp.rsa ubuntu@192.168.10.100 bash -s << SALT_INSTALL_END +ssh $SSH_OPTS ubuntu@$SALT_MASTER bash -s << SALT_INSTALL_END sudo -i apt-get update @@ -12,7 +12,7 @@ ssh -i mcp.rsa ubuntu@192.168.10.100 bash -s << SALT_INSTALL_END svn export --force https://github.com/salt-formulas/salt-formulas/trunk/deploy/scripts /srv/salt/scripts git clone --depth=1 --recurse-submodules https://git.opnfv.org/fuel - ln -s $(pwd)/fuel/mcp/reclass /srv/salt/reclass + ln -s /root/fuel/mcp/reclass /srv/salt/reclass cd /srv/salt/scripts MASTER_HOSTNAME=cfg01.virtual-mcp-ocata-ovs.local ./salt-master-init.sh |