carousel
the iac wrapper that will continue going in a circle to deploy servers.
Summary
Carousel is the micromanager of an IaC to help manage errors even those that are not detected.
Table of Contents
Code of Conduct
This project and everyone participating in it are governed by
the XMiDT Code Of Conduct. By participating, you agree to this Code.
Details
OUT OF SCOPE
carousel will NOT set up the environment required for the IaC. In other words, terraform must be able to run
successfully before using carousel.
Terraform
PreReq
The .tf
file MUST contain the following:
variable "versionBlueCount" {
description = "Number of instances for version Blue"
default = 0
}
variable "versionBlue" {
description = "version for the software of group Blue"
default = "0.0.0"
}
variable "versionGreenCount" {
description = "Number of instances for version Green"
default = 0
}
variable "versionGreen" {
description = "version for the software of group Green"
default = "0.0.0"
}
module "green" {
...
}
module "blue" {
...
}
output "blueHostnames" {
value = module.blue.fqdn
}
output "greenHostnames" {
value = module.green.fqdn
}
output "blueVersion" {
value = var.versionBlue
}
output "greenVersion" {
value = var.versionGreen
}
Simple Run
carousel rollout -d 4 0.3.1
Host Validation
It is possible to provide a golang plugin to check a created host. Build a golang
plugins with the Func func CheckHost(fqdn string) bool
defined.
carousel rollout -p hostValidator.so 4 1.2.3
For more information refer to the example dir
Docker
make docker
docker run --rm -v carousel.yaml:/carousel.yaml -v deployment:/deployment/ -e WORK_DIR=/deployment/ carousel:latest
Build
In order to build from the source, you need a working Go environment with version 1.16 or greater. Find more information
on the Go website.
You can directly use go get
to put the carousel binary into your GOPATH
:
go get github.com/xmidt-org/carousel
You can also clone the repository yourself and build using make:
mkdir -p $GOPATH/src/github.com/xmidt-org/carousel
cd $GOPATH/src/github.com/xmidt-org/carousel
git clone git@github.com:xmidt-org/carousel.git
cd carousel
make build
Contributing
Refer to CONTRIBUTING.md.
Credits
carousel would not be possible without the help of many other pieces of open source software. Thank you open source
world!
Given the Apache 2.0 license of carousel, we specifically want to call out the following libraries and their
corresponding licenses shown below.