From 1180e1b5fdcfc51a453640b345060daef2533c1d Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Mon, 25 Jun 2018 17:58:36 -0400 Subject: 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 --- odl-pipeline/lib/odl_reinstaller.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) mode change 100644 => 100755 odl-pipeline/lib/odl_reinstaller.sh (limited to 'odl-pipeline/lib/odl_reinstaller.sh') diff --git a/odl-pipeline/lib/odl_reinstaller.sh b/odl-pipeline/lib/odl_reinstaller.sh old mode 100644 new mode 100755 index cb34489..a55f16c --- 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 $@ -- cgit 1.2.3-korg