Using /opt/rapid to run prox 54/70254/2
authorLuc Provoost <luc.provoost@intel.com>
Tue, 2 Jun 2020 14:02:17 +0000 (16:02 +0200)
committerLuc Provoost <luc.provoost@intel.com>
Tue, 2 Jun 2020 15:40:20 +0000 (17:40 +0200)
All config files are now copied into /opt/rapid. We are not using the
home directory any more. The prox executable is now also copied into the
same /opt/rapid.

Change-Id: I838636167f370bf8a855a3cfb0796c659e27a3ad
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
VNFs/DPPD-PROX/helper-scripts/rapid/centos.json
VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh
VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py

index d7d8f1d..51784c0 100644 (file)
    }
 ],
 "provisioners": [
+   {
+   "type": "shell",
+   "inline": [
+     "sudo mkdir -p /opt/rapid",
+     "sudo chmod 0777 /opt/rapid" ]
+   },
    {
    "type": "file",
    "source": "./check_prox_system_setup.sh",
-   "destination": "~/"
+   "destination": "/opt/rapid/"
    },
    {
    "type": "file",
    "source": "./check-prox-system-setup.service",
-   "destination": "~/"
+   "destination": "/opt/rapid/"
    },
    {
    "type": "file",
    "source": "./sharkproxlog.sh",
-   "destination": "~/"
+   "destination": "/opt/rapid/"
    },
    {
    "type": "file",
    "source": "./deploycentostools.sh",
-   "destination": "~/"
+   "destination": "/opt/rapid/"
    },
    {
    "type": "shell",
    "inline": [
-     "chmod a+x ~/deploycentostools.sh",
-     "~/deploycentostools.sh -u deploy" ]
+     "chmod a+x /opt/rapid/deploycentostools.sh",
+     "/opt/rapid/deploycentostools.sh -u deploy" ]
    }
 ]
 }
index cca7f74..5d8ae1e 100755 (executable)
@@ -18,7 +18,6 @@ NCPUS="$(lscpu | egrep '^CPU\(s\):' | awk '{ print $2 }')"
 MAXCOREID="$((NCPUS-1))"
 
 filename="/etc/tuned/realtime-virtual-guest-variables.conf"
-#logfile="/home/centos/prox_system_setup.log"
 logfile="/opt/rapid/prox_system_setup.log"
 if [ -f "$filename" ]
 then
index d19abbe..345b081 100644 (file)
@@ -82,9 +82,9 @@ function os_cfg()
 
        # Install the check_tuned_params service to make sure that the grub cmd line has the right cpus in isolcpu. The actual number of cpu's
        # assigned to this VM depends on the flavor used. We don't know at this time what that will be.
-       ${SUDO} chmod +x ${HOME}/check_prox_system_setup.sh
-       ${SUDO} mv ${HOME}/check_prox_system_setup.sh /usr/local/libexec/
-       ${SUDO} mv ${HOME}/check-prox-system-setup.service /etc/systemd/system/
+       ${SUDO} chmod +x ${BUILD_DIR}/check_prox_system_setup.sh
+       ${SUDO} mv ${BUILD_DIR}/check_prox_system_setup.sh /usr/local/libexec/
+       ${SUDO} mv ${BUILD_DIR}/check-prox-system-setup.service /etc/systemd/system/
        ${SUDO} systemctl daemon-reload
        ${SUDO} systemctl enable check-prox-system-setup.service
     # Following lines are added to fix the following issue: When the VM gets
@@ -177,7 +177,7 @@ function prox_compile()
        # Compile PROX
        pushd ${BUILD_DIR}/samplevnf/VNFs/DPPD-PROX
        make -j`getconf _NPROCESSORS_ONLN`
-       ${SUDO} cp ${BUILD_DIR}/samplevnf/VNFs/DPPD-PROX/build/app/prox ${HOME}/prox
+       ${SUDO} cp ${BUILD_DIR}/samplevnf/VNFs/DPPD-PROX/build/app/prox ${BUILD_DIR}/prox
        popd > /dev/null 2>&1
 }
 
index 6143a99..2aa1acc 100644 (file)
@@ -29,6 +29,6 @@ class RapidDefaults(object):
         'screenloglevel' : 'INFO', # sets log level for writing to screen
         'runtime' : 10, # time in seconds for 1 test run
         'configonly' : False, # If True, the system will upload all the necessary config fiels to the VMs, but not start PROX and the actual testing
-        'rundir' : '~', # Directory where to find the tools in the machines running PROX
+        'rundir' : '/opt/rapid', # Directory where to find the tools in the machines running PROX
         'lat_percentile' : 0.99
         }