Skip to content

LINKIT-Group/deploytools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

  1. Linux-, Mac- or Unix-based system.
  2. Docker deamon. Install instructions: Ubuntu / Mac.
  3. Docker compose script, instructions here.
  4. Functionally complete shell. Able to create new Docker containers (2, 3), run "git" and "make". Git is only used once on the host, to clone this project. Make is used for firing up docker oneliners, all work gets done in container-space so there are no additional application dependencies for the host.
  5. an AWS account to create a DynamoDB-S3 pair (remote state backend).

WYSIWYG

MakeGit

MakeInfra

Prepare

clone this project

git clone https://github.com/LINKIT-Group/deploytools.git
cd deploytools

setup credentials for AWS

An AWS account is required to setup an Access Key for your user and put this in your home-directory. Note, currently only AWS is supported for the remotestate backend. cat ~/.aws/credentials

[default]
aws_access_key_id = ${YOUR_ACCESS_KEY_ID}
aws_secret_access_key = ${YOUR_SECRET_ACCESS_KEY}

Usage

Note: at first run a Docker image will be build, this can take a few minutes. Subsequent runs are much faster.

Pull-merge a new project repository into ./build/buildrepo

make git url=https://github.com/LINKIT-Group/aws-cicd-demo.git

Deploy infrastructure

make infra

Create remotestate (on AWS) and Terraform backend file

Create a remote state backend on AWS (two DynamoDB tables, and an S3 bucket) for the pulled ${GIT_REPO} from previous section. One set of DynamoDB/S3 is created per GIT_HOST/GROUP combination (example: "https://github.com/LINKIT-Group"), multiple repositories in a group share a DynamoDB/S3 set.

# create a remote state backend for git-repo in ./build/buildrepo
make remotestate

Cleanup

# clear ./build directory
make clean

Related

Docker & Makefile

Makefile configuration is based upon this article

Python modules: makegit and remotestate

These two modules are installed automatically through Docker (see Dockerfile).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published