Deploying WordPress on Google Cloud Platform by integrating various GCP services..

Deploying WordPress on Google Cloud Platform by integrating various GCP services..

Hello Readers! This is my Google Cloud Platform task by integrating all those things which I've learnt in my two days of GCP workshop.

TASK DESCRIPTION :

I have created a set-up in which various services of GCP like VPC networking, Kubernetes, SQL, etc has been integrated. So here are the steps which needs to be incorporated :

  • Create multiple projects namely a Developer project and a Production project.
  • Create VPC network for both the projects.
  • Create a link between both the VPC networks using VPC Peering.
  • Create a Kubernetes Cluster in developer project and launch any web application .with the Load Balancer.
  • Create a SQL server in the production project and create a database.
  • Connect the SQL database to the web application launched in the Kubernetes cluster.
  • Then finally install WordPress in one VPC using running database in other PC.

######################################################################

HERE WE BEGIN WITH OUR TASK...

Step-1: Project Creation -

Two new projects, 'DevProject' and 'ProdProject' are being created. A project consists of a set of users, a set of APIs and billing, authentication, and monitoring settings for those APIs. 

No alt text provided for this image

Step-2: VPC Creation -

For creation of VPC, we need to first go to the Networking section and choose 'VPC network' . After that fill up all the details.

VPC in DevProject: I've created a VPC named 'dev' in 'asia-southeast1' (Singapore) region with an IP address range of '10.0.1.0/24' .

No alt text provided for this image

VPC in ProdProject: Then I created another VPC named 'prod' in 'us-east1' (US) region with an IP address range of '10.0.2.0/24' .

No alt text provided for this image

Step-3: VPC Peering -

VPC Network Peering in Google Cloud allows internal IP address connectivity across two Virtual Private Cloud (VPC) networks regardless of whether they belong to the same project or not.

VPC peering in ProdProject:

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

Currently it is 'inactive', but as soon as VPC peering will create in other region it will get activated automatically. 

VPC peering in DevProject:

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

It is 'active' now.

Step-4: Launching Kubernetes Cluster for WordPress in DevProject -

Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling our containerized applications using Google infrastructure.

Creation of Cluster in DevProject :

  • Creating cluster using WebUI.
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

 Kubernetes cluster is now launched in our DevProject.

  • Now we configure this cluster using CLI from our baseOS. For this we first installed 'gcloud SDK' and then 'kubectl.exe'.
No alt text provided for this image
  • Now, launching 'WordPress' image on the top of this Kubernetes cluster.
No alt text provided for this image
  • Creating a LOAD BALANCER.
No alt text provided for this image
No alt text provided for this image

Load Balancer is successfully created.

Step-5: Creation of SQL server in ProdProject:

For the instance creation, we need to go to the SQL option in the Storage and then follow the following steps:

  • Create the SQL instance using WebUI.
No alt text provided for this image
  • Create MySQL instance.
No alt text provided for this image


No alt text provided for this image

Here, MySQL Database is created.

  • Add a User to that database,
No alt text provided for this image
  • Do the Connectivity setting of the instance as public.
No alt text provided for this image
  • Now, we can access the Database here in Cloud Shell.
No alt text provided for this image
  • MySQL commands to create database:
No alt text provided for this image
No alt text provided for this image

Database is successfully created.

Step-6: Installation of WordPress and attaching Database :

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

Now, login to WordPress site:-

No alt text provided for this image

WordPress site is launched successfully.

No alt text provided for this image

As soon as we connect your database to WordPress site, our database will automatically get updated :-

No alt text provided for this image

######################################################################

Here I successfully launched my first WordPress site on Google Cloud Platform with Kubernetes integration.

This completes my GCP task given by Vimal sir!!!

***** THANK YOU FOR READING!! *****

Feedback and suggestions are most welcome.

Sahil Chugh

FX Technology Analyst | CFA L1 Passed | Comp Sc @TIET’23

4 年

Great work khushi??

Bhupendra Tale

Flutter Developer at Siya Tech Ventures

4 年

Great work ??

Yash Dhawan

Front-End Engineer|JavaScript|React|Redux|TIET'23|Amazon MLSS'22|Pre-Finalist Amazon Hackon S2|Mentor at IETE Students' Forum|4??at CodeChef

4 年

Great Khushi Garg

Ankit Kumar

EX - Amazonian | ECS SME | EX- TCSer | CKA Certified | AWS SAA-certified, AZ-900 & DP-900 certified

4 年

Superb Khushi Garg

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

Khushi Garg的更多文章

  • Industrial Use-cases of Ansible

    Industrial Use-cases of Ansible

    What is Ansible? Ansible is an automation software tool that provides simple but powerful Automation for cross-platform…

  • Benefits that MNC’s are getting from AI/ML

    Benefits that MNC’s are getting from AI/ML

    What is Artificial Intelligence? Artificial Intelligence is the simulation of human intelligence to the machine that is…

    2 条评论
  • Building Basic AWS Cloud Infrastructure using AWS CLI

    Building Basic AWS Cloud Infrastructure using AWS CLI

    TASK DESCRIPTION : Create the following using AWS CLI: Create a key pair Create a security group Launch an instance…

  • Setting up Python on Docker Container

    Setting up Python on Docker Container

    In the following article we're going to set up Python Interpreter and run python code on a Docker container. For this…

    2 条评论
  • Configuring HTTPD Server on Docker Container

    Configuring HTTPD Server on Docker Container

    In the following article we are going to configure the HTTPD server on the Docker container. In this practical we're…

  • KUBERNETES - A Container Management tool

    KUBERNETES - A Container Management tool

    What is Kubernetes ? Kubernetes is an open-source Container-Orchestration system software for automating Deployment…

    2 条评论
  • DOCKER AUTOMATED USING ANSIBLE

    DOCKER AUTOMATED USING ANSIBLE

    To configure and start Docker services and configure Apache Webserver on it using Ansible playbook. TASK DESCRIPTION :…

    4 条评论
  • UNILEVER Case Study - AWS

    UNILEVER Case Study - AWS

    This Article shows the case study of Global Cloud Leader that is Amazon Web Services ( AWS ) Cloud . In this we'll see…

    2 条评论
  • "BIG DATA": Problems, solutions and its management!

    "BIG DATA": Problems, solutions and its management!

    "Over 2.5 quintillion bytes of data is created every single day, and it’s only going to grow from there.

    5 条评论
  • Google Cloud Platform (GCP)

    Google Cloud Platform (GCP)

    This article talks about all the services in Google Cloud Platform which I learnt from 2 days of workshop organised by…

社区洞察

其他会员也浏览了