Skip to content

calebfroese/rules_bosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BOSH rules for Bazel

About

These rules provide support for building BOSH releases using the Bazel build system. This may be useful to you if you're already using Bazel for building your project and would like to start using BOSH for deployment.

This project is still in early stages but it can already build valid compiled releases for BOSH directors.

Usage

You should familiarize yourself with the components of a BOSH release if you haven't already done so. The rules do not use the standard toolchain to build the release but the basic components are still the same.

The core API has 3 rules at the moment. Here are some examples below from the BPM branch which uses Bazel to build its release. I'm still working on this documentation: expect something more proper in the future.

load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_package")

bosh_package(
    name = "bpm",
    srcs = [
        "//bpm/cmd/bpm",
    ],
)
load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_release")

bosh_release(
    name = "bpmrelease",
    jobs = [
        "//bosh/jobs/bpm:bpm",
        "//bosh/jobs/test-server:test-server",
    ],
    packages = [
        ":bpm",
        ":bpm-runc",
        ":test-server",
    ],
    stemcell_distro = "ubuntu-trusty",
    stemcell_version = "1234",
)
load("@com_github_xoebus_rules_bosh//bosh:def.bzl", "bosh_job")

bosh_job(
    name = "bpm",
    monit = ":monit",
    spec = ":spec",
    templates = [
        "templates/bpm",
        "templates/pre-start.erb",
        "templates/setup.erb",
    ],
    visibility = ["//bosh:__pkg__"],
)

About

bazel rules for bosh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published