- Linux-, Mac- or Unix-based system.
- Docker deamon. Install instructions: Ubuntu / Mac.
- Docker compose script, instructions here.
- 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.
- an AWS account to create a DynamoDB-S3 pair (remote state backend).
git clone https://github.com/LINKIT-Group/deploytools.git
cd deploytools
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}
Note: at first run a Docker image will be build, this can take a few minutes. Subsequent runs are much faster.
make git url=https://github.com/LINKIT-Group/aws-cicd-demo.git
make infra
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
# clear ./build directory
make clean
Makefile configuration is based upon this article
These two modules are installed automatically through Docker (see Dockerfile).
- makegit, to merge multiple GIT repos into a buildrepo. Source: https://github.com/LINKIT-Group/makegit
- remotestate, to create a remote state backend. Source: https://github.com/LINKIT-Group/remotestate