Skip to content

Instantly share code, notes, and snippets.

@eduwass
Last active January 3, 2020 18:27
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save eduwass/c8c15b73329a0e9699c4 to your computer and use it in GitHub Desktop.
Save eduwass/c8c15b73329a0e9699c4 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