← Back to team overview

wordpress-charmers team mailing list archive

[Merge] ~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress:end-user into charm-k8s-wordpress:master

 

Tom Haddon has proposed merging ~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress:end-user into charm-k8s-wordpress:master.

Commit message:
Update docs to be more end-user focused, refer to discourse-based docs, and use correct casing of WordPress

Requested reviews:
  Canonical IS Reviewers (canonical-is-reviewers)
  Wordpress Charmers (wordpress-charmers)

For more details, see:
https://code.launchpad.net/~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress/+merge/396059

Update docs to be more end-user focused, refer to discourse-based docs, and use correct casing of WordPress
-- 
Your team Wordpress Charmers is requested to review the proposed merge of ~mthaddon/charm-k8s-wordpress/+git/charm-k8s-wordpress:end-user into charm-k8s-wordpress:master.
diff --git a/README.md b/README.md
index bd66985..fd5ed99 100644
--- a/README.md
+++ b/README.md
@@ -1,109 +1,46 @@
-# Wordpress Operator
+# WordPress Operator
 
-A Juju charm for a Kubernetes deployment of Wordpress, configurable to use a
+A Juju charm for a Kubernetes deployment of WordPress, configurable to use a
 MySQL backend.
 
 ## Overview
 
-This is a k8s charm and can only be deployed to to a Juju k8s cloud,
-attached to a controller using `juju add-k8s`.
+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.
 
-The image to spin up is specified in the `image` charm configuration
-option using standard docker notation (e.g. 'localhost:32000/mywork-rev42').
-The default image is built using an OCI Recipe on Launchpad and pushed to
-[the 'wordpresscharmers/wordpress' namespace on Dockerhub](https://hub.docker.com/r/wordpresscharmers/wordpress),
-but you can also use private images by specifying `image_user` and `image_pass` charm
-configuration.
+## Usage
 
-Configuration for the Wordpress image is in standard Juju config. In particular:
+For details on using Kubernetes with Juju [see here](https://juju.is/docs/kubernetes), and for
+details on using Juju with MicroK8s for easy local testing [see here](https://juju.is/docs/microk8s-cloud).
 
-* `db_host`, `db_user` & `db_password`. This charm may in future be relatable
-   to a MySQL deployment, when the MySQL charm is updated to support cross
-   model relations.
-* `ports`. Custom images may require additional ports to be opened, such
-   as those providing monitoring or metrics endpoints.
+To deploy the charm and relate it to the [MariaDB K8s charm](https://jaas.ai/u/charmed-osm/mariadb-k8s) within a Juju
+Kubernetes model:
 
-Additional runtime configuration is specified as YAML snippets in the charm config.
-Both `container_config` and `container_secrets` items are provided,
-and they are combined together. `container_config` gets logged,
-`container_secrets` does not. This allows you to configure customized
-Wordpress images.
-
-## Details
-
-To deploy in a test environment, first of all deploy MySQL into a IaaS model:
-
-    juju deploy cs:mysql
-
-Initialise the database as follows:
-
-    CREATE DATABASE wordpress CHARACTER SET utf8 COLLATE utf8_unicode_ci;
-    CREATE USER 'wordpress'@'%' IDENTIFIED BY 'wordpress';
-    GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'%';
-    FLUSH PRIVILEGES;
-
-The Wordpress k8s charm requires TLS secrets to be pre-configured to ensure
-logins are kept secure. Create a self-signed certificate and upload it as a
-Kubernetes secret (assuming you're using MicroK8s):
-
-    openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt
-    microk8s.kubectl create secret tls -n wordpress tls-wordpress --cert=server.crt --key=server.key
-
-Deploy the charm into your Kubernetes Juju model:
-
-    DB_HOST=$IP_OF_YOUR_MYSQL_DATABASE
-    juju deploy cs:~wordpress-charmers/wordpress \
-        --config db_host=$DB_HOST \
-        --config tls_secret_name=tls-wordpress
-
-From there you can test the site by updating your `/etc/hosts` file and creating
-a static entry for the IP address of the Kubernetes ingress gateway:
-
-    App        Version        Status   Scale  Charm      Store  Rev  OS          Address         Message
-    wordpress  wordpress:5.6  waiting      1  wordpress  local    0  kubernetes  10.152.183.140
-    
-    echo '10.152.183.140 myblog.example.com' | sudo tee -a /etc/hosts
+    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. Look for this line in the output of
-`juju debug-log` to confirm:
-
-    unit.wordpress/0.juju-log Wordpress configured and initialised
-
-This is due to [issue #166](https://github.com/canonical/operator/issues/166) and will be fixed once Juju supports a Kubernetes
-pod ready hook.
+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 https://myblog.example.com/wp-admin.
-
-## Quickstart
+You should now be able to browse to the IP address of the unit. Here's some
+sample output from `juju status`:
 
-Notes for deploying a test setup locally using microk8s:
+    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
 
-    sudo snap install juju --classic
-    sudo snap install juju-wait --classic
-    sudo snap install microk8s --classic
-    sudo snap alias microk8s.kubectl kubectl
+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.
 
-    microk8s.reset  # Warning! Clean slate!
-    microk8s.enable dns dashboard registry storage
-    microk8s.status --wait-ready
-    microk8s.config | juju add-k8s myk8s
-    juju bootstrap myk8s
-    juju add-model wordpress-test
-    juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath
-    juju deploy cs:~wordpress-charmers/wordpress-k8s --channel=edge wordpress
-    # TLS certificates are required for the ingress to function properly, self-signed is okay
-    # for testing but make sure you use valid ones in production.
-    openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt
-    kubectl create secret tls tls-wordpress --cert=server.crt --key=server.key
-    juju config wordpress db_host=10.1.1.1 db_user=wp db_password=secret tls_secret_name=tls-wordpress \
-        initial_settings="user_name: admin
-        admin_email: devnull@xxxxxxxxxxxxx
-        weblog_title: Test Blog
-        blog_public: False"
-    juju wait
-    juju status # Shows IP address, and port is 80
+For further details, [see here](https://charmhub.io/wordpress/docs).
diff --git a/config.yaml b/config.yaml
index 4a4604e..b0ee33b 100644
--- a/config.yaml
+++ b/config.yaml
@@ -42,7 +42,7 @@ options:
     description: >
       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
+      Use to configure customized WordPress images. This configuration
       gets logged; use container_secrets for secrets.
     default: ""
   container_secrets:
@@ -54,7 +54,7 @@ options:
   initial_settings:
       type: string
       description: >
-        YAML formatted Wordpress configuration. It is used only
+        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:
 
@@ -85,12 +85,12 @@ options:
     description: >
       Launchpad teams and corresponding access levels, for use with the openid plugins.
 
-      Valid Wordpress access levels are: administrator, editor, author, contributor, subscriber
+      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.
+      the WordPress role) - commas separate multiple pairs.
 
       Example format:
 
diff --git a/metadata.yaml b/metadata.yaml
index 89749b4..e97fe57 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -1,6 +1,7 @@
 name: "wordpress"
-summary: "Wordpress, uses official Docker Wordpress image by default"
-description: "Wordpress, uses official Docker Wordpress image by default"
+summary: "WordPress is open source software you can use to create a beautiful website, blog, or app."
+description: "WordPress is open source software you can use to create a beautiful website, blog, or app. https://wordpress.org/";
+docs: https://discourse.charmhub.io/t/wordpress-documentation-overview/4052
 min-juju-version: 2.8.0
 maintainers:
   - https://launchpad.net/~wordpress-charmers <wordpress-charmers@xxxxxxxxxxxxxxxxxxx>

Follow ups