From 4ba62d9db32b1624a8bb0cd1428fc8dd0ec37da7 Mon Sep 17 00:00:00 2001 From: Yifei Xue Date: Wed, 1 Mar 2017 16:39:43 +0800 Subject: Upgrade tacker from mitaka to newton JIRA: COMPASS-528 Add tacker package making scripts into repo/pip/ directory. Compass will install tacker using pip in this release. Upgrade tacker role including tasks, templates and vars. Modify the installation method from using source code to using whl package. Change-Id: Iead323c7b46d8d1df084ed868d0e01bc1b0f7e55 Signed-off-by: Yifei Xue --- .../ansible/roles/tacker/files/tacker.conf | 36 ++++++++++++++++++++++ .../ansible/roles/tacker/files/tacker.service | 19 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 deploy/adapters/ansible/roles/tacker/files/tacker.conf create mode 100644 deploy/adapters/ansible/roles/tacker/files/tacker.service (limited to 'deploy/adapters/ansible/roles/tacker/files') diff --git a/deploy/adapters/ansible/roles/tacker/files/tacker.conf b/deploy/adapters/ansible/roles/tacker/files/tacker.conf new file mode 100644 index 00000000..0c90dcb9 --- /dev/null +++ b/deploy/adapters/ansible/roles/tacker/files/tacker.conf @@ -0,0 +1,36 @@ +description "OpenStack Tacker Server" +author "Yifei Xue " + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +respawn limit 20 5 +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/tacker + chown root /var/$i/tacker + done +end script + +script + [ -x "/usr/local/bin/tacker-server" ] || exit 0 + DAEMON_ARGS="" + CONFIG_FILE="/usr/local/etc/tacker/tacker.conf" + USE_SYSLOG="" + USE_LOGFILE="" + NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/tacker/tacker.log" + [ -z "$NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG" ] && DAEMON_ARGS="$DAEMON_ARGS --config-file=$CONFIG_FILE" + + exec start-stop-daemon --start --chdir /var/lib/tacker \ + --chuid root:root --make-pidfile --pidfile /var/run/tacker/tacker.pid \ + --exec /usr/local/bin/tacker-server -- ${DAEMON_ARGS} +end script diff --git a/deploy/adapters/ansible/roles/tacker/files/tacker.service b/deploy/adapters/ansible/roles/tacker/files/tacker.service new file mode 100644 index 00000000..5fd61916 --- /dev/null +++ b/deploy/adapters/ansible/roles/tacker/files/tacker.service @@ -0,0 +1,19 @@ +[Unit] +Description=OpenStack Tacker Server +After= + +[Service] +User=root +Group=root +Type=simple +WorkingDirectory=/var/lib/tacker +PermissionsStartOnly=true +ExecStartPre=/bin/mkdir -p /var/lock/tacker /var/log/tacker /var/lib/tacker +ExecStartPre=/usr/bin/touch /var/log/tacker/tacker.log +ExecStart=/usr/local/bin/tacker-server --config-file /usr/local/etc/tacker/tacker.conf +Restart=on-failure +LimitNOFILE=65535 +TimeoutStopSec=15 + +[Install] +WantedBy=multi-user.target -- cgit 1.2.3-korg