MonkScript Overview
MonkScript
MonkScript is Monk's composable definition language with runtime scripting abilities. Apart from the CLI, MonkScript is the primary way of programming MonkOS to run and manage workloads.
MonkScript sources can live in YAML files. These YAML files are called kits and the statements within, are called entities. An entity can be either a runnable (a single component, much like K8s pod) or a group (a composition of other entities, including groups).
A notable difference between MonkScript and other YAML based Infrastructure-As-Code languages is that there is no need for macros or pre-processors. MonkScript implements a set of inheritance and composition rules that can express even the most complicated systems in a straightforward manner.
Read more about MonkScript YAML →
In addition to the built-in composition capabilities, MonkScript allows the operator to define almost all values in terms of variables and one-line scripts called Arrow scripts. These small scripts start with <-
(hence the name) and are computed at runtime. This allows Monk's control plane to track and crunch any signal coming from a running container, or to perform user-defined actions at any time.
Arrow scripts are immensely powerful - they are used to implement service discovery and health check mechanisms among other core functions in Monk.
Read more about MonkScript Arrow scripting →
Last but not least, MonkScript manifests are meant to be fully portable between MonkOS clusters - meaning that any MonkOS cluster can interpret and run all existing Kits. Additionally, all public Kits available in the Monk Hub are readily available to be run and composed on any MonkOS cluster. This makes MonkScript globally share-able and easy to apply.