Testing an environment¶
You can confirm most aspects of the configuration by following these steps:
1. Initial setup¶
Access the environment via SSH and run the following management commands:
python manage.py migrate
(may indicate database connection issues that need addressing)python manage.py collectstatic
(may indicate file-system permission issues that need addressing)python manage.py update_index
(may indicate search-backend issues that need addressing)python manage.py createsuperuser
(remember your username and password for use in later steps)
Now, in your browser, visit: /admin/
When you see the login form, enter the credentials you set for your superuser and submit the form. (a failure here may indicate an issue with the app's SESSION_ENGINE
config).
2. Add/update an image¶
- Select the Images option from the Wagtail sidebar.
- Click the Add image button at the top of the page and follow the upload instructions.
- From the listing, click on the uploaded image to edit it, and adjust the focal point.
- If configured correctly, when you return to the list, you should see a freshly-generated thumbnail representation. The fact that you were able to save the image is evidence that the search backend is configured correctly.
3. Trigger a password reset¶
- Sign out using the menu in the bottom left of the Wagtail UI.
- From the login page, click the Forgotton it? link next to the password input.
- Enter the email address you set in the
createsuperuser
step above and request a password reset link. - If email is configured correctly, you'll receive the email.
4. Trigger an error¶
- Update the
SENTRY_DEBUG_URL_ENABLED
env var toTrue
for the environment and restart the container. - When the service is available again, visit the
/sentry-debug/
URL in your browser to trigger aZeroDivisionError
. - Log into Sentry and check the relevant project for a new issue event with an
environment
value matching theSENTRY_ENVIRONMNET
env var value set for the environment. - Once confirmed that Sentry is working, update the
SENTRY_DEBUG_URL_ENABLED
env var toFalse
for the environment, and restart the container.