A Puppet module to store custom classes, templates, and files to share between Puppet Master configurations
The installation of Wordpress onto a server using Puppet needs to be done in multiple steps, if tall of he following criteria are met:
- You want to enable the Multisite/Network feature
- This is the first site to be installed on the server
-
Allow Multisite to be configured by running the class with multisite = 'allow'. For example:
class { 'lieutdan13::wordpress': db_password => 'random_password', db_user => 'wordpress', multisite => 'allow', version => 'latest', }
-
Run puppet on the machine
-
Initialize the first/primary blog for the Wordpress network by visiting the blog's url
- This assumes that the DNS and firewall are configured properly and you have access to the url in a browser
-
Login to the blog's admin panel with the user created
-
Go to Tools --> Network Setup and initialize the Network
-
Select "Sub-domains" and click "Install"
-
Set Multisite to be migrated by running the class with multisite = 'migrate'.
- If you also want to enable the multi-database feature, set multidb = true.
- For example:
class { 'lieutdan13::wordpress': db_password => 'random_password', db_user => 'wordpress', multidb => true/false, multisite => 'migrate', options => { 'main_site' => 'blogs.example.com', }, version => 'latest', }
-
Run puppet on the machine again
-
Login again to the admin panel
-
Go to My Sites --> Network Admin --> Dashboard
-
Go to Settings --> Network Settings and configure the blog accordingly
-
Go to Settings --> Domain Mapping and configure accordingly
-
If you chose to enable the multidb feature:
- Go to Plugins and activate SharDB site admin utilities network-wide
- Go to Settings --> SharDB Migration and perform the migration of the sites
-
Enable Multisite completely by running the class with multisite = true. For example:
class { 'lieutdan13::wordpress': db_password => 'random_password', db_user => 'wordpress', multidb => true/false, multisite => true, options => { 'main_site' => 'blogs.example.com', }, version => 'latest', }