Giter Site home page Giter Site logo

proctor-engine's Introduction

Proctor

Proctor is an automation framework. It helps everyone contribute to automation, mange it and use it.

Introduction

Proctor Engine is the heart of the automation framework. It takes care of executing jobs and maintaining their configuration.

Dev environment setup

  • Install and setup golang
  • Install glide
  • Make a directory src/github.com/gojekfarm inside your GOPATH
  • Clone this repo inside above directory
  • Install dependencies using glide
  • Install kubectl
  • Configure kubectl to point to desired kubernetes cluster. For setting up kubernetes cluster locally, refer here
  • Run a kubectl proxy server on your local machine
  • Configure proctor-engine
  • Running go build -o proctor-engine will build binary to run proctor-engine
  • Start service by ./proctor-engine start
  • Run curl {host-address:port}/ping for health-check of service

Running tests

Proctor Engine configuration

  • Copy .env.sample into .env file
  • Please refer meaning of proctor-engine configuration here
  • Modify configuration for dev setup in .env file
  • Export environment variables configured in .env file. Proctor engine gets configuration from environment variables

Proctor Engine configuration explanation

  • PROCTOR_APP_PORT is port on which service will run
  • PROCTOR_LOG_LEVEL defines log levels of service. Available options are: debug,info,warn,error,fatal,panic
  • PROCTOR_REDIS_ADDRESS is hostname and port of redis store for jobs configuration and metadata
  • PROCTOR_REDIS_MAX_ACTIVE_CONNECTIONS defines maximum active connections to redis. Maximum idle connections is half of this config
  • PROCTOR_LOGS_STREAM_READ_BUFFER_SIZE and PROCTOR_LOGS_STREAM_WRITE_BUFFER_SIZE is the buffer size for websocket connection while streaming logs
  • PROCTOR_KUBE_CONFIG needs to be set only if service is running outside a kubernetes cluster
    • If unset, service will execute jobs in the same kubernetes cluster where it is run
    • When set to "out-of-cluster", service will fetch kube config based on current-context from .kube/config file in home directory
  • If a job doesn't reach completion, it is terminated after PROCTOR_KUBE_JOB_ACTIVE_DEADLINE_SECONDS
  • PROCTOR_DEFAULT_NAMESPACE is the namespace under which jobs will be run in kubernetes cluster
  • PROCTOR_KUBE_CLUSTER_HOST_NAME is address to proxy server for kube cluster. It is used for fetching logs of a pod using http
  • Before streaming logs of jobs, PROCTOR_KUBE_POD_LIST_WAIT_TIME is the time to wait until jobs and pods are in active/successful/failed state

proctor-engine's People

Contributors

olttwa avatar

Watchers

Ujwalendu Prakash avatar James Cloos avatar

Forkers

aishwaryark

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.