GCP Classroom Series – 24/Feb/2021

Google Compute Engine

  • This is a service that provides vms that run on GCP. Vms that run on GCP are referred as instances
  • Hypervisor:
    • This is a software that creates and runs Virtual Machines(VMs)
    • There are two types of Hypervisors
      • Type 1 ("Bare metal"):
        • This acts like a light weight os that runs directly on hosts hardware
        • Example: VM Ware esxi
      • Type 2 ("Hosted"):
        • This runs as a software layer on operating system
        • Examples: Virtual Box, Vmware workstation etc
  • Cloud Hypervisor:
    • Thse hypervisors emerged as tool for running virtual machines and driving innovation in a cloud environment
  • On GCE when we want to create a vm the following image shows alloaction of vm on some physical server in a Zone
  • Every VM needs to have some kind of OS, So for the vm which we are creating the operationg system , libraries etc are chosen by Google Virtual Machine Images.
  • You may choose to use
    • public images provided by google
    • Market Place images provided by third-party vendors
    • Create your own images
  • Virtual Machine instance which we create should be part of some vpc and subnet. A NIC is created that connects vm to subnet. A VM by default gets external ip address and internal ip address
  • Who can access vm depends on Firewall rules associated with the vm
  • So lets create a Ubuntu VM in default vpc in us-central1 Region and zone b.
  • Lets create a firewall rule to allow all the ports inbound
  • Login into the vm from console
  • Create a new user called as qtdevops with password qtdevops
  • Enable password authentication
    • edit the Password Authentication to yes in /etc/ssh/sshd_config
    • restart sshd service sudo service sshd restart
  • Give Sudo permissions to qtdevops
  • Now try to login from your workstation(laptop) as qtdevops user
  • Now lets install apache server on this instance
  • Now lets try to install tomcat
sudo yum install tomcat
sudo service tomcat start

  • Exercise: Try creating a ubuntu vm and install apache and tomcat and try to access both by external ip

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%