tree: c94d1218d4a017d4a72057f8de8f08b10820c740 [path history] [tgz]
  1. assets/
  2. assets_helper.go
  3. cache.go
  4. cookie.go
  5. cookie_test.go
  6. dashboard.go
  7. doc.go
  8. gen_assets.sh
  9. handlers.go
  10. http.go
  11. main.go
  12. names.go
  13. oauth.go
  14. README.md
  15. service.go
services/allocator/allocatord/README.md

Run allocatord locally

Prerequisites

  1. Jiri set up and JIRI_ROOT environment variable set.

  2. Google Cloud SDK installed, so that gcloud and gsutil commands are on the PATH

  3. Kubernates control installed with

    gcloud components install kubectl
    
  4. You are added as an editor on the vanadium-staging project.

Get oauth credentials file.

gsutil cp gs://vanadium-backup/allocatord_oauth.json /tmp/oauth.json

Prepare.

source ${JIRI_ROOT}/infrastructure/scripts/util/vanadium-oncall.sh
jiri go install \
  v.io/x/ref/services/allocator/allocatord \
  v.io/x/ref/services/agent/vbecome \
  v.io/x/ref/services/cluster/vkube \
  v.io/x/ref/services/agent \
  v.io/x/ref/services/agent/v23agentd
agent -s on

Run allocatord

as_service ${JIRI_ROOT}/release/go/bin/vbecome --name=allocatord \
${JIRI_ROOT}/release/go/bin/allocatord \
 --http-addr=:8166 \
 --external-url=http://localhost:8166 \
 --oauth-client-creds-file=/tmp/oauth.json \
 --secure-cookies=false \
 --deployment-template=${JIRI_ROOT}/infrastructure/gke/syncbase-users-staging/conf/syncbased-deployment.json-template \
 --server-name=syncbased \
 --max-instances-per-user=3 \
 --vkube-cfg=${JIRI_ROOT}/infrastructure/gke/syncbase-users-staging/vkube.cfg \
 --dashboard-gcm-metric=cloud-syncbase \
 --dashboard-gcm-project=vanadium-staging \
 --assets=${JIRI_ROOT}/release/go/src/v.io/x/ref/services/allocator/allocatord/assets \
 --static-assets-prefix=https://static.staging.v.io

and then visit http://localhost:8166 to browse the UI.

Edit UI

To update UI, edit template/CSS/JavaScript files in the “assets” directory and refresh the page to see the changes. No need to restart allocatord.

Re-generate “assets/assets.go” file when UI changes are ready to be reviewed.

jiri go generate v.io/x/ref/services/allocator/allocatord