Skip to content

Open source tool to handle remote terraform workspace in organizations and handle all the lifecycle (plan, apply, destroy).

License

Notifications You must be signed in to change notification settings

liuzhijun/terrakube-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terrakube Platform

Gitter Build Coverage License gitbook

Open source tool to handle remote terraform workspace in organizations and handle all the lifecycle (plan, apply, destroy).

The server defines a rest API based on Yahoo Elide and expose a JSON:API or GraphQL.

High Level Architecture

Architecture

Component descriptions:

  • Terrakube API: Expose a JSON:API or GraphQL API providing endpoints to handle:
    • Organizations.
    • Workspaces
    • Jobs.
    • Modules
    • Providers
  • Terrakube Executor:
    • Service that executes the terraform operations, updates the status using the Terrakube API and save the results using different cloud storage providers.
  • Terrakube Registry:
    • Open Source terraform registry with support for the module and provider protocol.
  • Cloud Storage:
    • Cloud storage to save terraform state and terraform outputs.
  • RDBMS:
    • The platform can be used with any database supported by the Liquibase project.
  • Security:
    • To handle authentication the platform uses Azure Active Directory.
  • Terrakube CLI:
    • Go based CLI that can communicate with the Terrakube API and execute operation for organizations, workspaces, jobs, modules or providers
  • Terrakube UI:
    • React based frontend to handle all Terrakube Operations.

For more information please visit our documentation.

Version Control Services

The platform support public and private repositories in the following providers:

  • GitHub.com
  • Bitbucket.com
  • Gitlab.com
  • Azure DevOps

Requirements

To compile and run the tool you will need the following:

  • Java 11
  • Maven

Compiling

mvn clean install

Modules

This project contains two modules describe below:

Name Description
api Expose the API to manage all terraform workspaces
api-registry Open source terraform registry compatible with the terrakube API

Security - Authentication

By default, Azure Active Directory protects the API authentication. To better understand Azure Active directory authentication please refer to these links:

Supported Databases

To run the api you need the following environment variables:

Name Description
SQL Azure Supported
PostgreSQL Supported
MySQL In testing
MariaDB Pending
Oracle Pending

Running Sample Application

Please check the docker compose repository:

git clone https://github.com/AzBuilder/terrakube-docker-compose.git
cd local
docker-compose up

Build Docker Images

To build the docker images for the server and server job execute the following command:

mvn spring-boot:build-image

API Operations

The server supports the following endpoints:

  • Organization
  • Teams
  • Modules
  • Providers
  • Templates
  • Workspace
  • Jobs
  • Schedule
  • History

For more information please refer to the API documentation

Postman Examples

For more detail information about how to use azb-server json:api please check the following files:

About

Open source tool to handle remote terraform workspace in organizations and handle all the lifecycle (plan, apply, destroy).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%