This post was written by Jeevan Joseph, a principal solution architect on the Developer Adoption team in Oracle Cloud Infrastructure.
We’re pleased to announce a new Quick Start solution for deploying WordPress on Oracle Cloud Infrastructure (OCI). Quick Starts are complete solutions that you can launch quickly on your OCI free tier account or trial account. They let you try real solutions while learning about the services and capabilities in OCI. This Quick Start solution for WordPress introduces various resources, services, and automation in OCI, while deploying a fully functional WordPress instance.
WordPress is a popular platform to build websites ranging from personal blogs to running online businesses. WordPress.org offers a free and open source content management platform that you can deploy and manage yourself on OCI.
With the core content management system that WordPress provides, you also need a MySQL database, some storage, and a few other resources for this solution. In this blog, we walk you through using the Quick Start solution on OCI to create the cloud resources and deploy the self-hosted WordPress platform.
The Quick Start solution provides the automation to provision the resources in your tenancy. OCI supports several industry standard resource management tools, such as Terraform and Ansible. In this Quick Start, you use Terraform to create and manage the resources.
OCI also provides a managed Terraform service called Oracle Resource Manager. This free service makes it even easier for teams to work with Terraform by integrating directly with various source control systems, providing infrastructure automation, and managing Terraform states. Oracle Resource Manager can also help package Terraform configurations as stacks which create and manage infrastructure components in a user-friendly and wizard-driven manner. Developers can use the same steps presented in this blog to build their own stacks for easy, consistent, and repeatable deployments.
This Quick Start solution is open source, which enables you to use it as a sandbox or starting point for more complex deployments. The Terraform automation manages the components and is packaged as a reusable stack that you can later use to modify the topology and configuration. You can run the Terraform code published on GitHub in multiple ways. For a quick deployment, you can use the deploy button, which uses the Oracle Resource Manager. You can also choose to deploy the solution directly through the Terraform CLI in your development environment or in the Oracle Cloud Shell.
Expressing infrastructure as code using the methods described in this example gives you repeatability and consistency in your infrastructure and application deployments.
The solution architecture
As an introduction to OCI, you create a single Compute instance and deploy both WordPress and MySQL in containers. This micro deployment is a subset of the production reference architecture that includes the managed MySQL Database Service. In this deployment, the data for both WordPress and MySQL are managed as container volumes on the single Compute instance, so you can easily export or upgrade the containers in future. WordPress is exposed to users and administrators though a public IP address.
This solution for WordPress uses the basic building blocks for deploying applications to OCI, such as the virtual cloud network (VCN) and Compute instances. It also automates and manages software provisioning on the instances, including installing and configuring tools, such as Docker, and performing application setup and configuration for WordPress.
To learn more about the architecture, the automation tools and to build your own cloud native deployments, head over to the GitHub repository. There, we provide a Deploy to Oracle Cloud button that automates the resource creation and deployment process. You can also evolve your deployment to production scale using the advanced deployment patterns provided in our reference architecture published in the OCI Architecture Center. The OCI Architecture Center provides a catalog of cross-product reference architectures, solution playbooks, and best practices.
You can get started on Oracle Cloud Infrastructure by signing up for the Oracle Cloud Free Tier. The Oracle Cloud Free Tier includes Always Free services that never expire and a 30-day free trial, which includes US$300 in credits to get you started with a range of services, including compute, storage, and networking.