Google Cloud Platform Guide
Mains Services & MicroServices
Google Cloud Platform (GCP)
Summary
- Virtual Machine
- Create SSH Keys
- Kubernete
- Export / Import Volumes
1. Virtual Machine
1.1) Configure HTTPS with Google VM
1.1.1) Chek Operating System
- Check OS
lsb_release -a
1.1.3) Chek CertBot
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
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.4) Install NGinx
sudo apt install -y nginx
cd /etc/nginx
ll
nano /etc/nginx/sites-availabable/default
- .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;
}
}
sudo ln -s /etc/nginx/sites-available/secops.bioinformaticalabs.com.conf secops.bioinformaticalabs.com.conf
biolabs@instance-1:/etc/nginx/sites-enabled$ ls -al
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 "cloud.google.com/compute/docs/connect/creat..")
ssh-keygen -t rsa -f ~/.ssh/KEY_FILENAME -C USER -b 2048
ssh-keygen -t rsa -f ~/.ssh/KEY_FILENAME -C USER