Deployment of Wordpress using Google Cloud Platform

Deployment of Wordpress using Google Cloud Platform

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.

No alt text provided for this image
No alt text provided for this image

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
No alt text provided for this image

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,

No alt text provided for this image

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.

No alt text provided for this image

If we are not able to connect then we have to check the firewall setting by clicking on “edit configuration”

No alt text provided for this image

And Now try to connect to the instance instance. We should get this

No alt text provided for this image

Now we have to create database on SQL instance.

No alt text provided for this image

Fill the following Information

No alt text provided for this image

We can create our own post and publish it.

No alt text provided for this image

Thanks For Reading......



Nargis Shaikh

Application Development analyst at Accenture

4 年

Good work Mudit Mathur

要查看或添加评论,请登录

社区洞察

其他会员也浏览了