decorative image for blog on zend php puppet images
March 30, 2023

Introducing the New Zend Puppet PHP Modules

PHP Development

Working with ZendPHP and Puppet just got a lot easier. With the introduction of two new modules for ZendPHP and ZendHQ — and the ability to manage ZendPHP using the puppet/php module —  teams now have a faster way to work with fully-supported EOL PHP runtimes from Zend.

In this article, we give an overview of the new Zend PHP Puppet modules, how they work, and how to get started.

Back to top

Introducing the New Zend PHP Puppet Modules

Have you ever wanted to integrate Zend’s PHP LTS runtimes with your Puppet pipeline only to find you’d need to roll your own manifests to do so? If so, we have new modules that can help.

Zend has now released open source puppet modules for our enterprise tools, like ZendHQ, as well as integrated with the community Puppet PHP module to allow for simple module settings that tell the module to use Zend’s PHP LTS instead of community PHP.

Zend currently has two official modules on Puppet Forge, with others planned as more features and products related to ZendPHP are released. 

The two new Zend PHP Puppet modules are:

zend/zend_common

The zend_common module is used by other Puppet modules, like zend/zendhq, to reliably set up and configure the Zend package repositories — as well as any required license files. This module, zend_common, is a dependency that can be disregarded when using product modules, but it can also be used as standalone in a more tailored and customized Puppet pipeline to simply ensure the Zend repositories and license are maintained by Puppet. See its usage documentation for more details. 

zend/zendhq

Users can now easily install ZendHQ and manage its configuration by using Zend’s zend/zendhq Puppet module, currently available on Puppet Forge. The ZendHQ puppet module allows users to define the license source and configuration settings, like the daemon URI, they would like ZendHQ to have. From there, the module uses zend/zend_common to ensure the Zend package repositories and license are setup and ensures that ZendHQ is installed and configured as intended. See its usage documentation for more details. 

Back to top

Using ZendPHP With puppet/php

The maintainers of puppet/php, Vox Pupuli, recently accepted a pull request that adds support for managing ZendPHP using the puppet/php module. This enhancement currently exists on the main branch of the repository, and it should make it into the next release. 

For now, users can tell Puppet to use the main branch for dependency instead of a version number by pointing it to the repository branch in their Puppetfile, like so:

mod 'puppet-php',
    :git => 'https://github.com/voxpupuli/puppet-php'

The pull request for ZendPHP support added two parameters to puppet/php: $flavor and $zend_creds. The flavor can either be community or zend, allowing users to choose whether to use community PHP or ZendPHP, respectively. If their flavor is zend and they define a version number that’s in LTS (i.e. 7.4), then zend_creds will be required, which are the credentials provided when you purchase a license. These credentials are necessary for accessing LTS versions in our Zend package repositories. See its usage documentation in puppet/php’s README for more details.

Back to top

Pulling it All Together With Zend Puppet Bolt Templates

Customers of Zend have the added luxury of access to our existing templates that utilize all of the above Puppet modules to rapidly and easily build a tailored Puppet Bolt pipeline. These templates currently have configurable plans for Nginx, Redis, ZendPHP, and ZendHQ to build and maintain a typical PHP stack. They also have configurable deployment plans for Digital Ocean, AWS, and custom (other clouds or even on-premise). Last but not least, they even come with examples for configuring and deploying a monolithic, single-server setup and multi-service/multi-server setups.

Back to top

Final Thoughts

Puppet and community PHP have worked well together historically thanks to the efforts of maintainers at Vox Pupuli. But, with more and more teams deploying EOL PHP versions, having ZendPHP (which includes PHP LTS) as an option that incorporates easily into their Puppet workflows can be a big help.

Explore ZendPHP

If you haven't had a chance yet, we highly encourage you to try ZendPHP, and to check out our container registry at cr.zend.com. If you have any questions on how to get started, or what we offer, be sure to contact us or reach out for pricing information.

Try ZendPHP for FreeRequest a Quote

Additional Resources

Back to top