vinyl-linux / vc

vc (Vinyl Config) is a cloud-init style tool to run a build script on first-boot, but without the bloat of python, or the ansible-like scope creep

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vc

Maintainability Rating Security Rating Technical Debt

vc is a cloud-init-alike tool for running a script once, and only once, to bootstrap a server. Unlike cloud-init, or similar tools, it is distributed as a statically compiled binary and does sod-all beyond run a script and store the output.

Running

This tool can either be invoked directly on the CLI as per:

$ vc run some-job.toml

Where some-job.toml is a file following the below spec.

It can also be run as a vinit job with a job such as this.

Job Spec

The following sample job is a good jumping off point:

name = "My simple vc script"
description = "Run a single script to say hello <3"

[script]
interpreter = "/bin/sh"
body = '''
#!/usr/bin/env bash
#

set -axe

echo "Hello from vc!"
'''

The most important section is the [script] section. It has the following keys:

  1. interpreter - this must be set; this tool expects an interpreter to be set to encourage clear, easily grokkable scripts
  2. body - a script which can be run via the interpretter.
  3. url - vc can also download a script to run

Only one of body or url can be included.

Jobs can be validated with:

$ vc validate some-job.yaml

Other commands

$ vc

Usage:
  vc [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         Run a vc script
  status      Show the status of either the specified script, or all scripts
  validate    Validate a vc config is correct
  version     Return server and client version information

About

vc (Vinyl Config) is a cloud-init style tool to run a build script on first-boot, but without the bloat of python, or the ansible-like scope creep

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 97.9%Language:Makefile 2.1%