Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian 9 (Stretch) support #439

Closed
SimonHoenscheid opened this issue Apr 22, 2018 · 10 comments
Closed

Debian 9 (Stretch) support #439

SimonHoenscheid opened this issue Apr 22, 2018 · 10 comments

Comments

@SimonHoenscheid
Copy link
Member

SimonHoenscheid commented Apr 22, 2018

I am currently migrating my servers to Debian 9, I had a closer look at the pull requests in the last weeks but did not see direct Debian 9 support, besides that the Sury repo was added. Am I overseeing any commits? Otherwise I would be happy to add the support for Debian 9.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: All supported versions
  • Ruby: depends, look above
  • Distribution: debian 9
  • Module version: 5.3.0

How to reproduce (e.g Puppet code you use)

Running this module on Debian Stretch

What are you seeing

Module tries to install php5

What behaviour did you expect instead

module installs php7.0

@c33s
Copy link
Member

c33s commented Apr 22, 2018

the module work for debian9 but i think you have to add some config in hiera for it.

how are you using the module? do you use hiera? do you just include php or do you add some kind of config?
have you enabled manage_repos? if yes you should disable it because on debian9 with managed repos = true you end up with dotdeb.org which is not compatible for debian9
which exact php version it tries to install?

try to add the following to your hiera:

php::manage_repos: false

then you should end up with the native php 7.0 but my personal tip would be to go for the following

php::globals::php_version: '7.1'
php::manage_repos: true
php::repo::debian::location: https://packages.sury.org/php/
php::repo::debian::release: "%{::facts.os.distro.codename}"
php::repo::debian::repos: main
php::repo::debian::key:
  id: DF3D585DB8F0EB658690A554AC0E47584A7A714D
  source: https://packages.sury.org/php/apt.gpg
php::repo::debian::sury: false

then you should get surys php7.1

i am currently working on the debian repo refactoring, so i think it would only interfere my work. #436

if you really want to help you can have a look at #433
i want to try the module with different vagrant machines and debug why the tests are suddenly broken. because of a reason i don't know the wrong libdb is required:

@bastelfreak
Copy link
Member

Hi @SimonHoenscheid. Our idea was to first fix / merge #436 and afterwards implement Debian 9 support. Are you interested in contributing? You can help reviewing #436 or hance our acceptence test matrix

@bastelfreak
Copy link
Member

ups, @c33s was a minute faster.

@SimonHoenscheid
Copy link
Member Author

Hi @c33s this is interesting. I just followed the default config example. Which worked fine for jessie and also should work for stretch with the default php 7.0 from debian itself . I added the code needed and added the tests. PR in a bit.

SimonHoenscheid pushed a commit to SimonHoenscheid/puppet-php that referenced this issue Apr 22, 2018
@SimonHoenscheid
Copy link
Member Author

@bastelfreak sorry just saw your comment, I am happy to help anyhow.

@SimonHoenscheid
Copy link
Member Author

@bastelfreak something that got my attention during adding the code were the conditions attachd to the OSes, they are more complex than they need to be, maybe its also a good thing to clean them up later

@c33s
Copy link
Member

c33s commented Apr 22, 2018

@SimonHoenscheid can you please post your config here? i would be interested in how you called it exactly

@SimonHoenscheid
Copy link
Member Author

include '::php'

#PHP
php::ensure: latest
php::fpm: true
php::dev: true
php::fpm::settings:
  'PHP/max_execution_time': '90'
  'PHP/max_input_time': '300'
  'PHP/memory_limit': '64M'
  'PHP/post_max_size': '32M'
  'PHP/upload_max_filesize': '32M'
  'Date/date.timezone': 'Europe/Berlin'
  'PHP/short_open_tag': 'On'
  'PHP/always_populate_raw_post_data': '-1'


php::extensions:
  apcu: {
    package_prefix: 'php-'
  }
  curl: {}
  gd: {}
  imagick: {
    package_prefix: 'php-'
  }
  imap: {}
  intl: {}
  mcrypt: {}
  memcache: {
    package_prefix: 'php-'
  }
  mysql: {}
  pspell: {}
  recode: {}
  snmp: {}
  sqlite3: {}
  tidy: {}
  xmlrpc: {}
  xsl: {}
php::fpm::pools:
  www:
    listen: '/var/run/fpmpool-www.socket'
    listen_owner: 'www-data'
    listen_group: 'www-data'
    pm: 'dynamic'
    pm_max_children: '25'
    pm_max_requests: '500'
    pm_max_spare_servers: '20'
    pm_min_spare_servers: '10'
    pm_start_servers: '10'
    request_terminate_timeout: '60s'
    pm_status_path: '/fpm-status'
    rlimit_core: 'unlimited'
    rlimit_files: '32000'
    catch_workers_output: 'yes'

@c33s
Copy link
Member

c33s commented Apr 22, 2018

thank you. yes it is the missing php::manage_repos: false part. if you simply add this to your hiera it should work out of the box (of course your fix is better than a workaround).

@SimonHoenscheid
Copy link
Member Author

This is now ready to merge. builds are green

motivator pushed a commit to bigcommerce/puppet-php that referenced this issue Oct 5, 2020
…e: debians php extension prefix naming is inconsistent, some packages have php7.0- others php-. The user needs to solve this by setting package_prefix for the extension

added spec tests for debian 9

updated metadata json, closes voxpupuli#439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants