-
Notifications
You must be signed in to change notification settings - Fork 1
/
vmSetup.sh
46 lines (34 loc) · 1.11 KB
/
vmSetup.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
#!/usr/bin/env bash
# Script for setting up the VM
echo "Installing Node"
sudo apt-get install nodejs
sudo apt-get install npm
echo "Copying Over Assets"
sudo cp /vagrant/bookService/ .
sudo cp /vagrant/bookBFF/ .
sudo cp /vagrant/customerService/ .
sudo cp /vagrant/customerBFF/ .
sudo cp -a /vagrant/tests/. /home/vagrant # TEST FILES
echo "Installing Dependencies"
sudo npm install
echo "Testing the Application"
sudo npm install -g artillery@latest
sudo npm install -g artillery-plugin-expect
# sudo artillery run test_bookBFF.yml
# echo "Building the Docker Images"
# cd /bookService
# sudo docker build --tag book_service:1.0 .
# cd ../
# cd /bookBFF
# sudo docker build --tag book_bff:1.0 .
# cd ../
# cd /customerService
# sudo docker build --tag customer_service:1.0 .
# cd ../
# cd /customerBFF
# sudo docker build --tag customer_bff:1.0 .
# echo "Running the docker containers"
# sudo docker container run -d -p 3001:3000 customer_service:1.0
# sudo docker container run -d -p 3002:3000 book_service:1.0
# sudo docker container run -d -p 81:80 customer_bff:1.0
# sudo docker container run -d -p 82:80 book_bff:1.0