Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.43 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.43 KB

Corral

Go Report Card

Corral is a CLI tool for creating and packaging reproducible development environments. Corral allows developers to manage multiple environments, called corrals, and provision them consistently using shared packages.

Installation

To install corral download the latest binary from the releases.

First Time Setup

Before we can use corral we need to run the first time setup.

corral config

We also want to set a few global variables, digitalocean_token and digitalocean_domain. Any variables set with config will be passed to all corrals. This is useful for setting things like cloud credentials or ssh keys. You can always override these values when creating a new corral with the -v flag.

corral config vars set digitalocean_token $MY_DO_TOKEN
corral config vars set digitalocean_domain $MY_DO_DOMAIN

Create

First we need to create our corral.

corral create simple ghcr.io/rancherlabs/corral/k3s:latest

Once this command finishes we will have a Digitalocean droplet running k3s configured.

List

We can always check what corrals we have running by listing them.

corral list

Vars

Next lets connect to our cluster. We can get the Kubernetes configuration file from the corral's variables. The file is base64 encoded, so we will need to decode it before we can use it.

corral vars simple kubeconfig | base64 --decode > simple.yaml
kubectl --kubeconfig simple.yaml get nodes

Delete

Once we are done using the cluster we can delete it and clean up all the resources generated in Digitalocean.

corral delete simple

What is a corral?

A corral is a collection of resources in a remote environment. Think of it as a way to track the environments you set up and how you set them up. Corrals are created from packages.

What is a corral package?

A corral package is a description of an environment. A package consists of one terraform module and filesystem overlay. The terraform module is used to provision cloud resources. Once the resources are created corral will upload the files in the overlay folder to any nodes generated by terraform and call the commands defined in the manifest.

How do I create a package?

See the tutorial here.