summaryrefslogtreecommitdiffstats
path: root/odl-pipeline/lib/odl_reinstaller.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-06-25 17:58:36 -0400
committerTim Rozet <trozet@redhat.com>2018-06-26 15:11:38 -0400
commit1180e1b5fdcfc51a453640b345060daef2533c1d (patch)
tree18a9db1eb8fa7c895f624e86eb2fecd23d6122c5 /odl-pipeline/lib/odl_reinstaller.sh
parentc4ac6f6475fe7a6b7ebceba1a7af3ee6af5138fe (diff)
Adds support for docker based opendaylight
Previously we used ODL as a systemd service. However in newer OOO it is ran as a docker container. For reinstalling ODL in this case we determined that the best way is to not mess with docker and simply shut it down, and use the systemd for the CSIT verification. This patch stops the docker container, then copies a systemd service file (since RPM may never have been installed), and then allows ODL reinstall to proceed as usual. Change-Id: Ib0996ed5494f1ef37bcc232f087f563c99db62fc Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'odl-pipeline/lib/odl_reinstaller.sh')
-rwxr-xr-x[-rw-r--r--]odl-pipeline/lib/odl_reinstaller.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/odl-pipeline/lib/odl_reinstaller.sh b/odl-pipeline/lib/odl_reinstaller.sh
index cb34489..a55f16c 100644..100755
--- a/odl-pipeline/lib/odl_reinstaller.sh
+++ b/odl-pipeline/lib/odl_reinstaller.sh
@@ -11,4 +11,24 @@ set -e
export PYTHONPATH=$PYTHONPATH:$DIR
mkdir -p $DIR/tmp
cd $DIR
+cat > opendaylight.service << EOF
+[Unit]
+Description=OpenDaylight SDN Controller
+Documentation=https://wiki.opendaylight.org/view/Main_Page http://www.opendaylight.org/
+After=network.service
+
+[Service]
+Type=forking
+ExecStart=/opt/opendaylight/bin/start
+Environment=_JAVA_OPTIONS='-Djava.net.preferIPv4Stack=true'
+User=odl
+Group=odl
+SuccessExitStatus=143
+LimitNOFILE=102400
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+EOF
+curl --fail --silent -L -O http://artifacts.opnfv.org/apex/random/aaa-cli-jar.jar
python ./odl_reinstaller/odl_reinstaller.py $@