Tags:
view all tags
-- Main.HamidMoghaddam - 18 May 2016 The new version of CloudSuite is developed on Docker files so it needs different installation than last one. The new version needs Ubuntu 14.04 so I cloned one of VM and upgraded it to 14.04. ---++ 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%Got error%ENDCOLOR%%BLACK% "Cannot connect to the Docker daemon. Is the docker daemon running on this host?"%ENDCOLOR% %BLACK%so 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(in this [[https://cloudsuite.ch/swarm/][link]] they wrote step 6 completly wrong and take one day to figure out what happens.)%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> (again in the swarm installation guide by CloudSuite, they made this line mistake and consumed a lot of time to solve it) 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> (again CloudSuite team writed this line wrongly. Now I am not surprised why CloudSuite is such a confusing software) 1 repeat step 2,3,4,6,7,9 on every VMs but just in step 9 replace --advertise IP address with each VM IP address. 1 <font color="crimson" class="WYSIWYG_COLOR">docker -H tcp://10.0.100.62:22222 network create --driver overlay swarm-network</font> ---++ Frontend I did following steps on frontend machine(Please check swarm-agent is running: docker start 'swarm-agent') 1. docker pull cloudsuite/web-serving:web_server 2. <font color="crimson">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-frontend-x64 --net=</font>swarm-network<font color="crimson"> --name=web_server cloudsuite/web-serving:web_server /etc/bootstrap.sh</font> I got subnet conflict in this stage (Thanks again to CloudSuit team) After one they searching I found out creating overlay network (step 11 of swarm manager creation) should be change to 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 swarm-network ---++ Backend 1 docker pull cloudsuite/web-serving:db_server 1 <font color="crimson">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-backend-x64 --net=</font><span style="color: #dc143c">swarm-network</span> <font color="crimson" class="WYSIWYG_COLOR">--name=mysql_server cloudsuite/web-serving:db_server</font> ---++ Memcache 1 docker pull cloudsuite/web-serving:memcached_server 1 <font color="crimson">docker -H tcp://10.0.100.62:22222 run -dt -e constraint:node==cs-v3-web-memcached-x64 --net=</font><span style="color: #dc143c">swarm-network</span> <font color="crimson" class="WYSIWYG_COLOR">--name=memcache_server cloudsuite/web-serving:memcached_server</font> ---++ Client 1 <span style="background-color: transparent">docker pull cloudsuite/web-serving:faban_client</span> 1 <span style="background-color: transparent">docker inspect --format '' web_server </span> 1 <font color="crimson" class="WYSIWYG_COLOR">docker run --net=my_net --name=faban_client cloudsuite/web-serving:faban_client [put IP address of step 2 in here]</font> ---++ Running benchmark Step 3 in client section runs benchmark but I can not change running time of benchmarking so I would like have faban client web page so I do following steps: 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-memcached-x64 --net=</font><span style="color: #dc143c">swarm-network </span><font color="crimson" class="WYSIWYG_COLOR">--name=faban_client cloudsuite/web-serving:faban_client</font></span> 1 <span style="background-color: transparent">after login to client docker I run faban faban/master/bin/startup.sh</span> 1 1 java -jar Usergen.jar https://web_server:8080 1 now I can see faban client web page however increasing steady time in it make "java.lang.Exception: Driver failed to complete benchmark run" error some people said it happened because of Openjdk 7 so I should switch to Oracle Java in client docker 1 <font color="crimson" class="WYSIWYG_COLOR">add-apt-repository ppa:webupd8team/java</font> made "add-apt-repository: command not found" error so I used <font color="crimson" class="WYSIWYG_COLOR">apt-get install software-properties-common python-software-properties</font> 1 <font color="#dc143c" class="WYSIWYG_COLOR">sudo apt-get update</font> 1 <font color="#dc143c" class="WYSIWYG_COLOR">apt-get install oracle-java8-installer</font> 1 %BLACK%used /usr/lib/jvm/java-8-oracle in java home field of faban client web page%ENDCOLOR% 1 %BLACK%The error still remains.(I will work on it tommorrow)%ENDCOLOR%
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r12
<
r11
<
r10
<
r9
<
r8
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r10 - 2016-05-31
-
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
Edit
Attach
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