Merge "deployment.py: stdout not consumed when deploying changes"
authorJonas Bjurel <jonas.bjurel@ericsson.com>
Wed, 11 May 2016 19:28:27 +0000 (19:28 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 11 May 2016 19:28:27 +0000 (19:28 +0000)
18 files changed:
ci/deploy.sh
deploy/README
deploy/deploy.py
deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
deploy/templates/hardware_environment/vms/fuel.xml
deploy/templates/intel/virtual_environment/noha/vms/compute.xml
deploy/templates/intel/virtual_environment/noha/vms/controller.xml
deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
deploy/templates/virtual_environment/vms/compute.xml
deploy/templates/virtual_environment/vms/controller.xml
deploy/templates/virtual_environment/vms/fuel.xml
deploy/templates/virtual_environment_noha/vms/compute.xml
deploy/templates/virtual_environment_noha/vms/controller.xml
deploy/templates/virtual_environment_noha/vms/fuel.xml
prototypes/sfc_tacker/poc.tacker-up.sh

index d83bba2..dc13f1c 100755 (executable)
@@ -40,6 +40,7 @@ OPTIONS:
   -f  Deploy on existing Fuel master
   -e  Do not launch environment deployment
   -F  Do only create a Fuel master
+  -h  Print this message and exit
   -H  No health check
   -l  Lab-name
   -p  Pod-name
@@ -62,6 +63,7 @@ Input parameters to the build script is:
 -f Deploy on existing Fuel master
 -e Do not launch environment deployment
 -F Do only create a Fuel master
+-h Print this message and exit
 -H Do not run fuel built in health-check after successfull deployment
 -l Lab name as defined in the configuration directory, e.g. lf
 -p POD name as defined in the configuration directory, e.g. pod-1
@@ -116,7 +118,7 @@ DRY_RUN=0
 ############################################################################
 # BEGIN of main
 #
-while getopts "b:B:dfFHl:p:s:S:i:h:e" OPTION
+while getopts "b:B:dfFHl:p:s:S:i:he" OPTION
 do
     case $OPTION in
         b)
index 697a9b3..fd15483 100644 (file)
@@ -56,25 +56,34 @@ you will have to modify them according to your needs
 
 --- Step.2 Run Autodeployment ---
 
-usage: python deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
-                        [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
-                        [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
+usage: python ./deploy.py [-h] [-nf] [-nh] [-fo] [-co] [-c] [-iso [ISO_FILE]]
+                          [-dea [DEA_FILE]] [-dha [DHA_FILE]] [-s STORAGE_DIR]
+                          [-b PXE_BRIDGE] [-p FUEL_PLUGINS_DIR]
+                          [-pc FUEL_PLUGINS_CONF_DIR] [-np]
+                          [-dt DEPLOY_TIMEOUT] [-nde]
 
 optional arguments:
-  -h, --help           show this help message and exit
-  -nf                  Do not install Fuel Master (and Node VMs when using libvirt)
-  -nh                  Don't run health check after deployment
-  -fo                  Install Fuel Master only (and Node VMs when using libvirt)
-  -co                  Cleanup VMs and Virtual Networks according to what is
-                       defined in DHA
-  -c                   Cleanup after deploy
-  -iso [ISO_FILE]      ISO File [default: OPNFV.iso]
-  -dea [DEA_FILE]      Deployment Environment Adapter: dea.yaml
-  -dha [DHA_FILE]      Deployment Hardware Adapter: dha.yaml
-  -s STORAGE_DIR       Storage Directory [default: images]
-  -b PXE_BRIDGE        Linux Bridge for booting up the Fuel Master VM
-                       [default: pxebr]
-  -p FUEL_PLUGINS_DIR  Fuel Plugins directory
+  -h, --help            show this help message and exit
+  -nf                   Do not install Fuel Master (and Node VMs when using
+                        libvirt)
+  -nh                   Don't run health check after deployment
+  -fo                   Install Fuel Master only (and Node VMs when using
+                        libvirt)
+  -co                   Cleanup VMs and Virtual Networks according to what is
+                        defined in DHA
+  -c                    Cleanup after deploy
+  -iso [ISO_FILE]       ISO File [default: OPNFV.iso]
+  -dea [DEA_FILE]       Deployment Environment Adapter: dea.yaml
+  -dha [DHA_FILE]       Deployment Hardware Adapter: dha.yaml
+  -s STORAGE_DIR        Storage Directory [default: images]
+  -b PXE_BRIDGE         Linux Bridge for booting up the Fuel Master VM
+                        [default: pxebr]
+  -p FUEL_PLUGINS_DIR   Fuel Plugins directory
+  -pc FUEL_PLUGINS_CONF_DIR
+                        Fuel Plugins Configuration directory
+  -np                   Do not install Fuel Plugins
+  -dt DEPLOY_TIMEOUT    Deployment timeout (in minutes) [default: 240]
+  -nde                  Do not launch environment deployment
 
 
 * EXAMPLES:
index f86f2be..0d40641 100755 (executable)
@@ -335,9 +335,10 @@ def parse_arguments():
         check_file_exists(args.dea_file)
         check_fuel_plugins_dir(args.fuel_plugins_dir)
 
+    iso_abs_path = os.path.abspath(args.iso_file)
     if not args.no_fuel and not args.cleanup_only:
-        log('Using OPNFV ISO file: %s' % args.iso_file)
-        check_file_exists(args.iso_file)
+        log('Using OPNFV ISO file: %s' % iso_abs_path)
+        check_file_exists(iso_abs_path)
         log('Using image directory: %s' % args.storage_dir)
         create_dir_if_not_exists(args.storage_dir)
         check_bridge(args.pxe_bridge, args.dha_file)
@@ -346,7 +347,7 @@ def parse_arguments():
               'no_health_check': args.no_health_check,
               'cleanup_only': args.cleanup_only, 'cleanup': args.cleanup,
               'storage_dir': args.storage_dir, 'pxe_bridge': args.pxe_bridge,
-              'iso_file': args.iso_file, 'dea_file': args.dea_file,
+              'iso_file': iso_abs_path, 'dea_file': args.dea_file,
               'dha_file': args.dha_file,
               'fuel_plugins_dir': args.fuel_plugins_dir,
               'fuel_plugins_conf_dir': args.fuel_plugins_conf_dir,
index 6fb3743..81203c0 100644 (file)
@@ -79,7 +79,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index cf62fbc..86c6d11 100644 (file)
@@ -79,7 +79,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index 31e8479..3e0bb7b 100644 (file)
@@ -77,7 +77,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
index b55b16e..fe547b8 100644 (file)
@@ -73,7 +73,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
index 72c15b5..8d8dd44 100644 (file)
@@ -73,7 +73,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
@@ -88,4 +88,4 @@
     <label>system_u:system_r:svirt_t:s0:c52,c932</label>
     <imagelabel>system_u:object_r:svirt_image_t:s0:c52,c932</imagelabel>
   </seclabel>
-</domain>
\ No newline at end of file
+</domain>
index 6fb3743..81203c0 100644 (file)
@@ -79,7 +79,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index cf62fbc..86c6d11 100644 (file)
@@ -79,7 +79,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index 67cccbb..b4fa268 100644 (file)
@@ -77,7 +77,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
index f794b65..1c20b7d 100644 (file)
@@ -52,7 +52,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index 44dd5b6..febaf3a 100644 (file)
@@ -52,7 +52,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index bf8f3e2..6b06a58 100644 (file)
@@ -50,7 +50,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
index f794b65..1c20b7d 100644 (file)
@@ -52,7 +52,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index 44dd5b6..febaf3a 100644 (file)
@@ -52,7 +52,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' keymap='sv'/>
+    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
     <sound model='ich6'>
     </sound>
     <video>
index 3e75769..9234604 100644 (file)
@@ -50,7 +50,7 @@
     </console>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='sv'>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
       <listen type='address' address='127.0.0.1'/>
     </graphics>
     <sound model='ich6'>
index be647b4..4dbb372 100755 (executable)
@@ -350,6 +350,18 @@ function populate_rc() {
     done
 }
 
+
+#Configure ODL so that it allows the coexistence between Netvirt and SFC
+function coexistence() {
+    curl -i -u admin:admin -H 'Content-type: application/json' -X PUT \
+    -d '{"netvirt-providers-config":{"table-offset":"1"}}' \
+    http://${mgmt_addr}:${odl_port}/restconf/config/netvirt-providers-config:netvirt-providers-config
+
+    curl -i -u admin:admin -H 'Content-type: application/json' -X PUT \
+    -d '{"sfc-of-renderer-config":{"sfc-of-table-offset":"150","sfc-of-app-egress-table-offset":"11"}}' \
+    http://${mgmt_addr}:${odl_port}/restconf/config/sfc-of-renderer:sfc-of-renderer-config
+}
+
 envSetup
 deployTackerClient
 deployJsonrpclib
@@ -359,6 +371,7 @@ deployTackerServer
 populate_client
 orchestarte
 populate_rc
+coexistence
 
 remove_repo "$MYREPO"
 remove_repo "$DEPREPO"