From bfdbbf606524b23553f9d17e0ffe4e5dec9b9994 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 15 Dec 2016 15:08:54 +0000 Subject: [PATCH] Remove Trusty support from os_trove role Change-Id: I5f9d920cc99bcc62859663434b2615c317d8fbdc Implements: blueprint trusty-removal --- Vagrantfile | 8 ------ bindep.txt | 2 +- handlers/main.yml | 4 --- meta/main.yml | 1 - tasks/trove_init_common.yml | 5 ---- tasks/trove_init_upstart.yml | 39 ----------------------------- templates/trove-upstart-init.j2 | 44 --------------------------------- vars/ubuntu-14.04.yml | 31 ----------------------- 8 files changed, 1 insertion(+), 133 deletions(-) delete mode 100644 tasks/trove_init_upstart.yml delete mode 100644 templates/trove-upstart-init.j2 delete mode 100644 vars/ubuntu-14.04.yml diff --git a/Vagrantfile b/Vagrantfile index f5db13f..700b5c8 100755 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,14 +3,6 @@ Vagrant.configure(2) do |config| v.memory = 2048 v.cpus = 2 end - config.vm.define "ubuntu1404" do |trusty| - trusty.vm.box = "ubuntu/trusty64" - trusty.vm.provision "shell", inline: <<-SHELL - sudo su - - cd /vagrant - ./run_tests.sh - SHELL - end config.vm.define "ubuntu1604" do |xenial| xenial.vm.box = "ubuntu/xenial64" diff --git a/bindep.txt b/bindep.txt index fe58925..ee6c1ca 100755 --- a/bindep.txt +++ b/bindep.txt @@ -32,7 +32,7 @@ libselinux-python [platform:rpm] # For SSL SNI support python-pyasn1 [platform:dpkg] python-openssl [platform:dpkg] -python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-trusty] +python-ndg-httpsclient [platform:ubuntu] python2-pyasn1 [platform:rpm] pyOpenSSL [platform:rpm] python-ndg_httpsclient [platform:rpm] diff --git a/handlers/main.yml b/handlers/main.yml index 6e9e68c..e679bbf 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -19,7 +19,6 @@ service: name: "{{ trove_api_program_name }}" state: "restarted" - pattern: "{{ trove_api_program_name }}" failed_when: false when: not trove_use_mod_wsgi | bool @@ -27,21 +26,18 @@ service: name: "{{ trove_conductor_service_name }}" state: "restarted" - pattern: "{{ trove_conductor_service_name }}" failed_when: false - name: Restart trove taskmanager service service: name: "{{ trove_taskmanager_service_name }}" state: "restarted" - pattern: "{{ trove_taskmanager_service_name }}" failed_when: false - name: Restart Apache service: name: "apache2" state: "restarted" - pattern: "apache2" when: trove_use_mod_wsgi | bool register: apache_restart until: apache_restart|success diff --git a/meta/main.yml b/meta/main.yml index 60c802a..f3b1d88 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -9,7 +9,6 @@ galaxy_info: platforms: - name: Ubuntu versions: - - trusty - xenial galaxy_tags: - cloud diff --git a/tasks/trove_init_common.yml b/tasks/trove_init_common.yml index 21f1b95..7619983 100644 --- a/tasks/trove_init_common.yml +++ b/tasks/trove_init_common.yml @@ -16,11 +16,6 @@ # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens -- include: trove_init_upstart.yml - static: no - when: - - ansible_service_mgr == 'upstart' - - include: trove_init_systemd.yml static: no when: diff --git a/tasks/trove_init_upstart.yml b/tasks/trove_init_upstart.yml deleted file mode 100644 index 532c22a..0000000 --- a/tasks/trove_init_upstart.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Copyright 2016 Internet Solutions (Pty) Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# (c) 2016 Donovan Francesco -# (c) 2016 Paul Stevens -- name: Place the init script - template: - src: "trove-upstart-init.j2" - dest: "/etc/init/{{ program_name }}.conf" - mode: "0644" - owner: "root" - group: "root" - register: upstart_init - notify: - - Restart trove API services - - Restart trove conductor service - - Restart trove taskmanager service - - Restart Apache - -- name: Reload init scripts - command: initctl reload-configuration - when: upstart_init | changed - notify: - - Restart trove API services - - Restart trove conductor service - - Restart trove taskmanager service - - Restart Apache diff --git a/templates/trove-upstart-init.j2 b/templates/trove-upstart-init.j2 deleted file mode 100644 index ed7200f..0000000 --- a/templates/trove-upstart-init.j2 +++ /dev/null @@ -1,44 +0,0 @@ -# {{ ansible_managed }} - -# vim:set ft=upstart ts=2 et: - -description "{{ program_name }}" -author "Kevin Carter " - -start on runlevel [2345] -stop on runlevel [016] - -respawn -respawn limit 10 5 - -# Set the RUNBIN environment variable -env RUNBIN="{{ trove_bin }}/{{ program_name }}" - -# Change directory to service users home -chdir "{{ service_home }}" - -# Pre start actions -pre-start script - mkdir -p "/var/run/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/run/{{ program_name }}" - - mkdir -p "/var/lock/{{ program_name }}" - chown {{ system_user }}:{{ system_group }} "/var/lock/{{ program_name }}" - - . {{ trove_bin }}/activate - -end script - -# Post stop actions -post-stop script - rm "/var/run/{{ program_name }}/{{ program_name }}.pid" -end script - -# Run the start up job -exec start-stop-daemon --start \ - --chuid {{ system_user }} \ - --make-pidfile \ - --pidfile /var/run/{{ program_name }}/{{ program_name }}.pid \ - --exec "{{ program_override|default('$RUNBIN') }}" \ - -- {{ program_config_options|default('') }} \ - --log-file=/var/log/trove/{{ program_name }}.log diff --git a/vars/ubuntu-14.04.yml b/vars/ubuntu-14.04.yml deleted file mode 100644 index 68dc2e9..0000000 --- a/vars/ubuntu-14.04.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -# Copyright 2016 Internet Solutions (Pty) Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# (c) 2016 Donovan Francesco -# (c) 2016 Paul Stevens -cache_timeout: 600 - -trove_distro_packages: - - apache2 - - apache2-utils - - libapache2-mod-wsgi - - git - - build-essential - - python-dev - - python-software-properties - - python-pip - - mysql-client - - libxslt1-dev - - qemu-utils