-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathinstall.sh
56 lines (44 loc) · 1.86 KB
/
install.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
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Terra Install Script for UBUNTU
# WORK IN PROGRESS!
# This script is based on the Install Instructions for terra.
# See https://github.com/terra-ops/terra-cli/blob/master/docs/install.md
# Update Apt, Install PHP and Git
apt-get update
apt-get install php5-cli git -y
# Install Composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install Docker and Docker Compose
wget -qO- https://get.docker.com/ | sh
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# Install drush
git clone https://github.com/drush-ops/drush.git /usr/share/drush --branch=7.x
cd /usr/share/drush
composer install
ln -s /usr/share/drush/drush /usr/local/bin/drush
# Install Terra Manually
git clone https://github.com/terra-ops/terra-cli.git /usr/share/terra
cd /usr/share/terra
composer install
ln -s /usr/share/terra/bin/terra /usr/local/bin/terra
# Don't confirm host key checking for ssh to localhost.
echo "Host localhost
StrictHostKeyChecking no" > ~/.ssh/config
chmod 600 ~/.ssh/config
# Notify User
echo "==========================================================="
echo " Terra has been installed! "
echo " You should add the user you will use terra with to the docker group."
echo " Run the following command:"
echo " $ usermod -aG docker your_user "
echo " "
echo " Thanks! If you have any issues, please submit to https://github.com/terra-ops/terra-cli/issues"
echo ""
echo " Now run 'terra' to ensure that it installed correctly."
echo ""
echo " To connect to your environments with drush, you will need to generate an SSH key."
echo " Run the following command as your_user:"
echo " $ ssh-keygen -t rsa -N \"\" -f ~/.ssh/id_rsa"
echo "==========================================================="
echo " "