#!/bin/tcsh -x
# This bootstrap is for FreeBSD 10.x which has most of the same principals of
# Linux, but we have had to make some variations to account for tcsh weirdness
# vs the general behavior we expect from bash on Linux distributions

# Known Issues:
# * tcsh makes capturing all the output to syslog difficult
# * We can't rely on Bash, since it's not available in FreeBSD by default.
# * Digital Ocean has no support for FreeBSD user data yet
# * AWS FreeBSD images take a long time to launch - 10mins+
#

env ASSUME_ALWAYS_YES=YES pkg bootstrap
env ASSUME_ALWAYS_YES=YES pkg upgrade --yes
env ASSUME_ALWAYS_YES=YES pkg install --yes ruby devel/ruby-gems puppet gnupg

/usr/local/bin/gem install pupistry
mkdir /usr/local/etc/pupistry
cat > /usr/local/etc/pupistry/settings.yaml << EOF
general:
  app_cache: ~/.pupistry/cache
  s3_bucket: <%= s3_bucket %>
  s3_prefix: <%= s3_prefix %>
  gpg_disable: <%= gpg_disable %>
  gpg_signing_key: <%= gpg_signing_key %>
agent:
  puppetcode: <%= puppetcode %>
  access_key_id: <%= access_key_id %>
  secret_access_key: <%= secret_access_key %>
  region: <%= region %>
  proxy_uri: <%= proxy_uri %>
EOF
pupistry apply --verbose


#!/bin/tcsh -x
# This bootstrap is for FreeBSD 10.x which has most of the same principals of
# Linux, but we have had to make some variations to account for tcsh weirdness
# vs the general behavior we expect from bash on Linux distributions

# Known Issues:
# * tcsh makes capturing all the output to syslog difficult
# * We can't rely on Bash, since it's not available in FreeBSD by default.
# * Digital Ocean has no support for FreeBSD user data yet
# * AWS FreeBSD images take a long time to launch - 10mins+
# * Override some config to use /usr/local for everything
#

env ASSUME_ALWAYS_YES=YES pkg bootstrap
env ASSUME_ALWAYS_YES=YES pkg upgrade --yes
env ASSUME_ALWAYS_YES=YES pkg install --yes ruby devel/ruby-gems puppet gnupg

/usr/local/bin/gem install pupistry
mkdir /usr/local/etc/pupistry
cat > /usr/local/etc/pupistry/settings.yaml << EOF
general:
  app_cache: ~/.pupistry/cache
  s3_bucket: <%= s3_bucket %>
  s3_prefix: <%= s3_prefix %>
  gpg_disable: <%= gpg_disable %>
  gpg_signing_key: <%= gpg_signing_key %>
agent:
  puppetcode: /usr/local/etc/puppetlabs/code/environments
  access_key_id: <%= access_key_id %>
  secret_access_key: <%= secret_access_key %>
  region: <%= region %>
  proxy_uri: <%= proxy_uri %>
EOF
pupistry apply --verbose


Fix code path for FreeBSD
Fix code path for FreeBSD
