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

Implement puppet module to install php #451

Closed
jeff1evesque opened this issue Mar 17, 2016 · 4 comments
Closed

Implement puppet module to install php #451

jeff1evesque opened this issue Mar 17, 2016 · 4 comments

Comments

@jeff1evesque
Copy link
Owner

We will implement a php puppet module, to install php 5.6.

@jeff1evesque jeff1evesque changed the title Update to Ubuntu 16.04 Implement puppet module to install php Mar 17, 2016
@jeff1evesque
Copy link
Owner Author

Our simplified configure_php.pp definition:

# variables
$working_dir = '/home/provisioner'

## define $PATH for all execs
Exec {path => ['/usr/bin/', '/usr/sbin/']}

## update yum using the added EPEL repository
class update_yum {
    exec { 'update-yum':
        command => 'yum -y update',
        timeout => 750,
    }
}

## install php
class install_php {
    ## set dependency
    require update_yum

    ## install php
    class { 'php': }
}

## constructor
class constructor {
    ## set dependency
    contain update_yum
    contain install_php
}
include constructor

generates the following traceback:

...
==> default: Running provisioner: puppet...
==> default: Running Puppet with environment development...
==> default: Error: Evaluation Error: Unknown function: 'params_lookup'. at /tmp
/vagrant-puppet/modules-3caf511b1ed192516806c35da44e64ef/php/manifests/init.pp:1
52:26 on node drupal-demonstration.com
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

So, we attempt to reduce the debug time, by implementing the same test, within the terminal console:

[provisioner@drupal-demonstration ~]$ cd ~
[provisioner@drupal-demonstration ~]$ ls
[provisioner@drupal-demonstration ~]$ puppet module install example42-php
Notice: Preparing to install into /home/provisioner/.puppetlabs/etc/code/modules
 ...
Notice: Created target directory /home/provisioner/.puppetlabs/etc/code/modules
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/provisioner/.puppetlabs/etc/code/modules
└─┬ example42-php (v2.0.25)
  └── example42-puppi (v2.1.12)
[provisioner@drupal-demonstration ~]$ sudo vi install_php.pp
[provisioner@drupal-demonstration ~]$ puppet apply install_php.pp
Warning: Config file /home/provisioner/.puppetlabs/etc/code/hiera.yaml not found
, using Hiera defaults
Notice: Compiled catalog for drupal-demonstration.com in environment production
in 1.57 seconds
Error: Could not find dependent Service[httpd] for File[php.conf] at /home/provi
sioner/.puppetlabs/etc/code/modules/php/manifests/init.pp:258

Specifically, we used the following definition for install_php.pp:

## install php
class install_php {
    ## install php
    class { 'php': }
}
contain install_php

@jeff1evesque
Copy link
Owner Author

We've created a corresponding issue, within the example42/puppet-php repository.

@jeff1evesque jeff1evesque added this to the 1.1 milestone Mar 25, 2016
jeff1evesque added a commit that referenced this issue Nov 21, 2017
@jeff1evesque
Copy link
Owner Author

After php configurations have been made, we need to restart our httpd server.

@jeff1evesque
Copy link
Owner Author

We forgot to make some commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant