Docker Study: 두 판 사이의 차이
imported>Janghe11 |
imported>Janghe11 |
||
| 14번째 줄: | 14번째 줄: | ||
https://support.google.com/chromebook/answer/1086915 | https://support.google.com/chromebook/answer/1086915 | ||
https://insights.ubuntu.com/2016/06/14/universal-snap-packages-launch-on-multiple-linux-distros/ | |||
http://snapcraft.io/ | http://snapcraft.io/ | ||
2016년 8월 31일 (수) 11:43 판
2016년 8월 31일
Android App on ChromeBook 관련 기사 http://www.androidauthority.com/run-android-apps-chromebook-703248/
Google I/O Chromebook 관련 영상 https://youtu.be/yDy1WWUdlY8?t=4m40s 이 영상에서 Android App들을 돌리는 시연 영상이 공개됨
Tech Bits - Running Android apps in Docker using Googles ARC Welder http://thshaw.blogspot.kr/2015/07/running-android-apps-in-docker-using.html
https://chrome.googleblog.com/2016/05/the-google-play-store-coming-to.html
https://support.google.com/chromebook/answer/1086915
https://insights.ubuntu.com/2016/06/14/universal-snap-packages-launch-on-multiple-linux-distros/
2016년 8월 24일
- 유용 링크: https://github.com/wscherphof/oracle-12c#build < 설명: Oracledb 를 Oracle Linux 7 Docker image에서 설치하고 돌릴 수 있게 Dockerfile들을 제공한다. 자세한 것은 직접 방문해서 보면 된다. 친절하게 다 안내가 되어있다. 개발자가 사용한 Oracledb는 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 에서 실험이 진행되었다.
- vagrant 와 비슷 = http://www.libvirt.org/ 가상머신 관리 application. vagrant는 virtualbox를 지원.
- coreos https://discorery.etcd.io/<token> 이 token을 내가 원하는대로 생성이 가능? 아니면 자릿수만 맞춰서 난수로 clustering 서버에 제공?
- Core OS - Clustering Guide : https://coreos.com/etcd/docs/latest/clustering.html#discovery
- 따로 설정을 하지 않아도 어플리케이션이 실행되는 coresos 1이 죽으면 다른 cores 2, 3 등에서 실행이 된다. **
- 개발, 테스트, 운영을 통합 -> 실제로 굉장히 도입해 볼만함. 똑같은 환경. 특정 컨테이너의 특정한 커밋을 올려보고 테스트. 기본 모듈 개발 시 컨테이너에 장점. 특히 웹 개발.
- http://clusterlabs.org/wiki/Pacemaker
- clustering이 아직 생각보다 안정적이진 않다. cluster를 이용하기 때문에 생기는 또 다른 문제가 생길 것. etc는 누가 관리 할것이며...
- 구조 파악 : 네트웍, 스토리지, 시큐리티, (자원관리 -> cgroup을 어떻게 docker가 활용하는가?)
- 네트웍(장태희) : 1. packet이 host에서 container까지 들어가는 path 확인 2. docker 의 network mode가 있는데 mode 별로 path가 어떻게 잡히는지 3. network 구성이 바꿀 수 있는 방법이 무엇이 있는지. https://docs.docker.com/v1.10/engine/userguide/networking/ https://docs.docker.com/engine/userguide/networking/
- 스토리지(이희찬) : 1. docker 가 어떻게 host의 storage를 mount 해서 쓰는지 2. docker와 gfs의 다른 대안이 있는지 https://docs.docker.com/engine/userguide/storagedriver/selectadriver/ https://docs.docker.com/engine/userguide/storagedriver/aufs-driver/
- 시큐리티(한영빈) : 1. POSIX Capability를 이용한 Security control (어떤 process의 permission으로 network를 컨트롤 한다 안한다 등) previleged vs unprevileged
- 참고 : http://www.slideshare.net/janghoonsim/docker-container-and-lightweight-virtualization
2016년 8월 17일
- container가 돌아가고 있는 상태에서 업데이트가 가능? -> container기반 서비스에서 지향하는 것 == 기존의 것을 upgrade 하는 것보다 부시고 새로 만드는 것!
- Load balancer 가 이미지 스위칭을 담당
- MS Azure
- http://trace32.com/wiki/index.php/Remote_API
- http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter14/01 -> sudo apt-get install python-docker 로 한방에 설치 가능
- Remote API 부분은 공식 문서를 참조하는 것이 조금 더 도움이 되는 것 같다.
- Docker Remote API : https://docs.docker.com/engine/reference/api/docker_remote_api/
- Docker Remote API v1.24 : https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/
- Remote API의 핵심은 Remote API!
- 다음주는 15번 부터
- dockerd 옵션
- dockerd remote API 지원 service 로 실행하기
1) /lib/systemd/system/docker.service 파일 수정
[Service] section 에 EnvironmentFile=-/etc/default/docker <- 추가 ExecStart=/usr/bin/dockerd $DOCKER_OPTS -H fd:// <- 수정
2) /etc/default/docker 파일 수정
DOCKER_OPTS="-H tcp://0.0.0.0:4243" 추가
3) 서비스 재시작
- systemctl daemon-reload - service docker stop/start
- 도커 구조 파악
- container live migration 내용이 없다. https://en.wikipedia.org/wiki/Live_migration
- https://criu.org/Docker
2016년 8월 10일
- 출석 : 한영빈, 장태희 / 결석 : 심장훈(스케줄), 이희찬(병결)
- Git hook -> https://git-scm.com/book/ko/v2/Git%EB%A7%9E%EC%B6%A4-Git-Hooks
- git에서 특정 이벤트가 발생하면 실행되는 스크립트가 hook인데, 이벤트 중에 push가 해당
- post-receive는 서버측 스크립트
- heroku(https://www.heroku.com/) / dokku(http://dokku.viewdocs.io/dokku/)와 비슷하게 세팅하여 작동되는것 같다.(http://blog.nacyot.com/articles/2014-01-30-deploying-application-with-dokku/)
- 모니터링 서버를 localhost에 세팅 해도 되는가? -> 루프백 관련 문제 발생할듯.(http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter09/01)
- 모니터링과 어플리케이션 서버를 하나의 서버에 설치해도 되는가? -> Diamond 와 Graphite의 노출 포트가 겹치지 않도록 설정하면 가능함.
- rrdtool 을 이용하여 서버 모니터링을 한다고도 함.
- Graphite 사용 화면(그래프를 제대로 보려면, 최소 14시간 기다려야 제대로 된 간지나는(?) 그래프를 볼 수 있음)
- <모니터링 서버 주소>/grafana 로 접속하면, grafana 로 데이터를 볼 수 있음.
2016년 8월 3일
출석 : 한영빈, 이희찬, 심장훈, 장태희
- 6주차 : Docker + LXD 설명
- Chapter 05
- http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter05
- inspect 명령으로 세부 정보 확인하기 -> inspect file은 어디에 저장되는가?
- Dockerfile 내용 과는 전혀 다름
- JSON 방식으로 -f -format의 옵션은 JSON 항목을 그대로 입력하면 됨
- https://www.mankier.com/1/docker-inspect
- text 기반 setting 변경 보다 database화된 설정 저장으로 추측...
- 도커 명령어 정리 : http://blog.iolo.kr/510
- http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter06/03
- 다른 서버의 Docker 컨테이너에 연결하기
- 앰배서더 컨테이너 -> 중간에 끼므로 인하여 생기는 문제(레이턴시 등)가 발생할 수도 있음.
- 각 서버의 컨테이너끼리 통신하는 방법도 생각 해 볼만 함.
- http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter06/04
- Docker 데이터 볼륨 사용하기
- 호스트에 있는 파일을 수정했을 시 각 컨테이너 데이터 볼륨에서 파일의 접근 퍼미션은 어떻게? -> 확인 해 봐야 한다.
- snapshot? commit으로 사용 하면 되지만 개념이 미묘하게 차이가 있는 듯.
- 파일들의 위치 : /var/lib/docker -> containers, volumes
- 완벽한 sandbox 형태를 제공하지는 않는다. 접근이 가능하기 때문에 Host가 파일 변경은 수월하나 보안적으로는 취약함.
- http://pyrasis.com/book/DockerForTheReallyImpatient/Chapter06/07
- Docker 안에서 Docker 실행하기
- sudo docker run -i -t --privileged dind 실행 시 오류가 남
- Docker 버전 차이로 인하여 안되는 듯 함. docker documentation 문서를 참고하여 수정해서 다시 돌려봐야 할 듯 함.
- CMD + ENTRYPOINT
- CMD는 Dockerfile에서 한 번만 정의 가능 / ENTRYPOINT는 Dockerfile에서 한 번만, 명령어에서 옵션을 주면 CMD 옵션을 덮어쓰게 됨.
- 다음 주 8, 9 해오기
2016년 7월 27일
커리큘럼 작성
- 출석 : 장태희 / 이희찬 / 한영빈 / 심장훈
- 5주차 까지 Docker 책을 끝내고 나머지 3주는 각자 서비스 구현하는걸로...
- 책 이름 : 가장 빨리 만나는 Docker(http://pyrasis.com/private/2014/11/30/publish-docker-for-the-really-impatient-book) - (참고 : http://kubernetes.io/docs/hellonode/)
- 유용한 도구 모음
- Windows, OS X: Kitematic(Docker에서 공식적으로 권장함.) --> https://kitematic.com/
- 운영체제 전부 지원:Simple Docker UI.--> https://chrome.google.com/webstore/detail/simple-docker-ui/jfaelnolkgonnjdlkfokjadedkacbnib?hl=ko(2016-7-27일 기준으로 Windows용 Docker Beta 버젼을 쓴다면 조금 설정이 바로 보고 쓰기에 좀 번거롭다. Windows 사용자라면 Kitematic을 쓰는게 훨씬 편하다.)
- 1주차 : 1 ~5장 Docker 살펴보기
- 2주차 : 5 ~7장
- 3주차 : 8 ~9장
- 4주차 : 10 ~ 15장
- 5주차 : 16 ~ 20장
- 6주차 :
- 7주차 :
- 8주차 :
- 장훈님 : container의 성능 자체에 관심 /
- version : 1.10 stable로 맞추기
- http://m.blog.daum.net/sunwookim77/104
- docker 다운 받은 image를 삭제 하고 싶으면 image를 사용한 모든 container를 서비스 중지하고 삭제 하여야 함.
- sudo docker exec -i -t hello-nginx /bin/bash -> -i -t 옵션이 뒤에 가면 먹히지 않는다. 옵션 지정 위치가 중요.