Skip to content

Amazon Web Service Guide

Greg Kostin edited this page Mar 28, 2018 · 40 revisions

AMI ID ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20180306 (ami-4e79ed36)

#!/bin/bash

echo "---------------------------------------------------"
echo "                 Start User Root                   "
echo "---------------------------------------------------"
echo "---------------------------------------------------"
echo "                     Updating                      "
echo "---------------------------------------------------"
apt-get update
echo "---------------------------------------------------"
echo "                     Upgrading                     "
echo "---------------------------------------------------"
DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --option Dpkg::Options::="--force-confdef" --option Dpkg::Options::="--force-confold" upgrade
echo "---------------------------------------------------"
echo "                 Installing Services               "
echo "---------------------------------------------------"
# apt-get install --assume-yes mysql-server
# mysql_secure_installation
echo "---------------------------------------------------"
echo "                 Starting Services                 "
echo "---------------------------------------------------"
# service mysql start
echo "---------------------------------------------------"
echo "             Installing Dev Dependencies           "
echo "---------------------------------------------------"
apt-get install --assume-yes git-core
apt-get install --assume-yes default-jdk
apt-get install --assume-yes ruby-full
echo "---------------------------------------------------"
echo "                Installing Bundler                 "
echo "---------------------------------------------------"
gem install bundler
echo "---------------------------------------------------"
echo "                Switch User Ubuntu                 "
echo "---------------------------------------------------"
su ubuntu
echo "---------------------------------------------------"
echo "                 Clone Heliotrope                  "
echo "---------------------------------------------------"
git clone https://github.com/mlibrary/heliotrope.git
echo "---------------------------------------------------"
echo "                 Setup Heliotrope                  "
echo "---------------------------------------------------"
cd heliotrope
bundle install
./bin/bundle exec ./bin/setup