diff --git a/create-and-deploy-charms.rst b/create-and-deploy-charms.rst index 7e298b6ef8f433efc1ead62a3ee7610d470eab49..3b6879d61b85b13acdec76d51b450cdda2becc96 100644 --- a/create-and-deploy-charms.rst +++ b/create-and-deploy-charms.rst @@ -62,20 +62,20 @@ Configure Wordpress Charm summary: The wordpress CMS maintainer: Claudio Pisa <claudio.pisa@garr.it> description: | - The - wordpress - cms + The + wordpress + cms tags: - # Replace "misc" with one or more whitelisted tags from this list: - # https://jujucharms.com/docs/stable/authors-charm-metadata - - misc + # Replace "misc" with one or more whitelisted tags from this list: + # https://jujucharms.com/docs/stable/authors-charm-metadata + - misc subordinate: false series: [trusty] provides: - website: + website: interface: http requires: - database: + database: interface: mysql @@ -152,23 +152,23 @@ Configure Wordpress Charm juju deploy /tmp/charm-builds/wordpress watch -c juju status --color - As you can see, juju will do the following: + As you can see, juju will do the following: 1. Interact with your cloud/openstack/localhost to request the provisioning of a machine on which deploy the charm 2. Deploy the wordpress charm previously created - The wordpress application and unit will halt on the status: **'blocked'** because no other python function - was specified to be executed in the *wordpress.py* file after the **install_wordpress** function. + The wordpress application and unit will halt on the status: **'blocked'** because no other python function + was specified to be executed in the *wordpress.py* file after the **install_wordpress** function. - Also, the application status **'blocked'** is exactly what we expect to see since we wrote the following instruction in *wordpress.py*: + Also, the application status **'blocked'** is exactly what we expect to see since we wrote the following instruction in *wordpress.py*: - .. code-block:: python + .. code-block:: python - status_set('blocked', "wordpress installed, waiting for database") - - At this point, a charm that will install wordpress via apt and do nothing else it has been created and deployed. + status_set('blocked', "wordpress installed, waiting for database") + + At this point, a charm that will install wordpress via apt and do nothing else it has been created and deployed. @@ -253,13 +253,13 @@ Configure Wordpress application according to https://help.ubuntu.com/lts/serverg status_set('blocked', "wordpress installed, waiting for database") set_flag('wordpress.installed') - The modified function does the following: + The modified function does the following: - 1. writes into etc/apache2/sites-available/wordpress.conf + 1. writes into etc/apache2/sites-available/wordpress.conf - 2. executes the *sudo a2ensite wordpress* command + 2. executes the *sudo a2ensite wordpress* command - 3. restarts apache service + 3. restarts apache service 2. Create a directory named *templates* into the wordpress directory @@ -294,10 +294,10 @@ Configure Wordpress application according to https://help.ubuntu.com/lts/serverg status_set('active', 'Ready') - This function retrieves informations from the mysql unit regarding the account and database that was created when - the *juju add-relation mysql wordpress* command was executed. + This function retrieves informations from the mysql unit regarding the account and database that was created when + the *juju add-relation mysql wordpress* command was executed. - Then, writes these informations into the */etc/wordpress/config-default.php* file. + Then, writes these informations into the */etc/wordpress/config-default.php* file. 5. Build and deploy the wordpress charm with the last modifications: @@ -307,9 +307,9 @@ Configure Wordpress application according to https://help.ubuntu.com/lts/serverg juju upgrade-charm wordpress --path /tmp/charm-builds/wordpress watch -c juju status --color - The wordpress application and unit status will become **Ready**. + The wordpress application and unit status will become **Ready**. - The wordpress charm is correctly configured and ready to be used. + The wordpress charm is correctly configured and ready to be used. Expose Wordpress