Skip to content
Snippets Groups Projects
Commit d2b509ae authored by Fabien Combernous's avatar Fabien Combernous
Browse files

Merge branch '22-add-multi-instances-example-in-readme' into 'master'

Resolve "Add multi instances example in README"

Closes #22

See merge request !19
parents ac0ee828 5894c9fc
No related branches found
No related tags found
1 merge request!19Resolve "Add multi instances example in README"
...@@ -2,6 +2,18 @@ ...@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## Release 1.1.2
**Features**
**Bugfixes**
* #22 Add multi instances example in README.
**Known Issues**
* #1 Fix resources attribute ensure set to latest from scratch.
## Release 1.1.1 ## Release 1.1.1
**Features** **Features**
......
...@@ -53,7 +53,7 @@ class { 'wordpress' : ...@@ -53,7 +53,7 @@ class { 'wordpress' :
The following code : The following code :
* downloads and installs WP-CLI. * downloads and installs WP-CLI.
* downloads and installs core WordPress in the last available version. * downloads and installs core WordPress in the last available version.
* creates tables in an all ready existing database `wp_mywpname`. * creates tables in an already existing database `wp_mywpname`.
* configures core WordPress * configures core WordPress
* sets the title of the instance. * sets the title of the instance.
* WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`. * WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`.
...@@ -82,11 +82,11 @@ class { 'wordpress' : ...@@ -82,11 +82,11 @@ class { 'wordpress' :
The following code : The following code :
* downloads and installs WP-CLI. * downloads and installs WP-CLI.
* downloads and installs core WordPress in the last available version. * downloads and installs core WordPress in the last available version.
* creates tables in an all ready existing database `wp_mywpname`. * creates tables in an already existing database `wp_mywpname`.
* configures core WordPress * configures core WordPress
* sets the title of the instance. * sets the title of the instance.
* WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`. * WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`.
* enables WordPress internal self update process. * enables WordPress internal self update process (disabled by default).
``` ```
class { 'wordpress' : class { 'wordpress' :
...@@ -113,14 +113,15 @@ class { 'wordpress' : ...@@ -113,14 +113,15 @@ class { 'wordpress' :
The following code : The following code :
* downloads and installs WP-CLI. * downloads and installs WP-CLI.
* downloads and installs core WordPress in the last available version. * downloads and installs core WordPress in the last available version.
* creates tables in an all ready existing database `wp_mywpname`. * creates tables in an already existing database `wp_mywpname`.
* configures core WordPress * configures core WordPress
* sets the title of the instance. * sets the title of the instance.
* WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`. * WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`.
* disables WordPress internal self update process. * disables WordPress internal self update process.
* configures puppet to make WordPress core and language update to latest available version at about 3 AM. * configures puppet to make WordPress core and language update to latest available version.
If an update occured, you will find in `/var/wordpress_archives` : If an update occured (checked one time each day), you will
find in `/var/wordpress_archives` :
* dump of database that was there before the update. * dump of database that was there before the update.
* archive of files that were there before the update. * archive of files that were there before the update.
...@@ -149,11 +150,10 @@ class { 'wordpress' : ...@@ -149,11 +150,10 @@ class { 'wordpress' :
The following code : The following code :
* downloads and installs WP-CLI. * downloads and installs WP-CLI.
* downloads and installs core WordPress in the last available version and in french. * downloads and installs core WordPress in the last available version and in french.
* creates tables in an all ready existing database `wp_mywpname`. * creates tables in an already existing database `wp_mywpname`.
* configures core WordPress * configures core WordPress
* sets the title of the instance. * sets the title of the instance.
* WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`. * WP-CLI is ran as `wp` user. Files are owned by already existing user `wp`.
* enables WordPress internal self update process.
* manages more than defaults themes and plugins provided with core. * manages more than defaults themes and plugins provided with core.
``` ```
...@@ -186,6 +186,67 @@ class { 'wordpress' : ...@@ -186,6 +186,67 @@ class { 'wordpress' :
} }
``` ```
### Several installations
The following code makes two installations on same Puppet node with dedicated settings :
* only WordPress in `wp2.foo.org` in updated by Puppet, the other is not updated at all.
* the two WordPress instances use the same database server.
* the list of used plugins and themes configure are differents in each intance.
```
class { 'wordpress':
settings => {
'wp2.foo.org' => {
ensure => 'latest',
owner => 'wp2',
locale => 'fr_FR',
dbhost => 'XX.XX.XX.XX',
dbname => 'wordpress2',
dbuser => 'wp2userdb',
dbpasswd => 'secret_a',
wproot => '/var/www/wp2.foo.org',
wptitle => 'hola this wp2 instance is installed by puppet',
wpadminuser => 'wpadmin',
wpadminpasswd => 'secret_b',
wpadminemail => 'bar@foo.org',
wpresources => {
plugin => [
{ name => 'plugin_a', 'ensure' => 'present' },
{ name => 'plugin_b', 'ensure' => 'absent' },
],
theme => [
{ name => 'themenew_a', 'ensure' => 'present' },
{ name => 'themeold_a', 'ensure' => 'absent' },
]
}
},
'wp3.foo.org' => {
owner => 'wp3',
dbhost => 'XX.XX.XX.XX',
dbname => 'wordpress3',
dbuser => 'wp3userdb',
dbpasswd => 'secret_c',
wproot => '/var/www/wp3.foo.org',
wptitle => 'hola this wp3 instance is installed by puppet',
wpadminuser => 'wpadmin',
wpadminpasswd => 'secret_d',
wpadminemail => 'bar@foo.org',
wpresources => {
plugin => [
{ name => 'plugin_a', 'ensure' => 'present' },
{ name => 'plugin_b', 'ensure' => 'absent' },
{ name => 'plugin_c', 'ensure' => 'absent' },
{ name => 'plugin_d', 'ensure' => 'absent' },
],
theme => [
{ name => 'themenew_b', 'ensure' => 'present' },
{ name => 'themeold_a', 'ensure' => 'absent' },
]
}
},
}
}
```
## Reference ## Reference
...@@ -193,7 +254,7 @@ Details in `REFERENCE.md`. ...@@ -193,7 +254,7 @@ Details in `REFERENCE.md`.
## Limitations ## Limitations
This module is tested with following OS : This module is tested with following OSes :
* Ubuntu 16.04 * Ubuntu 16.04
* Debian 8 * Debian 8
* CentOS 7 * CentOS 7
...@@ -206,6 +267,8 @@ Home at URL https://gitlab.adullact.net/adullact/puppet-wordpress ...@@ -206,6 +267,8 @@ Home at URL https://gitlab.adullact.net/adullact/puppet-wordpress
Issues and MR are wellcome. Issues and MR are wellcome.
Mirrored at URL https://github.com/adullact/puppet-wordpress
## Release Notes/Contributors/License. ## Release Notes/Contributors/License.
Details in `CHANGELOG.md`. Details in `CHANGELOG.md`.
......
{ {
"name": "adullact-wordpress", "name": "adullact-wordpress",
"version": "1.1.1", "version": "1.1.2",
"author": "adullact", "author": "adullact",
"summary": "Install and configure WordPress with WP-CLI tool.", "summary": "Install and configure WordPress with WP-CLI tool.",
"license": "AGPL-3.0", "license": "AGPL-3.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment