Skip to content

Self-Hosting on Google Cloud

Service account HMAC key generation

  1. create a new service account
  2. with perission roles/storage.objectAdmin (access to google cloud storage)
  3. generate HMAC keys
$ gcloud iam service-accounts create videobug-service-account --display-name "videobug service account"
$ gcloud projects add-iam-policy-binding $(gcloud config get-value project)  --member="serviceAccount:videobug-service-account@$(gcloud config get-value project).iam.gserviceaccount.com"  --role="roles/storage.objectAdmin"


$ gsutil hmac create videobug-service-account@$(gcloud config get-value project).iam.gserviceaccount.com

Access ID:   GOOG1EK3UCPL6K6OXXXXXXXXXSFU4U22SPVGHQTIV4KXXXXXXXXXXXXXXXXXX
Secret:      XXX/OSxxQ0xxxxJ0WxRTxx9YFx5xx0AxF1SPxxxx

Set your project as default in google storage interopability (open in new tab and check under heading "Default project for interoperable access")

https://console.cloud.google.com/storage/settings;tab=interoperability?project=

Deployment

Download videobug.jinja

$ wget https://docs.bug.video/assets/gcp/videobug.jinja

Execute

$ gcloud deployment-manager deployments create videobug --template=videobug.jinja --properties="zone:'us-west1-a',region:'us-west1',accessKey:'<ACCESS-KEY>',secretKey:'<SECRET-KEY>'"

Get Public IP

$ gcloud compute addresses describe  --global videobug-public-ip

address: XX.YYY.ZZ.AAAA
addressType: EXTERNAL
creationTimestamp: '<>'
description: ''
id: '<>'
kind: compute#address
name: videobug-public-ip
networkTier: PREMIUM
selfLink: https://www.googleapis.com/compute/v1/projects/shining-camp-344911/global/addresses/videobug-public-ip
status: IN_USE
users:
- https://www.googleapis.com/compute/v1/projects/shining-camp-344911/global/forwardingRules/videobug-http

Tip

Inside your plugin --> Credentials, you can enter this IP address and Sign up or Sign in to get a project specific JWT token.