Tags:
create new tag
view all tags
-- Main.HamidMoghaddam - 18 May 2016 Although the installation guide of the CloudSuite's benchmarks are provided by the Cloudsuite developers, sometimes we need to install each part of a benchmark in the different nodes. The following installation steps are used for implementing the web serving benchmark of CloudSuite on the different VMs of our cloud lab. ---++ Creating Swarm Manager In order to connect dockers which are installed on different nods we need installing Swarm. 1 cloned Vm and named it cs-v3-web-swarmmanager-x64 and assigned it 10.0.100.62. 1 installed docker by this [[https://docs.docker.com/engine/installation/linux/ubuntulinux/][link]] guide. 1 <font color="crimson" class="WYSIWYG_COLOR">%BLACK%opened terminal and wrote:%ENDCOLOR% docker pull swarm</font> 1 <font color="crimson" class="WYSIWYG_COLOR">%BLACK%If get this error%ENDCOLOR%%BLACK% "Cannot connect to the Docker daemon. Is the docker daemon running on this host?"%ENDCOLOR% %BLACK%then run %ENDCOLOR%sudo usermod -aG docker mike %BLACK%and%ENDCOLOR% sudo usermod -aG docker root </font>%BLACK%then logout and login%ENDCOLOR% 1 <font color="crimson" class="WYSIWYG_COLOR">docker pull progrium/consul</font> 1 <font color="crimson" class="WYSIWYG_COLOR">%BLACK%add%ENDCOLOR% DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 \ --cluster-store consul://10.0.100.62:8500 \ --cluster-advertise eth0:2375" </font>%BLACK%to /etc/default/docker%ENDCOLOR% 1 <font color="crimson" class="WYSIWYG_COLOR">sudo service docker restart</font> 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d -p 8500:8500 --hostname 10.0.100.62 --name consul-store progrium/consul -server -bootstrap</font> 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d --name swarm-agent swarm join --advertise=10.0.100.62:2375 consul://10.0.100.62:8500</font> 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d -p 22222:2375 --name swarm-manager swarm manage consul://10.0.100.62:8500</font> 1 <font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 network create --driver overlay --subnet=172.28.0.0/16 --ip-range=172.28.5.0/24 my_net</font> ---++ Frontend In the Frontend machine(IP:10.0.100.12) 1. docker run -d --name swarm-agent swarm join --advertise=10.0.100.12:2375 consul://10.0.100.62:8500 ---++ Backend In the Backend machine(IP:10.0.100.2) 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d --name swarm-agent swarm join --advertise=10.0.100.12:2375 consul://10.0.100.62:8500</font> ---++ Memcache In the Memcached machine(IP:10.0.100.42) 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d --name swarm-agent swarm join --advertise=10.0.100.42:2375 consul://10.0.100.62:8500</font> ---++ Client In the Client machine(IP:10.0.100.32) 1 <font color="crimson" class="WYSIWYG_COLOR">docker run -d --name swarm-agent swarm join --advertise=10.0.100.32:2375 consul://10.0.100.62:8500</font> ---++ Swarm Manager Again in the Swarm Maganer Machine: 1 First check all nodes are healthy : <font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 info%BLACK% (Note: all nodes status should be equal to%ENDCOLOR% Health</font>%BLACK%)%ENDCOLOR% 1 <font color="crimson" class="WYSIWYG_COLOR">%BLACK%<font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222</font> %ENDCOLOR% pull cloudsuite/web-serving:db_server</font> 1 <font color="crimson" class="WYSIWYG_COLOR"><font style="background-color: transparent" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 </font><span style="background-color: transparent"> pull cloudsuite/web-serving:memcached_server</span></font> 1 <font color="crimson" class="WYSIWYG_COLOR"><font style="background-color: transparent" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 </font><span style="background-color: transparent"> pull cloudsuite/web-serving:web_server</span></font> 1 <font color="crimson" class="WYSIWYG_COLOR"><font style="background-color: transparent" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 </font><span style="background-color: transparent"> pull cloudsuite/web-serving:faban_client</span><span style="background-color: transparent"> </span></font> 1 <font color="crimson" style="background-color: transparent">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-backend-x64 --net=</font><span style="background-color: transparent; color: #dc143c">my_net</span><span style="background-color: transparent"> </span><font color="crimson" style="background-color: transparent" class="WYSIWYG_COLOR">--name=mysql_server cloudsuite/web-serving:db_server</font> 1 <font color="crimson" style="background-color: transparent">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-memcached-x64 --net=</font><span style="background-color: transparent"><font color="crimson" class="WYSIWYG_COLOR">my_net</font> </span><font color="crimson" style="background-color: transparent" class="WYSIWYG_COLOR">--name=memcache_server cloudsuite/web-serving:memcached_server</font> 1 <font color="crimson" style="background-color: transparent" class="WYSIWYG_COLOR"><font color="crimson" style="font-family: arial, verdana, sans-serif; font-size: 13.65px">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-frontend-x64 --net=</font><font color="crimson" style="font-family: arial, verdana, sans-serif; font-size: 13.65px"><font color="crimson" class="WYSIWYG_COLOR">my_net</font> --name=web_server cloudsuite/web-serving:web_server /etc/bootstrap.sh</font></font> ---++ Running benchmark Now it for running benchmark just use following command in the swarm manager machine: 1 <span style="background-color: transparent">Get IP address of web_server by : </span><font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 inspect --format '' web_server</font> 1 Then run benchmark: <font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 run --net=my_net --name=faban_client cloudsuite/web-serving:faban_client</font> [put IP address of step 1 in here] <font face="arial, verdana, sans-serif">If you want to see faban(Elgg) web consol then used following steps instead of above two:</font> 1 <span style="background-color: transparent"><font color="crimson">docker -H tcp://10.0.100.62:22222 run -it --entrypoint=/bin/bash -e constraint:node==cs-v3-web-client-x64 --net=my_net</font><span style="color: #dc143c"> </span><font color="crimson" class="WYSIWYG_COLOR">--name=faban_client cloudsuite/web-serving:faban_client</font></span> 1 <span style="background-color: transparent">If not loggined automatically then login to faban client by </span><font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 attach faban_client</font> 1 <span style="background-color: transparent">Then run faban: </span><font color="crimson" class="WYSIWYG_COLOR">faban/master/bin/startup.sh</font> 1 Then <font color="crimson" class="WYSIWYG_COLOR">cd /home/web20_benchmark/build</font> 1 <font color="crimson" class="WYSIWYG_COLOR">java -jar Usergen.jar <font color="crimson" class="WYSIWYG_COLOR">https://[put</font> IP address of web_server in here]:8080</font> 1 Now use <font color="crimson" class="WYSIWYG_COLOR">ifconfig </font>to find IP address of faban_client(something like 172.18.0.2) 1 Access to faban web consol by:<font color="crimson" class="WYSIWYG_COLOR"> <font color="crimson" class="WYSIWYG_COLOR">https://[IP</font> address of step 6]:9980</font>
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r12
<
r11
<
r10
<
r9
<
r8
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r12 - 2016-10-07
-
HamidMoghaddam
Home
Site map
Forum web
Main web
NDSG web
ORUA web
OpsRes web
Sandbox web
TWiki web
ORUA Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback