From 63f4eb729611fd063e729f66c97e6169b75642d9 Mon Sep 17 00:00:00 2001
From: raphaesl <raphaesl@stud.ntnu.no>
Date: Tue, 11 Apr 2023 21:02:26 +0200
Subject: [PATCH] Add i oblig3

---
 oblig3/oblig3.md | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/oblig3/oblig3.md b/oblig3/oblig3.md
index 13ae760..cbd232f 100644
--- a/oblig3/oblig3.md
+++ b/oblig3/oblig3.md
@@ -365,4 +365,31 @@ Now we can copy the output and paste it into the excel document used in task 1.
 <img src=./bilder/week12_task3.1.PNG>
 <img src=./bilder/week12_task3.2.PNG>
 
-By looking at the images above, we can see that mean download time for our bookface is 9,5 seconds. The range is between 35,7 and 2,8 seconds. In 90 percent of the cases, our downloading time is 13 seconds or below, which can be seen in the 5% table in the middle of the picture. In 10% of the cases, our download time is greater than 13 seconds, in the range from 13 to 35 seconds.
\ No newline at end of file
+By looking at the images above, we can see that mean download time for our bookface is 9,5 seconds. The range is between 35,7 and 2,8 seconds. In 90 percent of the cases, our downloading time is 13 seconds or below, which can be seen in the 5% table in the middle of the picture. In 10% of the cases, our download time is greater than 13 seconds, in the range from 13 to 35 seconds.
+
+
+
+### Consul Setup
+
+IP: 192.168.134.127
+DATACENTRE: AETA
+
+```
+docker run -d -v /opt/consul:/consul/data --name=consul --net=host -e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true}' -e 'CONSUL_BIND_INTERFACE=ens3'  192.168.128.23:5000/consul:latest agent -server -bind=192.168.134.127 --datacenter=AETA -client=0.0.0.0 -ui -bootstrap
+
+docker run 192.168.128.23:5000/consul:latest join -http-addr=192.168.134.127:8500 -wan 192.168.128.23 192.168.134.127
+
+curl -X PUT -d '{"ID": "SERVER.AETA", "Name": "bookface", "Address": "192.168.132.39", "Port": 80 }' http://127.0.0.1:8500/v1/agent/service/register
+
+# Server 2
+docker run -d -v /opt/consul:/consul/data --name=consul --net=host -e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true}' 192.168.128.23:5000/consul:latest agent -server -join=192.168.134.127 --datacenter=AETA -client=0.0.0.0 -bind=192.168.134.194
+curl -X PUT -d '{"ID": "SERVER2.AETA", "Name": "bookface", "Address": "192.168.132.39", "Port": 80 }' http://localhost:8500/v1/agent/service/register
+
+
+
+# Server 3
+docker run -d -v /opt/consul:/consul/data --name=consul --net=host -e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true}' 192.168.128.23:5000/consul:latest agent -server -join=192.168.134.127 --datacenter=AETA -client=0.0.0.0 -bind=192.168.130.56
+curl -X PUT -d '{"ID": "SERVER3.AETA", "Name": "bookface", "Address": "192.168.132.39", "Port": 80 }' http://localhost:8500/v1/agent/service/register
+
+
+```
\ No newline at end of file
-- 
GitLab