-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index #2
Comments
질문이 있습니다. |
https://labs.play-with-docker.com/ 를 윈도우에서 사용시 콘솔의 내용을 복사 붙여 넣기 안됩니다 TT |
ctrl + insert 복사 shift+insert 붙여넣기 |
vi 에 붙여 넣기 할때 매 줄이 밀린다면, |
k6설치가 안될때는 docker 버전으로 설치가 가능하다 https://k6.io/docs/get-started/running-k6/#adding-more-vus |
docker run -it -p 8080:8080 delay-server-demo |
|
|
Step 6를 https://labs.play-with-docker.com/ 에서 실행한 결과 이다. node 2에 join은 중간에 해주었다. [node1] (local) [email protected] ~$ docker swarm init --advertise-addr 192.168.0.28
Swarm initialized: current node (j7jw7bjy1mksnn7e181ne4l8s) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-2aij0rzbbqvjfoi77h1tmcjhb7ora6w7vpermgfrszvyul1zyv-811ny7nzfjzk10r6a0xasre7g 192.168.0.28:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
[node1] (local) [email protected] ~
$ docker service create --name my-web-demo --publish published=8080,target=8080 --replicas 2 martinhong/delay-demo:v4
docker service ls
docker service ps my-web-demo
iknm36466psifzqq7yjuro9hl
overall progress: 2 out of 2 tasks
1/2: running [==================================================>]
2/2: running [==================================================>]
verify: Service converged
ID NAME MODE REPLICAS IMAGE PORTS
iknm36466psi my-web-demo replicated 2/2 martinhong/delay-demo:v4 *:8080->8080/tcp
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
oxcr30jrb8n2 my-web-demo.1 martinhong/delay-demo:v4 node1 Running Running 5 seconds ago
t8vy79rswvpy my-web-demo.2 martinhong/delay-demo:v4 node2 Running Running 5 seconds ago
[node1] (local) [email protected] ~
$ curl localhost:8080
<html>
<body>
<p>Container ID: 956e6b981e24320c54e3b5b3be161d9ccc1c0729860090ad03500cce4562536d</p>
<p>Current Time: 2023-10-26 06:56:41</p>
</body>
</html>
[node1] (local) [email protected] ~
$ |
Docker Swarm에서 서비스를 생성할 때 모든 노드에 복제본이 배포되지 않고 매니저(또는 마스터) 노드에만 배포되는 경우가 있습니다. 이는 몇 가지 주요한 이유로 발생할 수 있습니다: Constraints: docker service create --constraint 'node.role == manager' IMAGE_NAME 만약 이러한 제약 조건이 존재한다면, 서비스는 해당 제약 조건을 충족하는 노드에만 배포됩니다. |
https://labs.play-with-docker.com/에 ssh로 접속하기 위해서는 cat ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub ssh key가 있어야 합니다. 생성한다음에 https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent |
원격 머신에서 명령을 실행하는 방법 https://young-cow.tistory.com/35 |
LearnCode BG Web Interface
http://localhost:3000/
The text was updated successfully, but these errors were encountered: