From: Narinder Gupta Date: Mon, 17 Oct 2016 20:52:52 +0000 (-0500) Subject: modfified to change the model default after bootstrap. X-Git-Tag: danube.1.0~128 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F23247%2F2;p=joid.git modfified to change the model default after bootstrap. Change-Id: I621dd2b861e5b797f0876939c8c0472d0fca5c95 Signed-off-by: Narinder Gupta --- diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh index ad7c6ff1..42879bd7 100755 --- a/ci/02-deploybundle.sh +++ b/ci/02-deploybundle.sh @@ -110,25 +110,34 @@ pastebinit bundles.yaml || true if [[ "$jujuver" < "2" ]]; then echo "... Deployment Started ...." - juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack" + juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack"-nodes + count=`juju status nodes --format=short | grep nodes | wc -l` + c=0 + while [ $c -lt $count ]; do + juju ssh nodes/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true + juju ssh nodes-compute/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true + juju ssh nodes/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true + juju ssh nodes-compute/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true + let c+=1 + done + + juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack" || true else # with JUJU 2.0 bundles has to be deployed only once. juju deploy bundles.yaml --debug sleep 120 check_status + # seeing issue related to number of open files. + count=`juju status nodes --format=short | grep nodes | wc -l` + c=0 + while [ $c -lt $count ]; do + juju ssh nodes/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true + juju ssh nodes-compute/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true + juju ssh nodes/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true + juju ssh nodes-compute/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true + let c+=1 + done fi #lets gather the status of deployment once juju-deployer completed. juju status --format=tabular - -# seeing issue related to number of open files. -count=`juju status nodes --format=short | grep nodes | wc -l` -c=0 -while [ $c -lt $count ]; do - juju ssh nodes/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true - juju ssh nodes-compute/$c 'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p' || true - juju ssh nodes/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true - juju ssh nodes-compute/$c 'echo 2048 | sudo tee /proc/sys/fs/inotify/max_user_instances' || true - let c+=1 -done - diff --git a/ci/config_tpl/bundle_tpl/bundle.yaml b/ci/config_tpl/bundle_tpl/bundle.yaml index c9700842..61710816 100644 --- a/ci/config_tpl/bundle_tpl/bundle.yaml +++ b/ci/config_tpl/bundle_tpl/bundle.yaml @@ -1,5 +1,13 @@ # vim: set ts=2 et: +{{ ubuntu.release }}-{{ os.release }}-nodes: + inherits: openstack-phase1 + overrides: +{% include 'phase2-overrides.yaml' %} + {{ ubuntu.release }}-{{ os.release }}: + inherits: openstack-phase2 + +openstack-phase1: services: {% if os.hyperconverged %} nodes: @@ -62,7 +70,6 @@ {% include 'haclusters.yaml' %} {% endif %} -{% include 'subordinate.yaml' %} {% if os.hyperconverged %} relations: @@ -77,4 +84,9 @@ {% include 'harelations.yaml' %} {% endif %} +openstack-phase2: + inherits: openstack-phase1 + relations: {% include 'relations.yaml' %} + services: +{% include 'subordinate.yaml' %} diff --git a/ci/config_tpl/bundle_tpl/phase2-overrides.yaml b/ci/config_tpl/bundle_tpl/phase2-overrides.yaml index a8dbd400..72de7790 100644 --- a/ci/config_tpl/bundle_tpl/phase2-overrides.yaml +++ b/ci/config_tpl/bundle_tpl/phase2-overrides.yaml @@ -21,9 +21,11 @@ {% if os.network.l2_population %} #l2-population: true {% endif %} + region: {{ os.region }} {% if ubuntu.release == 'trusty' %} #source: "cloud:{{ ubuntu.release }}-{{ os.release }}" {% endif %} + #openstack-origin: "cloud:{{ ubuntu.release }}-{{ os.release }}" {% if ubuntu.release == 'xenial' %} {% if os.release == 'newton' %} #source: "cloud:{{ ubuntu.release }}-{{ os.release }}" diff --git a/ci/deploy.sh b/ci/deploy.sh index 7d683cf8..4c24f069 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -137,13 +137,13 @@ deploy() { createresource fi + #bootstrap the node + ./01-bootstrap.sh + if [[ "$jujuver" > "2" ]]; then juju model-config default-series=$opnfvdistro enable-os-refresh-update=false enable-os-upgrade=false fi - #bootstrap the node - ./01-bootstrap.sh - #case default deploy the opnfv platform: ./02-deploybundle.sh $opnfvtype $openstack $opnfvlab $opnfvsdn $opnfvfeature $opnfvdistro }