diff --git a/docker/assets-control/boot-application.sh b/docker/assets-control/boot-application.sh index a2eb97a..10c75fc 100755 --- a/docker/assets-control/boot-application.sh +++ b/docker/assets-control/boot-application.sh @@ -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." diff --git a/docker/assets-monitor/boot-application.sh b/docker/assets-monitor/boot-application.sh index 0be6c6f..aa20105 100755 --- a/docker/assets-monitor/boot-application.sh +++ b/docker/assets-monitor/boot-application.sh @@ -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." diff --git a/puppet/hieradata/role/control-and-monitor-app-server.yaml b/puppet/hieradata/role/control-and-monitor-app-server.yaml index 762873b..d9596f0 100644 --- a/puppet/hieradata/role/control-and-monitor-app-server.yaml +++ b/puppet/hieradata/role/control-and-monitor-app-server.yaml @@ -3,7 +3,7 @@ classes: - base - selenium - browsermob-proxy - - php5 + - php7_1 - composer - user-journeymonitor - nodejs diff --git a/puppet/hieradata/role/control-app-container.yaml b/puppet/hieradata/role/control-app-container.yaml index 0b6bca0..2ae020c 100644 --- a/puppet/hieradata/role/control-app-container.yaml +++ b/puppet/hieradata/role/control-app-container.yaml @@ -2,7 +2,7 @@ classes: - base-minimal - base - - php5 + - php7_1 - composer - user-journeymonitor - nodejs diff --git a/puppet/hieradata/role/control-app-server.yaml b/puppet/hieradata/role/control-app-server.yaml index 90a289b..57fe64a 100644 --- a/puppet/hieradata/role/control-app-server.yaml +++ b/puppet/hieradata/role/control-app-server.yaml @@ -1,7 +1,7 @@ --- classes: - base - - php5 + - php7_1 - composer - user-journeymonitor - nodejs diff --git a/puppet/hieradata/role/monitor-app-container.yaml b/puppet/hieradata/role/monitor-app-container.yaml index bc1ea7a..d3f7260 100644 --- a/puppet/hieradata/role/monitor-app-container.yaml +++ b/puppet/hieradata/role/monitor-app-container.yaml @@ -3,7 +3,7 @@ classes: - base-minimal - selenium - browsermob-proxy - - php5 + - php7_1 - composer - user-journeymonitor - cronjobs diff --git a/puppet/hieradata/role/monitor-app-server.yaml b/puppet/hieradata/role/monitor-app-server.yaml index 35e6ace..89a737a 100644 --- a/puppet/hieradata/role/monitor-app-server.yaml +++ b/puppet/hieradata/role/monitor-app-server.yaml @@ -3,7 +3,7 @@ classes: - base - selenium - browsermob-proxy - - php5 + - php7_1 - composer - user-journeymonitor - nodejs diff --git a/puppet/modules/composer/files/usr/bin/composer-1.3.1.phar b/puppet/modules/composer/files/usr/bin/composer-1.3.1.phar new file mode 100644 index 0000000..5001689 Binary files /dev/null and b/puppet/modules/composer/files/usr/bin/composer-1.3.1.phar differ diff --git a/puppet/modules/composer/manifests/init.pp b/puppet/modules/composer/manifests/init.pp index cca1742..abac39a 100644 --- a/puppet/modules/composer/manifests/init.pp +++ b/puppet/modules/composer/manifests/init.pp @@ -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"], } } diff --git a/puppet/modules/jdk8/manifests/init.pp b/puppet/modules/jdk8/manifests/init.pp index 2471f22..681f53b 100644 --- a/puppet/modules/jdk8/manifests/init.pp +++ b/puppet/modules/jdk8/manifests/init.pp @@ -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"] ] } } diff --git a/puppet/modules/nginx/manifests/init.pp b/puppet/modules/nginx/manifests/init.pp index 7684d97..2b1c51c 100644 --- a/puppet/modules/nginx/manifests/init.pp +++ b/puppet/modules/nginx/manifests/init.pp @@ -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"], } @@ -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"] ], } } diff --git a/puppet/modules/php7_1/manifests/init.pp b/puppet/modules/php7_1/manifests/init.pp index 831cf8b..4a4a864 100644 --- a/puppet/modules/php7_1/manifests/init.pp +++ b/puppet/modules/php7_1/manifests/init.pp @@ -1,14 +1,26 @@ 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": @@ -16,7 +28,14 @@ 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"], } diff --git a/puppet/modules/php7_1/templates/etc/php/7.1/fpm/pool.d/www.conf.erb b/puppet/modules/php7_1/templates/etc/php/7.1/fpm/pool.d/www.conf.erb index 2c789fc..6307d1d 100644 --- a/puppet/modules/php7_1/templates/etc/php/7.1/fpm/pool.d/www.conf.erb +++ b/puppet/modules/php7_1/templates/etc/php/7.1/fpm/pool.d/www.conf.erb @@ -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)