Giter Club home page Giter Club logo

tfwatch's Introduction

tfwatch

Continuous integration service for Terraform.

  • Build Status - CircleCI

Current State

  • Requires terraform repositories to be checked out to a directory (CHECKOUT_DIR) and to have a terraform.tfplan

Quickstart

Get it up and running quickly in docker:

docker run --expose=3000 webdevwilson/tfwatch /var/lib/tfwatch

Planned Features

  • Securely stores template variables
  • Generates plans when changes committed to source
  • Review and apply plans

Configuration

Command Line Flags

To see the command line flags for configuration.

tfwatch -h

Environment Variables

  • CHECKOUT_DIR - The directory that contains Terraform repositories. These must have a terraform.tfplan in them. Default is /var/lib/tfwatch.
  • CLEAR_STATE - Clear the state when this variable is set. Default is false.
  • LOG_LEVEL - Valid values are: DEBUG, INFO, WARN, ERROR. Default is INFO.
  • PLAN_INTERVAL - The number of minutes between plan refreshes. Default is 5.
  • PORT - The port the HTTP server will bind to. Default is 3000.
  • STATE_DIR - The location where state is stored on disk. Default is .tfwatch/projects.
  • SITE_DIR - Directory containing static site resources. Default is site/dist.

Developing

You can download the latest release from the Releases page.

Backend

The backend is written using go 1.8.1. govendor is used for vendoring. To install the tools you will need to develop on the backend, run make tools.

To run the backend with live reload run fresh.

You must have $GOPATH/bin on your $PATH for fresh to work

Frontend

Frontend vue.js app under NodeJS v6.10.2

To run the front end, run npm run dev from the /site directory. You will also need the backend running go run main.go to respond to API requests.

NOTE: To run V2 of the site, run npm run dev from the siteV2 directory

API Endpoints

  • /status - GET Get service status
  • /api/projects - GET,PUT List all projects, create project
  • /api/projects/{guid} - POST,DELETE Update or delete projects
  • /api/projects/{guid}/tfplan - GET Return the current plan associated with the project guid

Testing

  • make test

Running

  • Backend: go run main.go
  • Frontend: cd site; npm install; npm run dev

tfwatch's People

Contributors

webdevwilson avatar

Stargazers

Ruslan Khozinov avatar

Watchers

James Cloos avatar Ruslan Khozinov avatar  avatar

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.