Database connections

Many applications require databases to store information between sessions. In many large organizations, it is common to centralize these databases and point applications to them externally. The following example will consist of two profiles: one for the database and one for the application seeking to use the database.

The following sample uses puppetlabs-mysql from the Puppet Forge. MySQL is a free and open source SQL database that can be used without a license at home. There are other modules available for other databases, such as SQL Server, OracleDB, Kafka, and MongoDB. These modules can be used in a familiar fashion to provide exported resources to an external database.

In the following example, the appserver::database ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.