Cast
Cast is a command line utility that abstracts away SaltStack for compatible configurations.
It is the successor to the SIFT CLI but made in such a way that it is no longer specific to SIFT.
The goal is to deliver a simple command line utility to install custom distributions that are build with saltstack.
Installation
Visit the releases page to download the appropriate file for your architecture. There are .deb
files for installation
with dpkg -i
, there are just vanilla binaries that you can download and put into /usr/local/bin
if you'd like to as well.
Usage
cast install <owner/repo|alias>
cast install teamdfir/sift-saltstack
Existing Aliases
Cast comes with two built in aliases for existing support distributions, additional aliases will not be added, it's a
short term solution until the older install methods have fallen off.
Note: there are only two aliases currently supported, sift
and remnux
which are resolved to
teamdfir/sift-saltstack
and remnux/salt-states
respectively.
What is a Cast Distribution?
Simply put a cast distro is one published by the cast binary. The underlying technology used for installing the distro
is Saltstack.
To create a Cast distribution you need a .cast.yml
file and need your repository to be a valid SaltStack configuration
that would work with a state.apply
command.
Existing Distributions
There are only two (2) version 1 cast distros out there and they are SIFT and REMnux and what makes them a v1 is the way
the release files are generated and signed and how the saltstack files are organized in the repository.
A version 2 cast distro is one like cast-example-distro where the salt states start in the root of the project
and the release is generated by the cast release
. The reason for moving the states to the root is for git submodule
usage for distros that extend another distro.
Configuration
Cast is configured via the .cast.yml
file in the root of the cast distro project. This configuration is required and
contains important information like what GitHub Repository should releases be published to, what the manifest file
contents should be.
Part of the configuration is the manifest
definition that ultimately gets uploaded as a release asset. The manifest
dictates things like base
, modes
, and supported operating systems
.
name
- the name of the distro
base
- (optional) this is the name of the base directory where the saltstack files exist in the project root
modes
- this is a way to define modes that the user can specify along with the default mode, if none is specified
supported_os
- this is a way to define what operating systems are supported
For Developers
If your distro is called alpha
then your name
should be alpha
, all base saltstack states should be based out of
the root of the project, however if all the states have to be in a subdirectory, then the base_dir
must be set to the
name of that subdirectory.
Aliases
Aliases are only for SIFT and REMnux and not intended for long term use. The aliases serve a more specific purpose for
supporting backwards compatibility for older versions of SIFT and REMnux that were not released as a cast distro
originally.
Developers
Developing a distro for cast is very simple, this documentation will walk you through cast initialization.
Saltstack
To make embedding a distro easier in another distro both for the community and for SANS builds purposes, the salt
states have now been moved to the root of the project. This allows for a repo to be submodule into another repo and
the manifest.yml
dictates to the installer how things should be extracted and installed.
Release
Requirements
- Tag must be created outside the tool and pushed to the remote
- Cosign private key and public key must be present in the repo
Creating a release has never been more simply. However, one thing is required, that you tag and push the tag to GitHub
prior to running the command.
git tag v1.0.0 && git push origin --tags
Then you simply run the release command from your local branch.
cast release