-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
57 lines (47 loc) · 1.79 KB
/
setup.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
56
57
#!/bin/bash
## Configure OS ##############################################################
echo
echo "Disabling swap..."
sudo swapoff -a
echo
echo "Increasing vm.max_map_count..."
sudo sysctl -w vm.max_map_count=262144
## Remove legacy nodejs #######################################################
# sudo apt-get purge --auto-remove nodejs
## Install Pre-Requisites #####################################################
# Update Packages
sudo apt-get update -y -q
# Install Java
sudo apt-get install default-jdk -y -q
# Install Python
sudo apt install -y make python build-essential
sudo apt install python3-pip -y -q
pip3 install --upgrade pip
pip3 install elasticsearch
# Set 3.5 as default
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
# Install Docker
sudo apt-get install docker.io -y -q
# Install NPM
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs -y -q
sudo apt-get install npm -y -q
# Clone spring petclinic
## git data
echo
echo "Download data ..."
cd /home/ubuntu
git clone https://github.com/EvelienSchellekens/spring-petclinic.git
# Make files writeable
chmod 777 /home/ubuntu/spring-petclinic/bin/setAPMenv.sh
# Add variables to profile
echo 'source /home/ubuntu/spring-petclinic/bin/setAPMenv.sh' >> ~/.bashrc
# Install dependencies
cd /home/ubuntu/spring-petclinic/address_resolver/src && sudo pip3 install --no-cache-dir -r requirements.txt
cd /home/ubuntu/spring-petclinic/frontend/server && npm install
cd /home/ubuntu/spring-petclinic/frontend/client && npm install
# Build load gen image
cd /home/ubuntu/spring-petclinic/loadgen/client && sudo docker build --tag "loadgen" .
cd /home/ubuntu/spring-petclinic/loadgen/client && sudo docker build --tag "loadgenserver" .
# Pull online IDE
sudo docker pull elswork/theia:1.0.1