wordpress #22

Supports: kubernetes

Deploy this charm on Kubernetes with the CLI. Find out how by reading the docs.

Description

WordPress is open source software you can use to create a beautiful website, blog, or app. https://wordpress.org/


WordPress Operator

A Juju charm for a Kubernetes deployment of WordPress, configurable to use a MySQL backend.

Overview

WordPress powers more than 39% of the web — a figure that rises every day. Everything from simple websites, to blogs, to complex portals and enterprise websites, and even applications, are built with WordPress. WordPress combines simplicity for users and publishers with under-the-hood complexity for developers. This makes it flexible while still being easy-to-use.

Usage

For details on using Kubernetes with Juju see here, and for details on using Juju with MicroK8s for easy local testing see here.

To deploy the charm and relate it to the MariaDB K8s charm within a Juju Kubernetes model:

juju deploy cs:~charmed-osm/mariadb-k8s
juju deploy cs:~wordpress-charmers/wordpress
juju add-relation wordpress mariadb-k8s:mysql

It will take about 5 to 10 minutes for Juju hooks to discover the site is live and perform the initial setup for you. Once the "Workload" status is "active", your WordPress site is configured.

To retrieve the auto-generated admin password, run the following:

juju run-action --wait wordpress/0 get-initial-password

You should now be able to browse to the IP address of the unit. Here's some sample output from juju status:

Unit            Workload     Agent  Address      Ports     Message
mariadb-k8s/0*  active       idle   10.1.234.43  3306/TCP  ready
wordpress/0*    active       idle   10.1.234.13  80/TCP    Pod configured

In this case our UNIT_IP is 10.1.234.13. If we visit http://${UNIT_IP}/ you'll see the WordPress site itself, or you can log in to the admin site at http://{$UNIT_IP}/wp-admin using a username of admin and the password from the get-initial-password action above.

For further details, see here.


Configuration

additional_hostnames
(string) Space separated list of aditional hostnames for the site.
blog_hostname
(string) Blog hostname
myblog.example.com
container_config
(string) YAML formatted map of container config keys & values. These are generally accessed from inside the image as environment variables. Use to configure customized WordPress images. This configuration gets logged; use container_secrets for secrets.
container_secrets
(string) YAML formatted map of secrets. Works just like container_config, except that values should not be logged.
db_host
(string) MySQL database host
db_name
(string) MySQL database name
wordpress
db_password
(string) MySQL database user's password
wordpress
db_user
(string) MySQL database user
wordpress
image
(string) The docker image to install. Required.
wordpresscharmers/wordpress:5.6
image_pass
(string) Password to use for the configured image registry, if required
image_user
(string) Username to use for the configured image registry, if required
initial_settings
(string) YAML formatted WordPress configuration. It is used only during initial deployment. Changing it at later stage has no effect. If set to non empty string required keys are: user_name: admin_username admin_email: name@example.com Optionally you can also provide weblog_title: Blog title # empty by default admin_password: <secret> # autogenerated if not set blog_public: False # by default blogs are public If admin_password is not provided it will be automatically generated and stored on the operator pod in the /root directory.
user_name: admin admin_email: devnull@example.com
ports
(string) Ports to expose, space separated list in name:8000 format. Names are alphanumeric + hyphen. e.g. "http:80 metrics:7127"
http:80
tls_secret_name
(string) The Kubernetes TLS secret resource name.
wp_plugin_akismet_key
(string) Akismet key. If empty, akismet will not be automatically enabled
wp_plugin_openid_team_map
(string) Launchpad teams and corresponding access levels, for use with the openid plugins. Valid WordPress access levels are: administrator, editor, author, contributor, subscriber If empty, OpenID will not be enabled. Format is key=value pairs (where key is the Launchpad team, and value is the WordPress role) - commas separate multiple pairs. Example format: "site-sysadmins=administrator,site-editors=editor,site-executives=editor"
wp_plugin_openstack-objectstorage_config
(string) YAML dictionary with keys named after WordPress settings and the desired values. Please note that the settings will be reset to values provided every time hooks run.