-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision.ec2.sh
executable file
·44 lines (37 loc) · 1.51 KB
/
provision.ec2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
echo "Installing tools"
PROJECT_NAME=flagsilk
USERNAME=igolden
REPO=
# setup yarn and nodejs for webpacker
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# update ubuntu
sudo apt-get update && sudo apt-get upgrade -y
# install system dependencies
sudo apt-get install git-core curl zlib1g-dev build-essential \
libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev \
libxslt1-dev libcurl4-openssl-dev \
software-properties-common libffi-dev \
nodejs yarn vim wget -y
# install ruby dependencies
gem install bundler
gem install rake
echo "---------------------------------------------------------------"
echo "| YOU STILL NEED TO CREATE A DB"
echo "| sudo -u postgres createdb -O project project_production"
echo "| "
echo "| SET PASSWORD TO DB USER"
echo "| sudo postgres psql"
echo "| $> \password USER"
echo "| "
echo "| YOU STILL NEED TO MAKE DEPLOY SUDO"
echo "| sudo visudo and add 'deploy ALL=(ALL:ALL) ALL'"
echo "| "
echo "| YOU STILL NEED TO GENERATE SSH FOR DEPLOY, ADD TO GITHUB"
echo "| ssh-keygen && cat .ssh/id_rsa.pub"
echo "| "
echo "| LASTLY, ADD YOUR PERSONAL KEY TO INSTANCE"
echo "| sudo vim .ssh/authorized_keys"
echo "---------------------------------------------------------------"