Typesafe Activator 1.3.2

by josh-d
8 deployments · 8 still active · last rev. 1 year ago

Compatible with: Ubuntu 14.04 LTS
						#!/bin/bash
#
# <UDF name="maintenance_user" Label="Name of maintenance user." />
# <UDF name="maintenance_password" Label="Password for maintenance user." />
# <UDF name="maintenance_pubkey" Label="Public Key for maintenance user" />
# <UDF name="new_hostname" Label="Server's hostname." />

exec &> /root/stackscript.log

source <ssinclude StackScriptID=1>

system_update

user_add_sudo $MAINTENANCE_USER $MAINTENANCE_PASSWORD
user_add_pubkey $MAINTENANCE_USER $MAINTENANCE_PUBKEY

dpkg-reconfigure locales
update-locale LANG=en_US.UTF-8

ssh_disable_root
sed -i 's/LoginGraceTime 120/LoginGraceTime 10/' /etc/ssh/sshd_config
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config

system_set_hostname $NEW_HOSTNAME
system_add_host_entry 127.0.0.1 $NEW_HOSTNAME 

ufw logging on
ufw default deny
ufw allow 22/tcp
ufw allow 9000/tcp
ufw enable    

apt-get install -y python-software-properties
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt-get install -y oracle-java8-installer

add-apt-repository -y ppa:git-core/ppa
apt-get update
apt-get -y install git

cd /tmp
wget http://downloads.typesafe.com/typesafe-activator/1.3.2/typesafe-activator-1.3.2.zip
unzip /tmp/typesafe-activator-1.3.2.zip -d /opt
rm /tmp/typesafe-activator-1.3.2.zip
echo "PATH=$PATH:/opt/activator-1.3.2" >> /etc/environment
chmod a+x /opt/activator-1.3.2/activator

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
apt-get update
apt-get install -y mongodb-org-tools mongodb-org-shell

apt-get install -y htop glances

restartServices