Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 5.41 KB

File metadata and controls

85 lines (60 loc) · 5.41 KB

Virtual Machine (VM)

👌 Note: Skip to the next section if you already have a VM set up

Note: The following section requires you already have a Google Cloud Platform account associated with an active Billing account.

  • Go to console.cloud.google.com > > Compute Engine > VM instances > Create instance

  • Name it lewagon-data-eng-vm-<github_username>, replace <github_username> with your own, e.g. krokrob

  • Region europe-west1, choose the closest one among the available regions

    gcloud-console-vm-create-instance
  • In the section Machine configuration under the sub-heading Machine type

  • Select General purpose > PRESET > e2-standard-4

    gcloud-console-vm-e2-standard4
  • Boot disk > Change

    • Operating system > Ubuntu

    • Version > Ubuntu 22.04 LTS x86/64

    • Boot disk type > Balanced persistent disk

    • Size > upgrade to 150GB

      gcloud-console-vm-ubunt
  • Open Networking, Disks, ... under Advanced options

  • Open Networking

    gcloud-console-vm-networking
  • Go to Network interfaces and click on default default (...) with a downward arrow on the right.

    gcloud-console-vm-network-interfaces
  • This opened a box Edit network interface

  • Go to the dropdown External IPv4 address, click on it, click on RESERVE STATIC EXTERNAL IP ADDRESS

    gcloud-console-vm-create-static-ip
  • Give it a name, like "lewagon-data-eng-vm-ip-<github_username>" (replace <github_username> with your own) and description "Le Wagon - Data Engineering VM IP". This will take a few seconds.

    gcloud-console-reserve-static-ip
  • You will now have a public IP associated with your account, and later to your VM instance. Click on Done at the bottom of the section Edit network interface you were in.

    gcloud-console-new-external-ip

Public SSH key

  • Open the Security section

    gcloud-console-vm-security
  • Open the Manage access subsection

    gcloud-console-manage-access
  • Go to Add manually generated SSH keys and click Add item

    gcloud-console-add-manual-ssh-key
  • In your terminal display your public SSH key:

    • Windows:

      # If you use Windows Terminal
      more $HOME\.ssh\de-bootcamp.pub
      # OR if you use Command Prompt:
      # more %HOMEPATH%\.ssh\de-bootcamp.pub
    • Mac/Linux users can use:

      cat ~/.ssh/de-bootcamp.pub
  • Copy your public SSH key and paste it:

    gcloud-console-add-ssh-key-pub
  • On the right hand side you should see

    gcloud-console-vm-price-month
  • You should be good to go and click CREATE at the bottom

    gcloud-console-vm-create
  • It will take a few minutes for your virtual machine (VM) to be created. Your instance will show up like below when ready, with a green circled tick, named lewagon-data-eng-vm-krokrob (krokrob being replaced by your GitHub username).

    gcloud-console-vm-instance-running
  • Click on your instance

    gcloud-console-vm-running
  • Go down to the section SSH keys, and write down your username (you need it for the next section)

    gcloud-console-vm-username

Congrats, your virtual machine is up and running, it is time to connect it with VS Code!