fm-test

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GBDX Client

master status

Build Status Docker Badge Code Quality

godoc
  • api fm-test/api
  • gbdx fmt-test/gbdx
  • transcode fm-test/transcode
  • fm-test fm-test
Author

@afirth 2019

Installation

Prerequisites

  • Go >= 1.11
  • If you want to use the makefile:
    • GNU Make (>3.81) (e.g. on OSX brew install --with-default-names make)
    • Bash 4.x
Secrets

GBDX requires a username and password to get a token. For this project I built the token request into the server rather than as a separate service. A valid username and password must be present in the environment. This will be also be inherited by docker-compose and used to make the kubernetes secret.

export USERNAME=<gbdx-user-email>
export PASSWORD=<gbdx-password>

Running locally

make up

Running with docker-compose

make docker-compose-up

Note: this will not automatically rebuild. Run docker-build if required (or docker-compose up --build)

Running in kubernetes

make kube-secret
make kube-up
Scaling replicas
kubectl scale deployment fm-test --replicas=<n>
Note about images in kubernetes

By default, kube deployment pulls from dockerhub image. To use a local image:

eval $(minikube docker-env)
make docker-build
docker tag fm-test afirth/fm-test:<version>

Building and testing

  • make test runs unit tests
  • make test-e2e runs unit and e2e tests
  • make build builds for development
  • make build-final builds for use in images, with vendored deps and no debugging

Not Implemented

  • retries for requests to GBDX
  • rate limits for incoming requests (I prefer at gateway)
  • decent json logging
  • exhaustive tests

Tested with

  • OSX 10.14.2 (18C54)
  • Minikube v0.35.0
  • Kubectl v1.11.7
  • Kubernetes v1.13.4
  • Docker Client: Docker Engine - Community 18.09.1
  • Docker Server: 18.06.2-ce
  • GNU Make 3.81
  • GNU bash, version 4.4.23

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
api

Jump to

Keyboard shortcuts

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