-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Caleb Washburn
committed
Dec 26, 2018
1 parent
9f00e34
commit d4fcfdf
Showing
12 changed files
with
137 additions
and
0 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,19 @@ | ||
config/dev.yml | ||
config/private.yml | ||
releases/*.tgz | ||
releases/**/*.tgz | ||
dev_releases | ||
.blobs | ||
blobs | ||
.dev_builds | ||
.idea | ||
.DS_Store | ||
.final_builds/jobs/**/*.tgz | ||
.final_builds/packages/**/*.tgz | ||
*.swp | ||
*~ | ||
*# | ||
#* | ||
pkg | ||
bin | ||
*.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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# jumpbox-boshrelease | ||
Bosh release for setting up jumpbox with needed utilities | ||
|
||
Inspired by https://github.com/cloudfoundry-community/jumpbox-boshrelease | ||
|
||
# Included items | ||
- Docker | ||
- git | ||
- pivnet-cli |
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,8 @@ | ||
tools/bins/pivnet-cli: | ||
size: 9830426 | ||
object_id: d1c3a5f7-8fd8-4db6-52a1-38ad9b018b21 | ||
sha: 10a3faace933eb5667b8ad5f7399ec8a19898732 | ||
tools/git-2.14.1.tar.gz: | ||
size: 6987933 | ||
object_id: adc9a931-7d5e-4d9f-6a48-b1affd23b5a6 | ||
sha: e173270a5f224078e3f6c639937da5bd84045225 |
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 @@ | ||
--- | ||
final_name: jumpbox | ||
blobstore: | ||
provider: s3 | ||
options: | ||
bucket_name: pivotalservices-bosh-blobs |
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 watcher | ||
with pidfile /var/vcap/sys/run/jumpbox/watcher.pid | ||
start program "/var/vcap/jobs/jumpbox/bin/jumpbox_ctl start" | ||
stop program "/var/vcap/jobs/jumpbox/bin/jumpbox_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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: jumpbox | ||
packages: | ||
- tools | ||
|
||
templates: | ||
bin/jumpbox_ctl: bin/jumpbox_ctl | ||
bin/watcher: bin/watcher | ||
config/banner: config/banner | ||
config/bashrc: config/bashrc | ||
|
||
properties: | ||
jumpbox.hostname: | ||
description: "Hostname to set on the jumpbox" | ||
default: "jumpbox.local" | ||
|
||
jumpbox.hosts: | ||
description: "A list of entries to append to /etc/hosts" | ||
default: [] | ||
|
||
jumpbox.ssh_password_auth: | ||
description: "Modify the jumpbox SSH configuration to permit users to authenticate via passwords when using SSH." | ||
default: false | ||
|
||
jumpbox.users: | ||
default: [] | ||
description: |- | ||
List of users to create | ||
- name: cwashburn | ||
shell: /bin/bash | ||
ssh_keys: | ||
- ssh-rsa AAAAB3NzaC1yabcd | ||
- ssh-rsa AAAAB3NzaC1y1234 |
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,9 @@ | ||
#!/bin/bash | ||
## jumpbox system-wide bashrc | ||
export PS1=$(echo '[\[\e[1;33m\t\e[0m\]] \[\e[1;32m\]\u@\h\[\e[0m\] \[\e[1;34m\]\w\[\e[0m\]\n\[\e[1;34m\]\$ \[\e[0m\]') | ||
umask 002 | ||
|
||
################################################################################ | ||
##################################################### env vars you get for free | ||
export DOCKER_HOST=unix:///var/vcap/sys/run/docker/docker.sock | ||
export PATH=/var/vcap/packages/tools/bin:/var/vcap/packages/docker/bin:$PATH |
Empty file.
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,9 @@ | ||
--- | ||
name: tools | ||
packages: | ||
- tools | ||
|
||
templates: | ||
bin/run: bin/run | ||
|
||
properties: {} |
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,32 @@ | ||
#!/bin/bash | ||
set -e # exit immediately if a simple command exits with a non-zero status | ||
set -u # report the usage of uninitialized variables | ||
|
||
# Detect # of CPUs so make jobs can be parallelized | ||
CPUS=$(grep -c ^processor /proc/cpuinfo) | ||
# Available variables | ||
# $BOSH_COMPILE_TARGET - where this package & spec'd source files are available | ||
# $BOSH_INSTALL_TARGET - where you copy/install files to be included in package | ||
export HOME=/var/vcap | ||
n=0 # how many jobs have we spun in parallel? | ||
|
||
mkdir ${BOSH_INSTALL_TARGET}/bin | ||
|
||
cp -a tools/bins/* ${BOSH_INSTALL_TARGET}/bin | ||
chmod 0755 ${BOSH_INSTALL_TARGET}/bin/* | ||
|
||
|
||
# GIT | ||
# https://www.kernel.org/pub/software/scm/git | ||
# https://www.kernel.org/pub/software/scm/git/git-2.14.1.tar.gz | ||
(tar -xzvf tools/git-2.14.1.tar.gz | ||
cd git-2.14.1 | ||
./configure --prefix=${BOSH_INSTALL_TARGET} | ||
make -j${CPUS} all | ||
make install) & | ||
n=$((n + 1)) | ||
|
||
while [[ $n -gt 0 ]]; do | ||
wait -n | ||
n=$((n - 1)) | ||
done |
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,9 @@ | ||
--- | ||
name: tools | ||
|
||
dependencies: [] | ||
|
||
files: | ||
- tools/bins/pivnet-cli | ||
# git | ||
- tools/git-2.14.1.tar.gz |
Empty file.