Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .final_builds/packages/ruby-3.0/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
builds:
68d0d668e001f63962387cc87c418ea98d7cf88880a7feb6e1ba12561653efb1:
version: 68d0d668e001f63962387cc87c418ea98d7cf88880a7feb6e1ba12561653efb1
blobstore_id: 67174e62-14ca-42cc-7a2b-02376d4b790c
sha1: sha256:3526abe6891f7d37ca3eeda5a3ad77f0c3e04529768d57267d3168d4cf36c4b7
format-version: "2"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jumpbox:
- curl 7.81.0
- git 2.35.1
- jq 1.5
- tmate 2.4.0
- tmux 3.2a
- libevent 2.1.12
- tree 2.0.2
Expand Down Expand Up @@ -97,5 +98,4 @@ Precompiled binaries / scripts:
- shield 8.7.4
- spiff 1.0.8
- terraform 1.1.7
- tmate 2.4.0
- vault 1.9.4
8 changes: 4 additions & 4 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ jumpbox/bins/terraform:
size: 63262720
object_id: 74d2c27f-7dc7-4eb2-4538-a89835a402ed
sha: sha256:ba86f524c64a97df436d541e67480607d0330ea27b23c3208316260189210151
jumpbox/bins/tmate:
size: 3135320
object_id: 1556169c-020e-44e4-5892-995890c24d99
sha: sha256:d2fff992e40ce18ff81b9a92fa1cb93a56fb5a82c1cc428204552d8dfa1bc04f
jumpbox/bins/vault:
size: 188378621
object_id: 8cd5b321-9288-4951-527a-322c3ab14630
Expand Down Expand Up @@ -126,6 +122,10 @@ jumpbox/libevent-2.1.12-stable.tar.gz:
size: 1100847
object_id: 853918f8-5529-47a8-7faf-2d68245d479d
sha: sha256:92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
jumpbox/tmate-2.4.0-static-linux-amd64.tar.xz:
size: 1252460
object_id: 3ca7259b-ea11-4b08-5a19-04857a12fee9
sha: sha256:6e503a1a3b0f9117bce6ff7cc30cf61bdc79e9b32d074cf96deb0264e067a60d
jumpbox/tmux-3.2a.tar.gz:
size: 648394
object_id: c795d961-e908-4f28-7632-f7816d2a9cef
Expand Down
1 change: 1 addition & 0 deletions jobs/jumpbox/spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: jumpbox
packages:
- jumpbox
- golang
- ruby-3.0

templates:
bin/jumpbox_ctl: bin/jumpbox_ctl
Expand Down
10 changes: 5 additions & 5 deletions jobs/jumpbox/templates/bin/watcher
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ log() { echo >&2 "[$(date +'%Y%m%d %HH%MM.%SS')] jumpbox[$$]: " $* ; }

sshd_configure() {
key=$1 ; value=$2
if ! grep -q '^${key} ${value}' /etc/ssh/sshd_config; then
if ! grep -q "^${key} ${value}" /etc/ssh/sshd_config; then
log1 "/etc/ssh/sshd_config => ${key} ${value}"
sed -i -e '/^${key}/d' /etc/ssh/sshd_config
sed -i -e "/^${key}/d" /etc/ssh/sshd_config
echo "${key} ${value}" >> /etc/ssh/sshd_config
fi
}
Expand Down Expand Up @@ -202,9 +202,9 @@ EOF
fi
<% end %>

sshd_configure PasswordAuthentication <%= p('jumpbox.ssh.password_auth') == "true" ? "yes" : "no" %>
sshd_configure AllowAgentForwarding <%= p('jumpbox.ssh.allow_agent_forwarding') == "true" ? "yes" : "no" -%>
sshd_configure AllowTcpForwarding <%= p('jumpbox.ssh.allow_tcp_forwarding') == "true" ? "yes" : "no" -%>
sshd_configure PasswordAuthentication <%= p('jumpbox.ssh.password_auth') == true ? "yes" : "no" %>
sshd_configure AllowAgentForwarding <%= p('jumpbox.ssh.allow_agent_forwarding') == true ? "yes" : "no" %>
sshd_configure AllowTcpForwarding <%= p('jumpbox.ssh.allow_tcp_forwarding') == true ? "yes" : "no" %>
systemctl restart sshd.service # We assume bionic or later

log1 "Setting up sudoers to allow certain environment variables to pass through"
Expand Down
13 changes: 11 additions & 2 deletions jobs/jumpbox/templates/config/bashrc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ fi
##################################################### env vars you get for free

export GOPATH=${HOME}/go
export PATH=/var/vcap/packages/jumpbox/bin:$PATH:/var/vcap/bosh/bin:/var/vcap/packages/golang/bin:${GOPATH}/bin
export PATH=/var/vcap/bosh/bin:${GOPATH}/bin:${PATH}
for p in /var/vcap/packages/*/{s,}bin; do case $p in (*toolbelt*) true ;; (*) export PATH="${p}:${PATH}" ;; esac done
export LD_LIBRARY_PATH=/var/vcap/packages/jumpbox/lib
export MANPATH=/usr/share/man:/var/vcap/packages/jumpbox/share/man:/var/vcap/packages/jumpbox/man

Expand Down Expand Up @@ -67,14 +68,22 @@ EOF
echo "Setting up your jumpbox environment"
mkdir -p ${GOPATH}
<% if p('jumpbox.setup.enabled') %>
/var/vcap/packages/jumpbox/setup
export GEM_HOME=$HOME/.gem
export GEM_PATH=$HOME/.gem
gem install -N cf-uaac
<% end %>
touch ${HOME}/.jumpbox
echo "-----------------------------------------------------------"
echo ; echo
esac
fi

if [ -d "${HOME}/.gem/bin" ]; then
export PATH=${HOME}/.gem/bin:${PATH}
export GEM_HOME=$HOME/.gem
export GEM_PATH=$HOME/.gem
fi

################################################################################
########################################################## site-specific policy
<%= p('jumpbox.bashrc') %>
12 changes: 9 additions & 3 deletions packages/jumpbox/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ CPUS=$(grep -c ^processor /proc/cpuinfo)
export HOME=/var/vcap
n=0 # how many jobs have we spun in parallel?

cp -a jumpbox/setup ${BOSH_INSTALL_TARGET}/setup
chmod 0755 ${BOSH_INSTALL_TARGET}/setup

mkdir ${BOSH_INSTALL_TARGET}/bin
cp -a jumpbox/bins/* ${BOSH_INSTALL_TARGET}/bin
cp -a jumpbox/cloudfoundry-utils/* ${BOSH_INSTALL_TARGET}/bin
Expand All @@ -38,6 +35,15 @@ n=$((n + 1))
make install) &
n=$((n + 1))

# TMATE
# https://tmate.io
# https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz
(tar -xf jumpbox/tmate-2.4.0-static-linux-amd64.tar.xz
cd tmate-2.4.0-static-linux-amd64
mv tmate ${BOSH_INSTALL_TARGET}/bin/
) &
n=$((n + 1))

# TMUX
# http://libevent.org/
# https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
Expand Down
9 changes: 5 additions & 4 deletions packages/jumpbox/spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
name: jumpbox
dependencies: []
dependencies:
- ruby-3.0
files:
- jumpbox/setup

# pre-compiled binaries / scripts
- jumpbox/bins/bbr
- jumpbox/bins/bosh
Expand All @@ -22,7 +21,6 @@ files:
- jumpbox/bins/shield
- jumpbox/bins/spiff
- jumpbox/bins/terraform
- jumpbox/bins/tmate
- jumpbox/bins/vault
- jumpbox/bins/yq
- jumpbox/cloudfoundry-utils/*
Expand All @@ -33,6 +31,9 @@ files:
# git
- jumpbox/git-2.35.1.tar.gz

# tmate
- jumpbox/tmate-2.4.0-static-linux-amd64.tar.xz

# tmux
- jumpbox/libevent-2.1.12-stable.tar.gz
- jumpbox/tmux-3.2a.tar.gz
Expand Down
2 changes: 2 additions & 0 deletions packages/ruby-3.0/spec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: ruby-3.0
fingerprint: 68d0d668e001f63962387cc87c418ea98d7cf88880a7feb6e1ba12561653efb1
20 changes: 0 additions & 20 deletions src/jumpbox/setup

This file was deleted.