# Google Cloud Platform Guide

Mains Services & MicroServices

Google Cloud Platform (GCP)

### Summary

1.  Virtual Machine
2.  Create SSH Keys
3.  Kubernete
4.  Export / Import Volumes

### 1\. Virtual Machine

### 1.1) Configure HTTPS with Google VM

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832469189/Qs40I0hO_.png)

1.1.1) Chek Operating System

*   Check OS

lsb\_release -a

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832470460/S-368z48J.png)

1.1.3) Chek CertBot

*   certbot.eff.org

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832471804/uWo6e6Hrf.png)

*   [https://certbot.eff.org/instructions?ws=apache&os=ubuntufocal](https://certbot.eff.org/instructions?ws=apache&os=ubuntufocal)

sudo snap install core; sudo snap refresh core

sudo snap install --classic certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot

sudo certbot --apache (error)

sudo certbot certonly --apache

sudo certbot --nginx

```
sudo certbot --nginx -d xxxxxx
```

*   [https://dev.to/jpblancodb/configure-let-s-encrypt-nginx-in-ubuntu-bph](https://dev.to/jpblancodb/configure-let-s-encrypt-nginx-in-ubuntu-bph)

cd /etc/nginx/sites-available

sudo apt install -y software-properties-common

sudo add-apt-repository ppa:certbot/certbot

sudo apt update

  
sudo apt install -y python-certbot-nginx

```
`sudo apt-get install python-certbot-nginx` 
```

sudo apt install -y python3-certbot-nginx

python3 --version  
  
sudo apt install -y python3-certbot-nginx

1.  1.4) Install NGinx

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832473381/Y8CyFfIHz.jpeg)

sudo apt install -y nginx

cd /etc/nginx

ll

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832474780/ngdvRjk5u.png)

nano /etc/nginx/sites-availabable/default  
  

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832476615/KkB3r650m.png)

*   .conf

server {

root /var/www/html*;*

listen 80*;*

listen \[::\]:80*;*

server\_name sxxxxxecops.bxxxxom*;*

location / {

proxy\_pass http://127.0.0.1:8080*;*

proxy\_redirect off*;*

proxy\_set\_header Host $host*;*

proxy\_set\_header X-Real-IP $remote\_addr*;*

proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for*;*

proxy\_set\_header X-Forwarded-Host $server\_name*;*

}

}

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832478368/a-RtaZOxw.png)

sudo ln -s /etc/nginx/sites-available/secops.bioinformaticalabs.com.conf secops.bioinformaticalabs.com.conf  
biolabs@instance-1:/etc/nginx/sites-enabled$ ls -al

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832479865/04GSWGMyb.png)

sudo service nginx restart

### 2\. Create SSH Keys

[**Create SSH keys | Compute Engine Documentation | Google Cloud**  
*This document describes how to create an SSH key pair for Compute Engine Linux virtual machine (VM) instances. If you…*cloud.google.com](https://cloud.google.com/compute/docs/connect/create-ssh-keys "https://cloud.google.com/compute/docs/connect/create-ssh-keys")[](https://cloud.google.com/compute/docs/connect/create-ssh-keys)

ssh-keygen -t rsa -f ~/.ssh/KEY\_FILENAME -C USER -b 2048

ssh-keygen -t rsa -f ~/.ssh/KEY\_FILENAME -C USER

*   [https://cloud.ibm.com/docs/ssh-keys?topic=ssh-keys-generating-and-using-ssh-keys-for-remote-host-authentication](https://cloud.ibm.com/docs/ssh-keys?topic=ssh-keys-generating-and-using-ssh-keys-for-remote-host-authentication)

### 3\. Kubernetes

### 4\. Export / Import Volumes Google Cloud
