fsat / k8s-cli

Other
3 stars 0 forks source link
scala scala-native

k8s-cli

CLI tools to generate Kubernetes resources for Akka, Play, Lagom based application.

Currently in prototype stage - nothing usable just yet

Build setup

The CLI tools depends on Scala Native to build, as such follow the instructions on the Scala Native setup page.

Scala Native requires LLVM 3.7 and above.

MacOS specific setup

On macOs this would mean ensuring XCode is updated to Apple's latest version. With Apple's latest XCode version, the minimum LLVM version is satisfied, so Homebrew install is not required. However, the following needs to be installed to ensure gc.h is available despite it being optional on the Scala Native setup page:

$ brew install bdw-gc re2

Build native Argonaut (Temporarily)

This step is temporary until Argonaut artefact for Scala Native 0.3 is released

$ git clone https://github.com/argonaut-io/argonaut.git
$ cd argonaut
$ sbt argonautNative/publishLocal

Building and running

Use the following SBT command to create the native executable:

$ sbt nativeLink

Once built, the native executable can be found in the target/scala-2.11/k8s-cli-out path, i.e.

$ target/scala-2.11/k8s-cli-out --help
k8s-cli 0.1.0
Usage: k8s-cli [options]

  --help             Print this help text