You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

0 Días
7 Hrs
36 Min
21 Seg
Curso de Swarm

Curso de Swarm

Guido Vilariño

Guido Vilariño

Administración remota de swarm productivo

22/24
Resources

Management tools in Docker Swarm must persist to disk (their internal state, management) and the best way to store things in Docker are volumes.

In this class we will learn an easy simple and intuitive way to manage our docker swarm remotely. It is not the only one that exists, so we invite you to try and leave us in the comments other ways you find.

Contributions 12

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

https://www.portainer.io/
https://github.com/dockersamples/example-voting-app

– Crear un volumen

docker volume create portainer_data
docker volume ls

– Crear el servicio, para tener acceso a los managers

docker service create --name portainer -p 9000:9000 --constraint node.role==manager --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --mount type=volume,src=portainer_data,dst=/data portainer/portainer -H unix:///var/run/docker.sock

– admin 12345678

docker stack rm app
##########docker-stack.yml#############
version: "3"
services:

  redis:
    image: redis:alpine
    networks:
      - frontend
    deploy:
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: on-failure
  db:
    image: postgres:9.4
    environment:
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "postgres"
    volumes:
      - db-data:/var/lib/postgresql/data
    networks:
      - backend
    deploy:
      placement:
        constraints: [node.role == manager]
  vote:
    image: dockersamples/examplevotingapp_vote:before
    ports:
      - 5000:80
    networks:
      - frontend
    depends_on:
      - redis
    deploy:
      replicas: 2
      update_config:
        parallelism: 2
      restart_policy:
        condition: on-failure
  result:
    image: dockersamples/examplevotingapp_result:before
    ports:
      - 5001:80
    networks:
      - backend
    depends_on:
      - db
    deploy:
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: on-failure

  worker:
    image: dockersamples/examplevotingapp_worker
    networks:
      - frontend
      - backend
    depends_on:
      - db
      - redis
    deploy:
      mode: replicated
      replicas: 1
      labels: [APP=VOTING]
      restart_policy:
        condition: on-failure
        delay: 10s
        max_attempts: 3
        window: 120s
      placement:
        constraints: [node.role == manager]

  visualizer:
    image: dockersamples/visualizer:stable
    ports:
      - "8080:8080"
    stop_grace_period: 1m30s
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
    deploy:
      placement:
        constraints: [node.role == manager]

networks:
  frontend:
  backend:

volumes:
  db-data:
#######################################

Muy buena herramienta

docker volume create portainer_data
docker volume ls
docker service create --name portainer -p 9000:9000 --constraint node.role==manager --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --mount type=volume,src=portainer_data,dst=/data portainer/portainer -H unix:///var/run/docker.sock
docker stack ls
docker stack ps voting
docker service ps voting_worker
http://192.168.5.150:5000/
http://192.168.5.150:5001/

Portainer
Voting

El curso está genial de verdad!

For the greater good, here we go!

docker service create --name portainer -p 9000:9000 --constraint node.role==manager
–mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock
–mount type=volume,src=portainer_data,dst=/data portainer/portainer
-H unix:///var/run/docker.sock

  • Las herramientas de administración en Docker Swarm deben persistir en disco (su estado interno, la administración) y la mejor manera de almacenar cosas en Docker son los volúmenes.
  • Plugins para storage compartido REX-ray, Glusterfs, docker swarn volume

Esto es demasiado poderoso. #DockerFan.

Qué buena clase. 😄

docker service create --name portainer -p 9000:9000 --constraint node.role==manager --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --mount type=volume,src=portainer_data,dst=/data portainer/portainer -H unix:///var/run/docker.sock

Comando para levantar un servicio de Portainer

Porteriner agent caundo se conecta a un administrador se bloquea por seguridad y ko se conecta a un segundo administrador. Tengo que cambiar el administrador, por que voy a cambiar el server. ¿Como livero el agente? Yq probé de todo y no lo logro

Muy buena clase!!!