Skip to content

Commit

Permalink
adding final blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Washburn committed Dec 26, 2018
1 parent 9f00e34 commit d4fcfdf
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
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
7 changes: 7 additions & 0 deletions README.md
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
8 changes: 8 additions & 0 deletions config/blobs.yml
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
6 changes: 6 additions & 0 deletions config/final.yml
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
5 changes: 5 additions & 0 deletions jobs/jumpbox/monit
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
33 changes: 33 additions & 0 deletions jobs/jumpbox/spec
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
9 changes: 9 additions & 0 deletions jobs/jumpbox/templates/config/bashrc
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 added jobs/tools/monit
Empty file.
9 changes: 9 additions & 0 deletions jobs/tools/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: tools
packages:
- tools

templates:
bin/run: bin/run

properties: {}
32 changes: 32 additions & 0 deletions packages/tools/packaging
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
9 changes: 9 additions & 0 deletions packages/tools/spec
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 added src/.gitkeep
Empty file.

0 comments on commit d4fcfdf

Please sign in to comment.