Skip to content

Commit

Permalink
feat(install): Install packer when rosco is installed. (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtk54 committed Mar 2, 2017
1 parent 3eabe92 commit 4727375
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rosco-web/pkg_scripts/postInstall.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# ubuntu
# check that owner group exists
Expand All @@ -11,4 +11,18 @@ if [ -z `getent passwd spinnaker` ]; then
useradd --gid spinnaker spinnaker -m --home-dir /home/spinnaker
fi

# install packer
PACKER_VERSION="0.12.1"
packer_version=$(packer --version)
packer_status=$?
if [ $packer_status -ne 0 ] || [ "$packer_version" -ne "$PACKER_VERSION" ]; then
pushd .
cd /usr/bin
wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip
apt-get install unzip -y
unzip -o "packer_${PACKER_VERSION}_linux_amd64.zip"
rm "packer_${PACKER_VERSION}_linux_amd64.zip"
popd
fi

install --mode=755 --owner=spinnaker --group=spinnaker --directory /var/log/spinnaker/rosco

0 comments on commit 4727375

Please sign in to comment.