-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sessionsrv, builder-api, and vault all configurable by file * Retrieve detailed version from plan for builder services * Move plans to a more appropriate location for builder services * Remove config template from builder services plan's
- Loading branch information
Showing
54 changed files
with
1,021 additions
and
342 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ name = "habitat_builder_api" | |
version = "0.1.0" | ||
authors = ["Adam Jacob <[email protected]>", "Jamie Winsor <[email protected]>", "Fletcher Nichol <[email protected]>", "Joshua Timberman <[email protected]>", "Dave Parfitt <[email protected]>"] | ||
description = "Habitat-Builder HTTP API gateway" | ||
build = "build.rs" | ||
|
||
[[bin]] | ||
name = "bldr-api" | ||
|
@@ -16,6 +17,7 @@ protobuf = "*" | |
redis = "*" | ||
router = "*" | ||
rustc-serialize = "*" | ||
toml = "*" | ||
urlencoded = "*" | ||
|
||
[dependencies.clap] | ||
|
@@ -27,6 +29,9 @@ features = [ "suggestions", "color", "unstable" ] | |
git = "https://github.com/reset/rust-zmq.git" | ||
branch = "build-rs" | ||
|
||
[dependencies.habitat_core] | ||
path = "../core" | ||
|
||
[dependencies.habitat_builder_protocol] | ||
path = "../builder-protocol" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use std::env; | ||
use std::fs::File; | ||
use std::io::Write; | ||
use std::path::Path; | ||
|
||
fn main() { | ||
let version = env::var("PLAN_VERSION").unwrap_or(env::var("CARGO_PKG_VERSION").unwrap()); | ||
let mut f = File::create(Path::new(&env::var("OUT_DIR").unwrap()).join("VERSION")).unwrap(); | ||
f.write_all(version.as_bytes()).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
http_addr = "127.0.0.1:9636" | ||
sessionsrv_addr = "127.0.0.1:5560" | ||
vaultsrv_addr = "127.0.0.1:5561" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
pkg_name=hab-builder-api | ||
pkg_origin=core | ||
pkg_version=0.4.0 | ||
pkg_maintainer="Jamie Winsor <[email protected]>" | ||
pkg_license=('apachev2') | ||
pkg_source=nosuchfile.tar.gz | ||
pkg_bin_dirs=(bin) | ||
pkg_deps=(core/glibc core/openssl core/gcc-libs core/zeromq core/libsodium core/libarchive) | ||
pkg_build_deps=(core/protobuf core/protobuf-rust core/coreutils core/cacerts core/rust core/gcc core/pkg-config) | ||
srv_bin="bldr-api" | ||
pkg_service_run="bin/$srv_bin start -c ${pkg_svc_path}/config.toml" | ||
|
||
do_build() { | ||
# Used by the `build.rs` program to set the version of the binaries | ||
export PLAN_VERSION="${pkg_version}/${pkg_release}" | ||
build_line "Setting PLAN_VERSION=$PLAN_VERSION" | ||
|
||
# Used by Cargo to fetch registries/crates/etc. | ||
export SSL_CERT_FILE=$(pkg_path_for cacerts)/ssl/cert.pem | ||
build_line "Setting SSL_CERT_FILE=$SSL_CERT_FILE" | ||
|
||
export rustc_target="debug" | ||
build_line "Setting rustc_target=$rustc_target" | ||
|
||
export LIBARCHIVE_LIB_DIR=$(pkg_path_for libarchive)/lib | ||
export LIBARCHIVE_INCLUDE_DIR=$(pkg_path_for libarchive)/include | ||
export OPENSSL_LIB_DIR=$(pkg_path_for openssl)/lib | ||
export OPENSSL_INCLUDE_DIR=$(pkg_path_for openssl)/include | ||
export PROTOBUF_PREFIX=$(pkg_path_for protobuf) | ||
export SODIUM_LIB_DIR=$(pkg_path_for libsodium)/lib | ||
export LIBZMQ_PREFIX=$(pkg_path_for zeromq) | ||
|
||
pushd $PLAN_CONTEXT/.. > /dev/null | ||
cargo clean --target=$rustc_target --verbose | ||
cargo build \ | ||
-j $(nproc) \ | ||
--verbose | ||
popd > /dev/null | ||
} | ||
|
||
do_install() { | ||
install -v -D $PLAN_CONTEXT/../target/$rustc_target/$srv_bin $pkg_prefix/bin/$srv_bin | ||
} | ||
|
||
do_download() { | ||
return 0 | ||
} | ||
|
||
do_verify() { | ||
return 0 | ||
} | ||
|
||
do_unpack() { | ||
return 0 | ||
} | ||
|
||
do_prepare() { | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.