Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379794 )

Change subject: Phabricator: Remove ubuntu / upstart support
......................................................................


Phabricator: Remove ubuntu / upstart support

We are on jessie now which supports systemd,
lets remove support for upstart but at the same time
remove support for ubuntu too.

Change-Id: I24f0c142416fa2b848170888ce26c11ba88c3d3a
---
M modules/phabricator/manifests/aphlict.pp
M modules/phabricator/manifests/init.pp
M modules/phabricator/manifests/vcs.pp
D modules/phabricator/templates/initscripts/aphlict.upstart.erb
D modules/phabricator/templates/initscripts/phd.upstart.erb
D modules/phabricator/templates/initscripts/ssh-phab.upstart.erb
6 files changed, 4 insertions(+), 90 deletions(-)

Approvals:
  20after4: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/phabricator/manifests/aphlict.pp 
b/modules/phabricator/manifests/aphlict.pp
index 960ba8c..0c565f8 100644
--- a/modules/phabricator/manifests/aphlict.pp
+++ b/modules/phabricator/manifests/aphlict.pp
@@ -84,7 +84,6 @@
     base::service_unit { 'aphlict':
         ensure         => $ensure,
         systemd        => systemd_template('aphlict'),
-        upstart        => upstart_template('aphlict'),
         require        => User[$user],
         service_params => {
             ensure     => $service_ensure,
diff --git a/modules/phabricator/manifests/init.pp 
b/modules/phabricator/manifests/init.pp
index 3f950c8..05ad2a2 100644
--- a/modules/phabricator/manifests/init.pp
+++ b/modules/phabricator/manifests/init.pp
@@ -106,6 +106,7 @@
     # https://secure.phabricator.com/rPa2cd3d9a8913d5709e2bc999efb75b63d7c19696
     if os_version('debian >= stretch') {
         package { [
+            'php-apcu',
             'php-mysql',
             'php-gd',
             'php-mailparse',
@@ -117,10 +118,10 @@
                 ensure => present;
         }
         include ::apache::mod::php7
-    }
-    # jessie or trusty - PHP (5.5/5.6) packages and Apache module
-    if os_version('ubuntu == trusty || debian == jessie') {
+    } else {
+        # jessie - PHP (5.5/5.6) packages and Apache module
         package { [
+            'php5-apcu',
             'php5-mysql',
             'php5-gd',
             'php5-mailparse',
@@ -147,17 +148,6 @@
     # common Apache modules
     include ::apache::mod::rewrite
     include ::apache::mod::headers
-
-    # APC(u) package is different in all 3 releases
-    if os_version('debian == jessie') {
-        package { 'php5-apcu': ensure => present; }
-    }
-    if os_version('debian >= stretch') {
-        package { 'php-apcu': ensure => present; }
-    }
-    if os_version('ubuntu == trusty') {
-        package { 'php-apc': ensure => present; }
-    }
 
     $docroot = "${phabdir}/phabricator/webroot"
 
@@ -336,7 +326,6 @@
     base::service_unit { 'phd':
         ensure         => 'present',
         systemd        => systemd_template('phd'),
-        upstart        => upstart_template('phd'),
         require        => $base_requirements,
         service_params => {
             ensure     => $phd_service_ensure,
diff --git a/modules/phabricator/manifests/vcs.pp 
b/modules/phabricator/manifests/vcs.pp
index a4b2672..f7a0569 100644
--- a/modules/phabricator/manifests/vcs.pp
+++ b/modules/phabricator/manifests/vcs.pp
@@ -92,7 +92,6 @@
         base::service_unit { 'ssh-phab':
             ensure  => 'present',
             systemd => systemd_template('ssh-phab'),
-            upstart => upstart_template('ssh-phab'),
             require => Package['openssh-server'],
         }
     }
diff --git a/modules/phabricator/templates/initscripts/aphlict.upstart.erb 
b/modules/phabricator/templates/initscripts/aphlict.upstart.erb
deleted file mode 100644
index 22b7958..0000000
--- a/modules/phabricator/templates/initscripts/aphlict.upstart.erb
+++ /dev/null
@@ -1,19 +0,0 @@
-# aphlict - Phabricator notification server
-#
-# Routes real-time notifications to websocket clients
-
-description "Phabricator notification websocket server"
-
-setuid <%= scope.lookupvar('phabricator::aphlict::user') %>
-setgid <%= scope.lookupvar('phabricator::aphlict::group') %>
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-umask 022
-
-expect stop
-
-exec <%= scope.lookupvar('phabricator::aphlict::aphlict_start_cmd') %>
diff --git a/modules/phabricator/templates/initscripts/phd.upstart.erb 
b/modules/phabricator/templates/initscripts/phd.upstart.erb
deleted file mode 100644
index d97c604..0000000
--- a/modules/phabricator/templates/initscripts/phd.upstart.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-# Phabricator daemons init script
-description     "Phabricator Daemons supervisor"
-author          "Wikimedia Foundation"
-
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-oom never
-
-kill timeout 86400 #If it's given a stop order, this is how long it will take 
to stop.
-
-setuid phd
-setgid phd
-
-env PHD_HOME=/srv/phab/phabricator
-env PHABRICATOR_ENV=phd
-
-pre-start script
-    # Start phd
-    exec $PHD_HOME/bin/phd start --force
-end script
-
-post-stop script
-    # Stop phd
-    exec $PHD_HOME/bin/phd stop --force
-end script
diff --git a/modules/phabricator/templates/initscripts/ssh-phab.upstart.erb 
b/modules/phabricator/templates/initscripts/ssh-phab.upstart.erb
deleted file mode 100644
index bc868df..0000000
--- a/modules/phabricator/templates/initscripts/ssh-phab.upstart.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-# ssh - Phabricator OpenBSD Secure Shell server
-#
-# The OpenSSH server provides secure shell access to the system.
-
-description    "Phabricator OpenSSH server"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-umask 022
-env PHABRICATOR_ENV=phd
-env SSH_SIGSTOP=1
-expect stop
-
-# 'sshd -D' leaks stderr and confuses things in conjunction with 'console log'
-console none
-
-pre-start script
-    test -x /usr/sbin/sshd || { stop; exit 0; }
-    test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }
-
-    mkdir -p -m0755 /var/run/sshd
-end script
-
-exec /usr/sbin/sshd -D -f <%= @sshd_config %>

-- 
To view, visit https://gerrit.wikimedia.org/r/379794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I24f0c142416fa2b848170888ce26c11ba88c3d3a
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to