Skip to content

Commit

Permalink
#19: Finalizing upgrade to PHP 7.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Jan 19, 2017
1 parent e22f0cb commit edf9f15
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docker/assets-control/boot-application.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sudo -u www-data php bin/console doctrine:migrations:migrate --no-interaction

/etc/init.d/rsyslog start
/usr/sbin/cron
/etc/init.d/php5-fpm start
/etc/init.d/php7.1-fpm start
/etc/init.d/nginx start

echo "All done."
Expand Down
2 changes: 1 addition & 1 deletion docker/assets-monitor/boot-application.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 JRE_HOME=/usr/lib/jvm/java-7-openjdk
--ttl 3600 \
>> /var/log/browsermob-proxy.log 2>&1 &

/etc/init.d/php5-fpm start
/etc/init.d/php7.1-fpm start
/etc/init.d/nginx start

echo "All done."
Expand Down
2 changes: 1 addition & 1 deletion puppet/hieradata/role/control-and-monitor-app-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ classes:
- base
- selenium
- browsermob-proxy
- php5
- php7_1
- composer
- user-journeymonitor
- nodejs
Expand Down
2 changes: 1 addition & 1 deletion puppet/hieradata/role/control-app-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
classes:
- base-minimal
- base
- php5
- php7_1
- composer
- user-journeymonitor
- nodejs
Expand Down
2 changes: 1 addition & 1 deletion puppet/hieradata/role/control-app-server.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
classes:
- base
- php5
- php7_1
- composer
- user-journeymonitor
- nodejs
Expand Down
2 changes: 1 addition & 1 deletion puppet/hieradata/role/monitor-app-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ classes:
- base-minimal
- selenium
- browsermob-proxy
- php5
- php7_1
- composer
- user-journeymonitor
- cronjobs
Expand Down
2 changes: 1 addition & 1 deletion puppet/hieradata/role/monitor-app-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ classes:
- base
- selenium
- browsermob-proxy
- php5
- php7_1
- composer
- user-journeymonitor
- nodejs
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions puppet/modules/composer/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
class composer {

file { "/usr/bin/composer-1.0.0.phar":
file { "/usr/bin/composer-1.3.1.phar":
owner => "root",
group => "root",
mode => 06755,
source => "puppet:///modules/composer/usr/bin/composer-1.0.0.phar",
source => "puppet:///modules/composer/usr/bin/composer-1.3.1.phar",
require => [ Class["php7_1"] ],
}

file { "/usr/bin/composer":
ensure => "link",
target => "/usr/bin/composer-1.0.0.phar",
require => File["/usr/bin/composer-1.0.0.phar"],
target => "/usr/bin/composer-1.3.1.phar",
require => File["/usr/bin/composer-1.3.1.phar"],
}

}
7 changes: 6 additions & 1 deletion puppet/modules/jdk8/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
creates => "/etc/apt/sources.list.d/openjdk-r-ppa-trusty.list"
}

exec { "apt-get update after adding openjdk-8-jdk ppa for jdk8":
command => "/usr/bin/apt-get update",
require => [ Exec["add openjdk-8-jdk ppa for jdk8"] ]
}

package { ["openjdk-7-jdk"]:
ensure => "purged",
}

package { ["openjdk-8-jdk"]:
ensure => "installed",
require => [ Exec["add openjdk-8-jdk ppa for jdk8"], Exec["apt-get update"] ]
require => [ Exec["apt-get update after adding openjdk-8-jdk ppa for jdk8"] ]
}

}
8 changes: 4 additions & 4 deletions puppet/modules/nginx/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
group => "root",
mode => 0644,
content => template("nginx/etc/nginx/sites-available/journeymonitor.com.erb"),
require => [ Package["nginx"], Package["php7_1-fpm"] ],
require => [ Package["nginx"], Package["php7.1-fpm"] ],
notify => Service["nginx"],
}

file { "/etc/nginx/sites-enabled/default":
ensure => "absent",
require => [ Package["nginx"], Package["php7_1-fpm"] ],
require => [ Package["nginx"], Package["php7.1-fpm"] ],
notify => Service["nginx"],
}

file { "/etc/nginx/sites-enabled/journeymonitor.com":
ensure => "link",
target => "/etc/nginx/sites-available/journeymonitor.com",
require => [ Package["nginx"], Package["php7_1-fpm"] ],
require => [ Package["nginx"], Package["php7.1-fpm"] ],
notify => Service["nginx"],
}

Expand All @@ -42,7 +42,7 @@
hasrestart => true,
restart => "/etc/init.d/nginx configtest && /etc/init.d/nginx reload", # Only restart if configuration is okay
enable => true,
require => [ File["/etc/nginx/sites-enabled/journeymonitor.com"], Package["nginx"], Package["php7_1-fpm"] ],
require => [ File["/etc/nginx/sites-enabled/journeymonitor.com"], Package["nginx"], Package["php7.1-fpm"] ],
}

}
27 changes: 23 additions & 4 deletions puppet/modules/php7_1/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
class php7_1 ($fpm_user = "www-data") {

# We want a PHP 7.1-only system as far as possible
package { ["php5-cli", "php5-sqlite", "php5-curl", "php5-fpm", "php5-common", "php5-json", "php5-readline"]:
package { [
"php5-cli",
"php5-sqlite",
"php5-curl",
"php5-fpm",
"php5-common",
"php5-json",
"php5-readline"
]:
ensure => absent,
require => Exec["apt-get update"],
}

exec { "add ondrej/php ppa":
command => "LC_ALL=C.UTF-8 /usr/bin/add-apt-repository --yes ppa:ondrej/php",
creates => "/etc/apt/sources.list.d/ondrej-php-trusty.list"
environment => [
"LC_ALL=C.UTF-8",
],
command => "/usr/bin/add-apt-repository --yes ppa:ondrej/php",
creates => "/etc/apt/sources.list.d/ondrej-php-trusty.list",
require => Package[ "software-properties-common" ]
}

exec { "apt-get update after adding ondrej/php ppa":
command => "/usr/bin/apt-get update",
require => [ Exec["add ondrej/php ppa"] ]
}

package { ["php7.1-cli", "php7.1-sqlite3", "php7.1-curl", "php7.1-fpm"]:
package { [
"php7.1-cli",
"php7.1-sqlite3",
"php7.1-curl",
"php7.1-fpm",
"php7.1-xml",
"php7.1-mbstring"
]:
ensure => present,
require => Exec["apt-get update after adding ondrej/php ppa"],
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# managed by puppet
; managed by puppet
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
Expand Down

0 comments on commit edf9f15

Please sign in to comment.