WordPress

  • Canonical IS DevOps
Channel Revision Published Runs on
latest/stable 87 07 Mar 2024
Ubuntu 22.04 Ubuntu 20.04
latest/stable 13 06 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 118 08 Oct 2024
Ubuntu 22.04 Ubuntu 20.04
latest/edge 15 30 Mar 2023
Ubuntu 22.04 Ubuntu 20.04
juju deploy wordpress-k8s
Show information

Platform:

How to configure object storage

Object storage configuration is required for wordpress-k8s charm to work with multi-unit deployments.

Prerequisites

Follow the instructions on installing OpenStack from the OpenStack documentation. For testing purposes, you can install DevStack.

After successful installations, you should be able to see openrc file at the location of installation. Source openrc and load the credentials by running

source openrc && printenv | grep OS_

You should be able to see

The contents of the command above should look something similar to the following.

export OS_CACERT=
export OS_PROJECT_NAME=demo
export OS_TENANT_NAME=demo
export OS_USERNAME=demo
export OS_PASSWORD=<strong-password>
export OS_REGION_NAME=RegionOne
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_TYPE=password
export OS_AUTH_URL=http://<openstack-deployment-address>/identity
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
export OS_VOLUME_API_VERSION=3

Configure openstack-objectstorage plugin

To configure Swift storage for wordpress-k8s, copy and paste the following yaml content and adjust the values accordingly.

auth-url: http://<openstack-deployment-address>/identity/v3
bucket: WordPress
copy-to-swift: 1
domain: Default
object-prefix: wp-content/uploads/
password: <strong-password>
region: RegionOne
remove-local-file: 0
serve-from-swift: 1
swift-url: swift_auth_url # obtain the value by running `swift auth`. The value should look
something like http://<openstack-deployment-address>:8080/v3/AUTH_1d449b4237d3499dabd95210c33ca150, exported under
OS_STORAGE_URL key.
tenant: demo
username: demo

You can then configure wordpress-k8s charm using the yaml contents above.

juju config wordpress-k8s wp_plugin_openstack-objectstorage_config="$(cat <path-to-yaml>)"

Help improve this document in the forum (guidelines). Last updated 1 year, 3 months ago.