Google Cloud Platform (GCP)
Google Cloud Platform is a suite of public cloud computing services offered by Google. The platform includes a range of hosted services for compute, storage and application development that run on Google hardware. Google Cloud Platform services can be accessed by software developers, cloud administrators and other enterprise IT professionals over the public internet or through a dedicated network connection.
Google Cloud Platform offers services for compute, storage, networking, big data, machine learning and the internet of things (IoT), as well as cloud management, security and developer tools.
WORDPRESS
WordPress is the simplest, most popular way to create your own website or blog.WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.
Deployment of wordpress and database on google cloud platform
Task Description:
- Create a project.
- Create two VPC in project namely wordallow and production .
- Connect both the VPCs using VPC peering, through the private network of Google.
- Launch a Kubernetes cluster in one VPC wordallow server and launch sql database in another VPC .
- Launch wordpress inside the pod and do the LoadBalancing.
- access the site from the LoadBalancer ip.
- connect wordpress from the database.
Services Used Of GCP:-
- vm instances
- vpc network
- kubernetes clusters
- sql
- LoadBalancing
Steps taken are as follows:-
- As,we are using gwiklabs we cannot make our own new project,so we need to select a project from the already made project.
- VPC named wordallow has been created.I have created only one subnet named Lab1 in this VPC and this subnet has been launched in the Asia-southeast1 region.
- VPC named production has been created. One subnet named Lab2 has been created in this VPC and this subnet has been launched in the us-central-1 region.
Configuration of VPC:
- Now I have connected both the VPCs using VPC peering i.e., the private network of Google.
I have created a VPC peering named peer1 in the wordallow vpc of the project.
Configuration of VPC:
- VPC Peering is not active now. We need to create a another peer2 with another VPC production of the project and connect the VPC of production project with the VPC of the wordallow. I have created a VPC peering named peer2 in the production vpc of the project.
- Now both the VPC is active now.
After both the vpc peering, VPCs of both the projects has connected internally means that any instance in both these VPCs does not need any public network to connect with each other. They can connect using Google’s private network.
- Now let's create Kubernetes cluster.
Now we need to launch database server.For that first create a sql instance and then create a database named db1.
These are the slave nodes launched in the cluster.
After the cluster is launch successfully we need to connect it .For that we need google sdk and kubectl installed in our system.Then I have launched load balancer using cmd and tried to access the site stored in the docker page.
Then I have launched wordpress on the top of k8s cluster and expose ,then we could access our database data stored in it.
Wordpress launched:
database connectivity:
Login:
wordpress dashboard:
First page at wordpress:
THANKYOU!
Well done 🤟bro