0

I am new to GCE. I was able to create new instance using gcutil tool and GCE console. There are few questions unclear to me and need help:

1) Does GCE provides persistent disk when a new instance is created? I think its 10GB by default, not sure though. What is the right way to stop the instance without loosing data saved on it and what will be the charge (US zone) if say I need 20GB of disk space for that?

2) If I need SSL to enable HTTPS, is there any extra step I should do? I think I will need to add firewall as per the gcutil addfirewall command and create certificate (or install it from third part) ?

user504287
  • 1
  • 1
  • 3

2 Answers2

5

1) Persistent disk is definitely the way to go if you want a root drive on which data retention is independent of the life cycle of any virtual machine. When you create a Compute Engine instance via the Google Cloud Console, the “Boot Source” pull-down menu presents the following options for your boot device:

  • New persistent disk from image
  • New persistent disk from snapshot
  • Existing persistent disk
  • Scratch disk from image (not recommended)

The default option is the first one ("New persistent disk from image"), which creates a new 10 GB PD, named after your instance name with a 'boot-' prefix. You could also separately create a persistent disk and then select the "Existing persistent disk" option (along with the name of your existing disk) to use an existing PD as a boot device. In that case, your PD needs to have been pre-loaded with an image.

Re: your question about cost of a 20 GB PD, here are the PD pricing details.

Read more about Compute Engine persistent disks.

2) You can serve SSL/HTTPS traffic from a GCE instance. As you noted, you'll need to configure a firewall to allow your incoming SSL traffic (typically port 443) and you'll need to configure https service on your web server and install your desired certificate(s).

Read more about Compute Engine networking and firewalls.

Marc Cohen
  • 3,742
  • 2
  • 19
  • 19
0

As alternative approach i would suggest deploying VMs using Bitnami. There are many stacks you can choose from. This will save you time when deploying the VM. I would suggest you go with the SSD disks, as the pricing is close between magnetic disks and SSDs, but the performance boost is huge.

As for serving the content over SSL, you need to figure out how will the requests be processed. You can use NGINX or Apache servers. In this case you would need to configure the virtual hosts for default ports - 80 for non-encrypted and 443 for SSL traffic.

The easiest way to serve SSL traffic from your VM is generate SSL certificates using the Letsencrypt service.

bulgaru
  • 116
  • 4