MCPcopy Index your code
hub / github.com/coldbrewcloud/coldbrew-cli

github.com/coldbrewcloud/coldbrew-cli @v1.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.2 ↗ · + Follow
329 symbols 942 edges 67 files 3 documented · 1% updated 2y agov1.4.2 · 2017-09-02★ 24919 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

coldbrew-cli

Build Status

tl;dr coldbrew-cli automates your Docker container deployment on AWS.

Objectives

coldbrew-cli can provide

  • faster access to ECS (jumpstart with little knowledge on AWS specifics)
  • lower maintenance costs (most cases you don't even need AWS console or SDK)
  • lessen mistakes by removing boring repetitions
  • easier integration with CI

Features

  • ECS cluster with EC2 Auto Scaling Group configured
  • Support ELB Application Load Balance (multiple app instances on a single EC2 instance)
  • Logging: most of Docker logging drivers and AWS CloudWatch Logs

Getting Started

Install and Configure CLI

  • Download CLI executable (coldbrew or coldbrew.exe) and put it in your $PATH.
  • Configure AWS credentials, region, and VPC through environment variables or CLI Flags.
  • Make sure you have docker installed in your system. You will also need Dockerfile for your application if you want to build Docker image using coldbrew-cli.

Core Concepts

coldbrew-cli operates on two simple concepts: applications (apps) and clusters.

  • An app is the minimum deployment unit.
  • One or more apps can run in a cluster, and, they share the computing resources.

This is what a typical deployment workflow might look like:

  1. Create new cluster (See: cluster-create)
  2. Create app configuration (See: init)
  3. Development iteration:
  4. Make code/configuration changes
  5. Deploy app to cluster (See deploy)
  6. Check app/cluster status (See: status and cluster-status) and adjust cluster capacity as needed (See: cluster-scale)
  7. Delete app and its resources (See: delete )
  8. Delete cluster and its resources (See: cluster-delete)

See Concepts for more details.

Tutorials

Check out tutorials: - Running a Node.JS application on AWS - Running a Slack bot on AWS - Running a Meteor application on AWS - Running a Go application on AWS - Running a scalable WordPress website on AWS

Core Functions

Create Cluster

To start deploying your applications, you need to have at least one cluster set up.

coldbrew cluster-create {cluster-name}

cluster-create command will look into your current AWS environment, and, will perform all necessary changes to build the cluster. Note that it can take several minutes until all Docker hosts (EC2 instances) become fully available in your cluster. Use cluster-status command to check the status. You can also adjust the cluster's computing capacity using cluster-scale command.

Configure App

The next step is prepare the app configuration file.

coldbrew init --default

You can manually create/edit your configuration file, or, you can use init command to generate a proper default configuraiton.

Deploy App

Once the configuration file is ready, now you can deploy your app in the cluster.

coldbrew deploy

Basically deploy command does: - build Docker image using your Dockerfile (but this is completely optional if provide your own local Docker image; see --docker-image flag) - push Docker image to a remote repository (ECR) - analyze the current AWS environment and setup, and, perform all necessary changes to initiate ECS deployments

Then, within a couple minutes (mostly less than a minute), you will see your new application units up and running.

Check Status

You can use status and cluster-status commands to check the running status of your app and cluster respectively.

coldbrew status

coldbrew cluster-status {cluster-name}

Delete App

When you no longer need your app, you can remove your app from the cluster using delete command.

coldbrew delete

delete command gathers a list of AWS resources that need to be deleted, and, if you confirm, it will start cleaning them up. It can take several minutes for the full process.

Delete Cluster

You can use a cluster for more than one apps, but, when you no longer need the cluster, you use cluster-delete command to clean up all the resources.

coldbrew cluster-delete

Similar to delete command, cluster-delete will delete all AWS resources that are no longer needed. It can take several minutes for the full process.

Documentations

Extension points exported contracts — how you extend this code

Command (Interface)
(no doc) [8 implementers]
commands/command.go
ExecCallback (FuncType)
(no doc)
exec/exec.go

Core symbols most depended-on inside this repo

Error
called by 171
core/errors.go
Validate
called by 115
config/validate.go
EC2
called by 31
aws/client.go
DefaultConfig
called by 28
config/default_config.go
ECS
called by 23
aws/client.go
ELB
called by 22
aws/client.go
askQuestion
called by 20
commands/create/command.go
AutoScaling
called by 20
aws/client.go

Shape

Method 156
Function 130
Struct 40
FuncType 2
Interface 1

Languages

Go100%

Modules by API surface

aws/ec2/client.go21 symbols
aws/elb/client.go15 symbols
aws/ecs/client.go15 symbols
console/output.go14 symbols
aws/iam/client.go14 symbols
utils/conv/conv.go12 symbols
flags/flags_test.go12 symbols
console/console.go12 symbols
aws/autoscaling/client.go12 symbols
aws/client.go10 symbols
docker/client.go9 symbols
core/apps.go9 symbols

For agents

$ claude mcp add coldbrew-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact