Skip to content

Instantly share code, notes, and snippets.

@YoooFeng
Forked from owainlewis/Operations.md
Created February 27, 2018 03:06
Show Gist options
  • Save YoooFeng/2384a525246a1f1885b743d4a956b86f to your computer and use it in GitHub Desktop.
Save YoooFeng/2384a525246a1f1885b743d4a956b86f to your computer and use it in GitHub Desktop.
Install Spinnaker on Ubuntu 16.04
#!/bin/bash -xe
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
PACKER_VERSION=0.12.2
function install_packer() {
mkdir -p /tmp/packer
pushd /tmp/packer
curl -s -L -O https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip
unzip -u -o -q packer_${PACKER_VERSION}_linux_amd64.zip -d /usr/bin
popd
rm -rf /tmp/packer
}
function install_redis () {
apt-get install -y redis-server
}
apt-get update
# Python 2 doesn't exist on Ubuntu 16 but is needed by Spinnaker
apt-get install -y python-simplejson
# Install Redis
# ==================================================
install_redis
# Install Spinnaker
# ==================================================
echo "deb https://dl.bintray.com/spinnaker/debians trusty spinnaker" > \
/etc/apt/sources.list.d/spinnaker.list
curl -s -f "https://bintray.com/user/downloadSubjectPublicKey?username=spinnaker" | apt-key add -
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update
apt-get install -y \
openjdk-8-jdk \
spinnaker-clouddriver \
spinnaker-deck \
spinnaker-echo \
spinnaker-front50 \
spinnaker-gate \
spinnaker-igor \
spinnaker-orca \
spinnaker-rosco \
spinnaker \
unzip
# Spinnaker init scripts
# ==================================================
for service in front50 fiat clouddriver echo gate igor orca rosco
do
tee /lib/systemd/system/${service}.service <<EOF >/dev/null
[Unit]
Description=${service}
[Service]
Type=simple
User=spinnaker
Group=spinnaker
ExecStart=/opt/${service}/bin/${service}
[Install]
WantedBy=multi-user.target
EOF
done
# Install Packer
# ==================================================
install_packer
# Start and enable services
# ==================================================
for i in front50 fiat clouddriver echo gate igor orca rosco
do
systemctl enable $i
systemctl start $i
done

Operations

Upgrade Spinnaker to latest

sudo apt-get upgrade -y spinnaker

Check version of Spinnaker installed

dpkg -s spinnaker | grep Version

Connect to server via SSH tunnel

ssh -i ~/Keys/spinnaker -L 9000:localhost:9000 -L 8084:localhost:8084 -L 8080:localhost:8080 ubuntu@host

Configuring Spinnaker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment