"star-cm" ⭐
- A rudimentary configuration management language that utilizes Starlark instead of Ruby, json, or yaml.
- Why Starlark? Starlark provides variables, functions, loops, and lots more "for free" inside of the configuration files!
Starcm is intended to become a viable alternative for tools like macadmins/installapplications, facebookincubator/go2chef, and google/glazier.
Download starcm from https://github.com/discentem/starcm/releases and install it somewhere in your path, such as /usr/local/bin/starcm
.
Install https://github.com/bazelbuild/bazelisk and do make install
.
Starcm is very flexible and can accomplish lots of tasks. Here are a just a few examples of what it can do
We can use Starcm to download and install packages for macOS. We can even store the configuration file (that tells Starcm what package we want to install) on a web server as well.
See examples/install_go/bootstrap.star which shows an example of this.
You can run the example like so:
-
Start a web server that serves this repo.
$ python3 -m http.server -d .
-
Run starcm with bootstrap.star, which will download an additional
.star
file from the webserver and execute it. Afterwards check that/opt/example.json
now exists, which gets placed on disk by the package we installed.$ starcm --root_file examples/install_a_pkg_from_server/bootstrap.star result(changed = True, diff = "", error = None, name = "download examplejson-1.0.pkg", output = "downloaded file to examplejson-1.0.pkg", success = True) { "name": "install examplejson-1.0.pkg", "changed": True, "success": True }