/ azure

Extreme Scale WordPress on Azure Pt 2

In our last adventure, we began setting up all the goodies needed for running some extreme scale (lots of levers to pull and knobs to turn) PaaS implementation of WordPress using Azure App Services for Containers. In this second part, we will continue our path and get up and running and configured.

First, let's set our Web Application's environment variables:

az webapp config appsettings set --resource-group wplab --name dermarwplab --settings WORDPRESS_DB_HOST="the server you created.mysql.database.azure.com" WORDPRESS_DB_USER="wpadmin@the server you created" WORDPRESS_DB_PASSWORD='awesome password' WORDPRESS_DB_NAME="wordpress" MYSQL_SSL_CA="BaltimoreCyberTrustroot.crt.pem" WEBSITES_ENABLE_APP_SERVICE_STORAGE=TRUE WP_REDIS_HOST="the redis you created.redis.cache.windows.net" WP_REDIS_PASSWORD='the key you copied from the last step plus='

This is all one line, not multiple lines. Replace funny comments with real values.

We are now ready to visit our site:

Shit! What happened?

Well, when you deploy Application Settings, you have to restart your containers so you can pick up the new settings. In the web app, just click "Restart" It may take a few moments to come back online and the responsiveness to the logs aren't amazing so just keep trying. Once up:

Horray, Wordpress!

Proceed with standard installation. Once you log in and hit the admin panel, you'll want to go to the Redis plugin to make sure it is online and connected:

Click Activate:

Activate Redis

Then Click Settings on the plugin to and then click Enable. It should connect almost immediately:

Woohoo - Go PaaS!

At this point, you have a fully functioning WordPress with some pretty amazing scale options. You can scale out and/or up the app service plan based on metrics within the containers. You can scale out or up the Redis cache depending on its metrics. One thing you can't do with this setup is scale Varnish and Wordpress independently, but that's for another project.

You can add CDN to this with the new Azure CDN also. I'll write that up for a new part coming soon. Hope you like!