Deployment of Wordpress using Google Cloud Platform
Mudit Mathur
Tech Blogger & Cloud DevOps Engineer @Medium Passionate about Writing, Automation, and Cloud Technologies
Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail and Youtube. Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics and machine learning.
Follow the Steps:
Task Overview:
Creating Different 2 VPCs in vivid regions:
Go to GCP Console and then click on VPC Network and You will landed on this below page.Click on Create VPC Network and Create two VPCs in different regions by clicking on create button.After the creation we have to perform VPC Peering.
VPC Peering:A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses.
Now create Kubernetes Cluster in developer’s vpc… Here the details for creation of Cluster. Also Go for install of Kubernetes Installation after this.
command:
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
Atlast click the create button to create cluster .
Google cloud shell can be used to do command line operations.
Connect to the Cluster using CLI Here I’m going to use Google Cloud Shell for the Command line .After creating cluster, click on connect you will see one pop-up window ,There will a command to copy and that you have run in cloud shell. Now Launch one pod in the cluster using docker image called WordPress. — Command:kubectl create deployement myweb — image =vimal13/apache-webserver-php. Here You can also use official image of wordpress. After that we must expose the pod using loadbalancer. Command for this: kubectl expose deployment myweb — type=LoadBalancer — port =80
After this browse to the ip got by running command kubectl get services,
Now we have to Create a SQL server in the production project and create a database.For this we have to a MySQL instance and after this we have to check whether it is created or not.
Check using the ip given by them and run command mysql -h “ip” -u “username” -p and then enter password.
If we are not able to connect then we have to check the firewall setting by clicking on “edit configuration”
And Now try to connect to the instance instance. We should get this
Now we have to create database on SQL instance.
Fill the following Information
We can create our own post and publish it.
Thanks For Reading......
Application Development analyst at Accenture
4 年Good work Mudit Mathur