Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redeployment and external-access docs #211

Merged
merged 9 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading