lab2: ask to use secrets

This commit is contained in:
Cedric Girard 2020-01-08 11:25:19 +01:00
parent 247b43adc5
commit 50a85f8c24

View file

@ -23,14 +23,19 @@
* Delete the mariadb container to have it recreated. * Delete the mariadb container to have it recreated.
* Go back to Wordpress and note that all previous work is now lost. * Go back to Wordpress and note that all previous work is now lost.
## Store MySQL credentials in a secret
* Create a `secret` containing mysql user (`root`) and the corresponding password.
* Update the mariadb deployment to use this secret for the root password.
## Put Wordpress database settings into environment variables ## Put Wordpress database settings into environment variables
* Edit the wordpress deployment and add the following environment variables with appropriate values: * Edit the wordpress deployment and add the following environment variables with appropriate values:
* WORDPRESS_DB_HOST * WORDPRESS_DB_HOST
* WORDPRESS_DB_NAME * WORDPRESS_DB_NAME
* WORDPRESS_DB_USER * WORDPRESS_DB_USER from the secret previously created
* WORDPRESS_DB_PASSWORD * WORDPRESS_DB_PASSWORD from the secret previously created
* Confirm the database settings are now automatically configured. * Confirm the database settings are now automatically configured at first wordpress start
## Persist the MariaDB volume ## Persist the MariaDB volume