Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Launching containers with fleet

1,185 views

Published on

Launching containers with fleet

Docker Seoul Meetup 3rd / Lightning talk

Published in: Software
  • Be the first to comment

Launching containers with fleet

  1. 1. Launching Containers with fleet Docker Seoul Meetup #3 / Feb 14, 2014 by @subicura (김충섭)
  2. 2. deployment
  3. 3. container
  4. 4. image를 배포하고 container를 stop/start만 하면 되는데..
  5. 5. fleet
  6. 6. a distributed init system
  7. 7. fleet = systemd + etcd
  8. 8. fleet = systemd + etcd System and Service Manager CoreOS default init system Fedora, Gentoo, Arch 사용중 / RedHat, Debian, Ubuntu 곧
  9. 9. fleet = systemd + etcd
  10. 10. [Unit] Description=My Service Requires=docker.service After=docker.service [Service] ExecStart=/usr/bin/docker run --rm --name my_service busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done" ExecStop=/usr/bin/docker kill my_service systemd service file sample
  11. 11. systemd command 시작 - systemctl start [service] 종료 - systemctl stop [service] 강제종료 - systemctl kill [service] 상태보기 - systemctl status [service] 로그보기 - journalctl -u [service]
  12. 12. [Unit] Description=My Service Requires=docker.service After=docker.service [Service] ExecStart=/usr/bin/docker run --rm --name my_service busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done" ExecStop=/usr/bin/docker kill my_service [X-Fleet] MachineMetadata=type=app Conflicts=%p@*.service fleet unit file sample
  13. 13. fleet-specific properties MachineID - 해당하는 machine에서 실행 MachineOf - 특정 서비스가 수행중인 machine에서 실행 MachineMetadata - metadata를 가진 machine에서 실행 Conflicts - 해당 서비스가 수행중인 machine을 피해서 실행 Global - 전체 machines에서 실행
  14. 14. fleetctl command 서버리스트 - fleetctl list-machines 유닛리스트 - fleetctl list-units 등록 - fleetctl submit [service] 시작 - fleetctl start [service] 종료 - fleetctl stop [service] 제거 - fleetctl destroy [service] 상태보기 - fleetctl status [service] 로그보기 - fleetctl journal [service]
  15. 15. fleet list-machines
  16. 16. fleet list-units
  17. 17. fleet start nginx-confd.service
  18. 18. DEMO
  19. 19. summary easy (with coreos) - systemd + etcd + fleetd Deploy docker containers on arbitrary hosts in a cluster re-scheduling on machine failure Automatically SSH into the machine running a job difficult server balance - no check cpu/memory/hdd/network Lack of option Lack of GUI Tool

×