Skip to content

Instantly share code, notes, and snippets.

@stephenlauck
Created August 6, 2019 21:41
Show Gist options
  • Save stephenlauck/f94422e816efad6f05ba220d430ffdfd to your computer and use it in GitHub Desktop.
Save stephenlauck/f94422e816efad6f05ba220d430ffdfd to your computer and use it in GitHub Desktop.
Proposed CLI based flow for local builder api

Builder Local

Builder consists of minimum 3 services:

  • builder-api
  • datastore - postgresql
  • minio - storage backend

A builder (or bldr-cli) cmd line tool would also be recommended in order to have an easy UX for user to start/seed/update their local builder.

An example flow could be something like the following:

hab pkg install chef/builder -b
hab svc load chef/builder --update-strategy ...
# user.toml can contain list of seed core packages
# first start writes token file and creates core origin
bldr seed
bldr create origin COMPANYNAME
# prints token and path to keys

Leveraging a user.toml would enable builder to take a list of packages that need to be sync'd to the local service and dynamically create a plan, build and upload those packages to the service.

Example setting in user.toml

seed_pkgs [
  core/glibc
  core/curl
]

Users should be able to not consume the UI and avoid OAuth. The desired workflow should also work end to end via command line similar to what is outlined above in starting builder, getting tokens, creating origins and uploading and promoting packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment