Skip to content

Instantly share code, notes, and snippets.

@silentworks
Forked from eduwass/setup.sh
Created November 14, 2018 11:13
Show Gist options
  • Save silentworks/3d100e224f2da6953aefaacdd008cbb2 to your computer and use it in GitHub Desktop.
Save silentworks/3d100e224f2da6953aefaacdd008cbb2 to your computer and use it in GitHub Desktop.
Flynn Install : Single node ( for Ubuntu 14.04 x64 @ DigitalOcean droplet )
#!/bin/bash
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the xip.io service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
echo '======================================'
echo '1. Install Flynn:'
echo '======================================'
sudo apt-get install git
L=/usr/local/bin/flynn && curl -sSL -A "`uname -sp`" https://dl.flynn.io/cli | zcat >$L && chmod +x $L
sudo bash < <(curl -fsSL https://dl.flynn.io/install-flynn)
/sbin/modprobe zfs
echo '======================================'
echo '2. Init discovery service:'
echo '======================================'
DISCOVERY="$(sudo flynn-host init --init-discovery)"
echo $DISCOVERY
echo '======================================'
echo '3. Start the host:'
echo '======================================'
sudo start flynn-host
echo '======================================'
echo '4. Boostrap the setup'
echo '======================================'
# Auto-magically get the droplet's IP address:
IPADDR="$(curl -fsSL http://ipecho.net/plain)"
# Bootstrap
sudo \
CLUSTER_DOMAIN=${IPADDR}.xip.io \
flynn-host bootstrap \
--discovery ${DISCOVERY}
# /end
echo '---- FINISHED ----'
echo '*(Make a copy the output info - local client setup & dashboard login)*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment