-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update release with manifest, monit, ctl, etc..
- Loading branch information
1 parent
007490c
commit e035114
Showing
9 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
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,15 @@ | ||
config/private.yml | ||
blobs | ||
dev_releases | ||
releases/*.tgz | ||
releases/**/*.tgz | ||
.dev_builds | ||
.final_builds/jobs/**/*.tgz | ||
.final_builds/packages/**/*.tgz | ||
.DS_Store | ||
.idea | ||
*.swp | ||
*~ | ||
*# | ||
#* | ||
src/credhub-webui/credhub-webui-*.tgz |
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,6 @@ | ||
#!/bin/bash | ||
echo "Download blobs" | ||
if [ ! -d src/credhub-webui ]; then | ||
mkdir -p src/credhub-webui | ||
fi | ||
curl -L https://github.com/shreddedbacon/credhub-webui/releases/download/v0.0.1/credhub-webui-linux-0.0.1.tgz > src/credhub-webui/credhub-webui-linux-0.0.1.tgz |
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,5 @@ | ||
check process credhub-webui | ||
with pidfile /var/vcap/sys/run/credhub-webui/pid | ||
start program "/var/vcap/jobs/credhub-webui/bin/ctl start" | ||
stop program "/var/vcap/jobs/credhub-webui/bin/ctl stop" | ||
group vcap |
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 |
---|---|---|
@@ -1,9 +1,26 @@ | ||
--- | ||
name: credhub-webui | ||
|
||
templates: {} | ||
templates: | ||
ctl.erb: bin/ctl | ||
ssl.cert.erb: ssl/ssl.cert | ||
ssl.key.erb: ssl/ssl.key | ||
|
||
packages: | ||
- credhub-webui | ||
|
||
properties: {} | ||
properties: | ||
credhub_server: | ||
description: "ip or hostname and port of credhub server to target" | ||
example: "https://192.168.50.6:8844" | ||
cookie_key: | ||
description: "Must be 16, 24 or 32 bytes long (AES-128, AES-192 or AES-256)" | ||
default: "super-secret-key" | ||
cookie_name: | ||
description: "Name of the cookie to use" | ||
default: "auth-cookie" | ||
ssl: | ||
certificate: | ||
description: "Certificate to use for the front end" | ||
private_key: | ||
description: "Private key for the certificate" |
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,40 @@ | ||
#!/bin/bash | ||
|
||
RUN_DIR=/var/vcap/sys/run/credhub-webui | ||
LOG_DIR=/var/vcap/sys/log/credhub-webui | ||
CERT_DIR=/var/vcap/jobs/credhub-webui/ssl | ||
PIDFILE=${RUN_DIR}/pid | ||
|
||
case $1 in | ||
|
||
start) | ||
set -ex | ||
mkdir -p $RUN_DIR $LOG_DIR | ||
|
||
chown -R vcap:vcap $RUN_DIR $LOG_DIR | ||
|
||
echo $$ > $PIDFILE | ||
|
||
cd /var/vcap/packages/credhub-webui | ||
|
||
exec /var/vcap/packages/credhub-webui/credhub-webui \ | ||
-credhub-server "<%= p("credhub_server") %>" \ | ||
-cookie-key "<%= p("cookie_key") %>" \ | ||
-cookie-name "<%= p("cookie_name") %>" \ | ||
-ui-ssl-cert $CERT_DIR/ssl.cert \ | ||
-ui-ssl-key $CERT_DIR/ssl.key \ | ||
>> $LOG_DIR/server.stdout.log \ | ||
2>> $LOG_DIR/server.stderr.log | ||
|
||
;; | ||
|
||
stop) | ||
kill -9 `cat $PIDFILE` | ||
rm -f $PIDFILE | ||
|
||
;; | ||
|
||
*) | ||
echo "Usage: ctl {start|stop}" ;; | ||
|
||
esac |
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 @@ | ||
<%= p("ssl.certificate") %> |
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 @@ | ||
<%= p("ssl.key") %> |
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,49 @@ | ||
--- | ||
name: credhub-webui | ||
|
||
releases: | ||
- name: credhub-webui | ||
version: latest | ||
|
||
stemcells: | ||
- os: ubuntu-trusty | ||
alias: default | ||
version: latest | ||
|
||
instance_groups: | ||
- name: web | ||
instances: 1 | ||
stemcell: default | ||
azs: [z1] | ||
vm_type: default | ||
persistent_disk_type: default | ||
networks: | ||
- name: default | ||
jobs: | ||
- name: credhub-webui | ||
release: credhub-webui | ||
properties: | ||
credhub_server: "https://192.168.50.6:8844" | ||
ssl: | ||
certificate: ((credhub_webui_tls.certificate)) | ||
key: ((credhub_webui_tls.private_key)) | ||
|
||
variables: | ||
#- name: credhub_webui_ca | ||
# type: certificate | ||
# options: | ||
# is_ca: true | ||
# common_name: credhub-webui.local | ||
- name: credhub_webui_tls | ||
type: certificate | ||
options: | ||
# ca: credhub_webui_ca | ||
self_sign: true | ||
common_name: credhub-webui.local | ||
alternative_names: [localhost] | ||
|
||
update: | ||
canaries: 1 | ||
max_in_flight: 3 | ||
canary_watch_time: 30000-600000 | ||
update_watch_time: 5000-600000 |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
set -e | ||
|
||
tar -zxf credhub-webui/credhub-webui-*.tgz \ | ||
-C ${BOSH_INSTALL_TARGET} \ | ||
--strip-components=1 | ||
-C ${BOSH_INSTALL_TARGET} |