github.com/m-lab/locate@v0.17.6/README.md (about)

     1  # locate
     2  
     3  [![Version](https://img.shields.io/github/tag/m-lab/locate.svg)](https://github.com/m-lab/locate/releases) [![Build Status](https://travis-ci.com/m-lab/locate.svg?branch=master)](https://travis-ci.com/m-lab/locate) [![Coverage Status](https://coveralls.io/repos/m-lab/locate/badge.svg?branch=master)](https://coveralls.io/github/m-lab/locate?branch=master) [![GoDoc](https://godoc.org/github.com/m-lab/locate?status.svg)](https://godoc.org/github.com/m-lab/locate) [![Go Report Card](https://goreportcard.com/badge/github.com/m-lab/locate)](https://goreportcard.com/report/github.com/m-lab/locate)
     4  
     5  M-Lab Locate Service, a load balancer providing consistent “expected
     6  measurement quality” using access control.
     7  
     8  ## Local Development
     9  
    10  ### Secret Manager
    11  
    12  Typically the locate service will run within a GCP environment, either AppEngine
    13  or GKE. In these cases, the locate service reads signer and verifier keys from
    14  GCP's secret manager. This dependency is not needed for local development.
    15  
    16  Create JSON Web Keys for local development:
    17  
    18  ```sh
    19  jwk-keygen --use=sig --alg=EdDSA --kid=localdev_20220415
    20  ```
    21  
    22  You may reuse the same key for signer and verifier, or create multiple keys.
    23  
    24  ```sh
    25  ./locate \
    26      -key-source=local \
    27      -signer-secret-name ./jwk_sig_EdDSA_localdev_20220415 \
    28      -verify-secret-name ./jwk_sig_EdDSA_localdev_20220415.pub
    29  ```
    30  
    31  Now you may visit localhost:8080 in your browser to see a response generating
    32  `access_token`s using these keys. Of course, the URLs returns will not be valid
    33  for the public platform.
    34  
    35  ### Redis
    36  
    37  A `docker-compose` configuration file is provided to run a local instance of the
    38  locate service along with Redis.
    39  
    40  In the root directory of the "locate" project, start a local build using default
    41  arguments and precomputed JSON Web Keys.
    42  
    43  ```sh
    44  docker-compose up
    45  ```
    46  
    47  To connect with the local redis instance, run the `cmd/heartbeat` command or use
    48  the `redis-cli` command from the terminal.