-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbootstrap-deployer
More file actions
executable file
·32 lines (25 loc) · 1.1 KB
/
bootstrap-deployer
File metadata and controls
executable file
·32 lines (25 loc) · 1.1 KB
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
#!/usr/bin/env bash
# check for service name and git repo supplied on CLI
if [ "$#" -ne 2 ]; then
echo -e "Not enough args given. Please use the form:\n./bootstrap-deployer <service name> <git repo clone link>"
echo -e "Example:\n./bootstrap-deployer CullenTaylor https://github.com/USER/REPO"
exit
fi
# install prerequisite packages
apt-get -y install python-pip python-dev libxml2-dev libxslt-dev libffi-dev git zlib1g-dev libssl-dev
pip install virtualenvwrapper
echo -e "export WORKON_HOME=$HOME/.virtualenvs\nexport PROJECT_HOME=/root/development\nsource /usr/local/bin/virtualenvwrapper.sh" >> /root/.bashrc
# create virtual environment
source ~/.bashrc
if [ ! -d "/root/deployment" ]; then
mkdir /root/deployment
fi
cd /root/deployment
mkdir $1; cd $1;
mkvirtualenv $1; workon $1
# clone git repo and install pip requirements
git clone $2
pip install -r ursula/requirements.txt
echo -e "NEXT STEPS:\n===================="
echo -e "- Create self-signed certificates for your environment\n"
echo -e "- Copy the contents of cert.cert and cert.key into ursula/envs/example/standard/group_vars/all.yml\n"