Skip to content

Commit

Permalink
Add redeployment and external-access docs (#211)
Browse files Browse the repository at this point in the history
* Add redeployment and external-access docs

* Update external-access.md

* Test new operator-workflows

* Apply suggestions from review

* Update pytest version

* Update redeploy.md

* Update redeploy.md

---------

Co-authored-by: Yanks Yoon <[email protected]>
  • Loading branch information
weiiwang01 and yanksyoon authored May 3, 2024
1 parent 083f290 commit 50d0497
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
37 changes: 37 additions & 0 deletions docs/how-to/redeploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# How to Redeploy

This guide provides the necessary steps for migrating an existing WordPress
instance to a new charm instance.

## Migrate Database

Follow the instructions
in [the mysql charm migration guide](https://charmhub.io/mysql/docs/h-migrate-cluster-via-restore)
to migrate the content of the WordPress MySQL database.

## Migrate Media Files

### Media Files Stored in Kubernetes Storage

If your media files are stored in Kubernetes
storage (`wp_plugin_openstack-objectstorage_config` is not configured), use the
following steps to migrate your files:

1. Use the `juju scp` command to transfer files from
the `/var/www/html/wp-content/uploads` directory of the old `wordpress`
container to a local directory.
2. Use the `juju scp` command again to copy these files from the local
directory to the `/var/www/html/wp-content/uploads` directory in the new
WordPress charm instance's `wordpress` container.

### Media Files Stored in Object Storage

If your media files are stored in object storage and
the `wp_plugin_openstack-objectstorage_config` is not configured, you have two
options:

1. Provide the new WordPress charm instance with the same credentials and
connection information for the object storage. This allows the new instance
to automatically access the existing files.
2. Use tools like [rclone](https://rclone.org) to copy files from the old
storage bucket to a new bucket for the new deployment.
23 changes: 23 additions & 0 deletions docs/reference/external-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# External Access Requirements

The WordPress charm may need to connect to external services and resources for
certain functionalities.

## OpenStack Object Storage

When activated, the WordPress instance will need to connect to configured
OpenStack object storage for uploading and retrieval of media and assets.

## Akismet Spam Protection Plugin

The Akismet spam protection plugin, when enabled via the `wp_plugin_akismet_key`
configuration, requires internet access to connect with
the [Akismet API server](https://akismet.com/support/general/connection-issues/).
This connection is essential for verifying and managing spam content.

## Installing Additional Plugins or Themes

For the installation of additional plugins or themes, the WordPress instance
must access the main WordPress site to download installation files. Some plugins
or themes might also need internet access to operate correctly after they are
installed.
2 changes: 1 addition & 1 deletion tests/integration/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ juju>=2.9,<3
kubernetes>=25.3,<26
macaroonbakery==1.3.1
pillow
pytest
pytest==8.1.1
pytest-cov
pytest-operator
python-keystoneclient
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/requirements_juju3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ juju>=3.2.2
kubernetes>=25.3,<26
macaroonbakery==1.3.1
pillow
pytest
pytest==8.1.1
pytest-cov
pytest-operator
python-keystoneclient
Expand Down

0 comments on commit 50d0497

Please sign in to comment.