Proctor is a developer friendly automation orchestrator. It helps everyone use automation and contribute to it
- Install and setup golang
- Clone the repository
- Run
make build
proctordis the heart of the automation orchestrator- It is a web service that handles management and execution of procs
- Ensure local postgres server is up and running
- Ensure local redis server is up and running
- 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 proctord
- Setup & Run database migrations by running this command
make db.setupfrom the repo directory - Start service by
make start-server - Run
curl {host-address:port}/pingfor health-check of service
- Copy
.env.sampleinto.envfile - Please refer meaning of
proctordconfiguration here - Modify configuration for dev setup in
.envfile - Export environment variables configured in
.envfile by runningsource .env proctor servergets configuration from environment variables.
PROCTOR_APP_PORTis port on which service will runPROCTOR_LOG_LEVELdefines log levels of service. Available options are:debug,info,warn,error,fatal,panicPROCTOR_REDIS_ADDRESSis hostname and port of redis store for jobs configuration and metadataPROCTOR_REDIS_MAX_ACTIVE_CONNECTIONSdefines maximum active connections to redis. Maximum idle connections is half of this configPROCTOR_LOGS_STREAM_READ_BUFFER_SIZEandPROCTOR_LOGS_STREAM_WRITE_BUFFER_SIZEis the buffer size for websocket connection while streaming logsPROCTOR_KUBE_CONFIGneeds 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/configfile in home directory
- If a job doesn't reach completion, it is terminated after
PROCTOR_KUBE_JOB_ACTIVE_DEADLINE_SECONDS PROCTOR_KUBE_JOB_RETRIESis the number of retries for a kubernetes job (on failure)PROCTOR_DEFAULT_NAMESPACEis the namespace under which jobs will be run in kubernetes cluster. By default, K8s has namespace "default". If you set another value, please create namespace in K8s before deployingproctordPROCTOR_KUBE_CLUSTER_HOST_NAMEis address/ip address to api-server of kube cluster. It is used for fetching logs of a pod using httpsPROCTOR_KUBE_CA_CERT_ENCODEDis the CA cert file encoded in base64. This is used for establishing authority while talking to kubernetes api-server on a public https callPROCTOR_KUBE_BASIC_AUTH_ENCODEDis the base64 encoded authentication of kubernetes. Enocdeusername:passwordto base64 and set this config.- Before streaming logs of jobs,
PROCTOR_KUBE_POD_LIST_WAIT_TIMEis the time to wait until jobs and pods are in active/successful/failed state PROCTOR_POSTGRES_USER,PROCTOR_POSTGRES_PASSWORD,PROCTOR_POSTGRES_HOSTandPROCTOR_POSTGRES_PORTis the username and password to the postgres database you wish to connect to- Set
PROCTOR_POSTGRES_DATABASEtoproctord_developmentfor development purpose - Create database
PROCTOR_POSTGRES_DATABASE PROCTOR_POSTGRES_MAX_CONNECTIONSdefines maximum open and idle connections to postgresPROCTOR_POSTGRES_CONNECTIONS_MAX_LIFETIMEis the lifetime of a connection in minutesPROCTOR_NEW_RELIC_APP_NAMEandPROCTOR_NEW_RELIC_LICENCE_KEYare used to send profiling details to newrelic. Provide dummy values if you don't want profilingPROCTOR_MIN_CLIENT_VERSIONis minimum client version allowed to communicate with proctordPROCTOR_SCHEDULED_JOBS_FETCH_INTERVAL_IN_MINSis the interval at which the scheduler fetches updated jobs from databasePROCTOR_MAIL_USERNAME,PROCTOR_MAIL_PASSWORD,PROCTOR_MAIL_SERVER_HOST,PROCTOR_MAIL_SERVER_PORTare the creds required to send notification to users on scheduled jobs executionPROCTOR_JOB_POD_ANNOTATIONSis used to set any kubernetes pod specific annotations.PROCTOR_SENTRY_DSNis used to set sentry DSN.
