1. install rust 1.72.0

  • https://www.rust-lang.org/tools/install introduces how to install rust in linux. Use the introduced command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

configurelinux

configurelinux2

2. install git

  • https://git-scm.com/book/ko/v2/%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0-Git-%EC%84%A4%EC%B9%98 explains how to install git in linux

gitinstallinux

gitinstallinux2

3. Clone project Repository

  • My repository is a private one, and it says I can’t authorize by password.

gitcloneauth

  • https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens shows how to use personal access tokens:

gitpersonal

  • go to profile settings

gitpersonal2

  • developer settings - fine-grained tokens

gitpersonal3

gitpersonal4

  • give name and permissions -> create token

gitpersonal5

  • copy key

doesn’t work… gives 403 error. I’ll try using Github CLI turns out there wasn’t enough permission assigned. Gave all possible permissions and it clones well now

gitpersonall

4. Build Rust backend

  • cargo build

rust

  • build gives following error

rustbuilderror

  • solved by downloading cmake

rusterror

5. Extend Storage Disk

  • When building, the compiler raised an error. Reading the error statement carefully, it was a no space left on device error
  • Google Compute Engine gave me 10GB storage, and 91% was used already. Needed to add more storage.

storage

  • Go to Google Compute Engine -> storage -> disk and click on your instance name link.

storage2

  • click “edit”

storage3

  • change disk size and save

storage4

  • now we follow the guide from https://cloud.google.com/compute/docs/disks/resize-persistent-disk?hl=ko&_gl=1v3tpta_gaMjE0MTI2ODczNS4xNzI1NDYwNzUz_ga_WH2QY8WWF5*MTcyNzg1MzE3My4xMy4xLjE3Mjc4NTQyODEuNTkuMC4w to allocate the disk to the device.

storage5

6. Assign Firewall for External IP

  • In Google Cloud Console, select “Create VPC Network”

firewall

  • Select “firewall” in VPC Network Menu

firewall2

  • create Firewall Rule

firewall3

  • allow access for the ports I want to use

firewall4

7. Test Request

I opened my backend server at port 13406

backendserver

I requested to the machine’s external IP from my local machine in HTTP and it works well:

backendserver2