Socket
Socket
Sign inDemoInstall

github.com/xmidt-org/carousel

Package Overview
Dependencies
65
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/xmidt-org/carousel


Version published

Readme

Source

the iac wrapper that will continue going in a circle to deploy servers.

Build Status codecov.io Go Report Card Apache V2 License Quality Gate Status GitHub release PkgGoDev

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

# For a dry run of upgrading to 0.3.1 with 4 nodes
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.

# For rollout 4 nodes of version 1.2.3
# the created hosts will be validated against the CheckHost(fqdn string) bool func
carousel rollout -p hostValidator.so 4 1.2.3

For more information refer to the example dir

Docker

make docker
# note plugins must be compiled on the same OS.

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.

FAQs

Last updated on 05 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc