Conform to interface change of ODL node in Fuel Deployment
[sdnvpn.git] / odl-pipeline / lib / odl_reinstaller.sh
1 #!/bin/bash
2 #
3 # Copyright (c) 2017 All rights reserved
4 # This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
10 set -e
11 export PYTHONPATH=$PYTHONPATH:$DIR
12 mkdir -p $DIR/tmp
13 cd $DIR
14 cat > opendaylight.service << EOF
15 [Unit]
16 Description=OpenDaylight SDN Controller
17 Documentation=https://wiki.opendaylight.org/view/Main_Page http://www.opendaylight.org/
18 After=network.service
19
20 [Service]
21 Type=forking
22 ExecStart=/opt/opendaylight/bin/start
23 Environment=_JAVA_OPTIONS='-Djava.net.preferIPv4Stack=true'
24 User=odl
25 Group=odl
26 SuccessExitStatus=143
27 LimitNOFILE=102400
28 Restart=on-failure
29
30 [Install]
31 WantedBy=multi-user.target
32 EOF
33 curl --fail --silent -L -O http://artifacts.opnfv.org/apex/random/aaa-cli-jar.jar
34 python ./odl_reinstaller/odl_reinstaller.py $@