frontend

command module
v0.0.0-...-76f4a85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2019 License: MIT Imports: 17 Imported by: 0

README

Installation

  • Setup a GKE cluster - scripts/build_cluster.sh
  • If you want to use Prometheus for monitoring, we recommend https://github.com/camilb/prometheus-kubernetes
  • Build the images:
    • mkdir -p $GOPATH/src/github.com/doitintl/
    • git clone git@github.com:doitintl/banias.git
    • cd banias/frontend
    • export PROJECT_ID=your_project_id
    • Build an deploy the image scripts/dockerize.sh
  • Create a service account with permission for Google Pub/Sub and Stackdiver.
  • Download the key file in JSON format
  • Create secret - kubectl create secret generic pubsub-key --from-file=key.json=filename
  • Replace BANIAS_PROJECTID: "my-project" to your project name in deployfrontend-configmap.yaml
  • Replace image: "gcr.io/my-project/banias-frontend:test" to your project name and version in deploy/frontend-deployment.yaml
  • Change the configuration in deploy/frontend-configmap.yaml
  • Deploy - kubctl apply -f deploy/.

Configuration

  • Project ID - BANIAS_PROJECTID: "your-project-id"

  • Debug flag for log prints - default level is Info. - BANIAS_DEBUG: "false"

  • Pub/Sub topic name - BANIAS_TOPIC: "banias"

  • HTTP port - BANIAS_PORT: "8081"

  • Prometheus port - BANIAS_METRICSPORT: "8080"

  • Maximum size of a single batch - BANIAS_PUBSUBMAXBATCH: "1000"

  • Number of pools that listen for events from users - BANIAS_PUBSUBAGGRIGATORS: "30"

  • Max time to pass in seconds before publishing. - BANIAS_PUBSUBMAXPUBLISHDELAY: "5"

  • The default maximum amount of goroutines for publishing - BANIAS_MAXPUBSUBGOROUTINESAMOUNT: "262144"

  • The default maximum idle duration of a goroutine - BANIAS_MAXPUBSUBGOROUTINEIDLEDURATION: "10"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL