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.

Container microservices

1,110 views

Published on

クリエーションライン様との共催セミナーのスライドです

Published in: Technology
  • Be the first to comment

Container microservices

  1. 1. Wikipedia - Microservices マイクロサービスは、ソフトウェアアーキテクチャのスタイルの一種。 複雑なアプリケーションを小さく組み合わされた、独立したプロセスからなり 言語非依存のAPIを経由してお互いコミュニケーションする形態の アーキテクチャのことである
  2. 2. Browser Load balancer Database http://www.slideshare.net/chris.e.richardson/developing-apps-with-a-microservice-architecture-svforum-microservices-meetup Developing applications with a microservice architecture / Chris Richardson StoreFront UI Product Service Recommendation Service Review Service Order Service
  3. 3. Browser API Gateway http://www.slideshare.net/chris.e.richardson/developing-apps-with-a-microservice-architecture-svforum-microservices-meetup Developing applications with a microservice architecture / Chris Richardson REST Product Service Recommendation Service Review Service Order Service REST REST REST Web application DB DB DB DB
  4. 4. Development Development Development Development
  5. 5. Development Development Development Development
  6. 6. Development Development Development Development OPS
  7. 7. http://www.slideshare.net/jallspaw/10-deploys-per-day-dev-and-ops-cooperation-at-flickr
  8. 8. 10デプロイ/日を可能に
  9. 9. http://www.slideshare.net/hmmickman/rebuilding-an-engineering-culture-dev-opstgt?qid=ce0b1941-ea67-4de5-bc60-6533ce831dd8&v=qf1&b=&from_search=1 (re)building an engineering culture: DevOps@TGT
  10. 10. Docker
  11. 11. http://blogs.technet.com/b/livedevopsinjapan/archive/2015/11/13/devops-enterprise-2015-2.aspx 【DevOps Enterprise 2015 参加レポート】第 2 回 – DockerによるDevOpsソフトウェアサプライチェーンの改善
  12. 12. Docker Machine, CLI for Windows etc… Docker Engine For Windows
  13. 13. https://github.com/Microsoft/DockerToolsDoc
  14. 14. https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/ https://www.docker.com/docker-toolbox $ git clone https://github.com/TsuyoshiUshio/aservice.git $ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem $ openssl pkcs12 -export -out mycert.pfx -in mycert.pem -name "My Certificate” $ openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
  15. 15. $ docker build –t {your DockerHub repository name}/{image name} $ docker run -d hello-world $ docker run –p 80:80 tsuyoshiushio/aservice $ docker login $ docker push docker-machine create -d azure --azure-subscription-id=”{Your subscription id}" --azure- subscription-cert=”/path/to/mycert.pem" {prefered-machine-name}
  16. 16. 本番への適用 End to Endセキュリティ
  17. 17. https://blog.docker.com/2015/08/content-trust-docker-1-8/
  18. 18. master:~$export TOKEN=$(docker run --rm swarm create) master:~$docker run -d -p 3375:2375 swarm manage token://$TOKEN master:~$docker run -d swarm join --addr=<node_1_private_ip:2375> token://$TOKEN node- 0:~$docker run -d swarm join --addr=<node_2_private_ip:2375> token://$TOKEN staging$ sudo systemctl enable docker-tcp.socket staging$ sudo systemctl enable docker.socket staging$ sudo systemctl stop docker staging$ sudo systemctl start docker-tcp.socket staging$ sudo systemctl start dockerz master$ docker -H tcp://0.0.0.0:3375 info staging$ sudo vi /etc/systemd/system/docker-tcp.socket [Unit] Description=Docker Socket for the API [Socket] ListenStream=2375 BindIPv6Only=both Service=docker.service [Install] WantedBy=sockets.target /etc/systemd/system/docker-tcp.socket
  19. 19. http://qiita.com/TsuyoshiUshio@github/items/33be6b54a741c5834253 Docker Orchestration Toolsのチュートリアル (詳細の手順が書かれています) master $ docker-compose -f production.docker-compose.yml -p dockchat_production pull master $ docker-compose -f production.docker-compose.yml -p dockchat_production up -d docker-compose -f production.docker-compose.yml -p dockchat_production scale web=10 dockchat.com/haproxy?stats dockchat.com
  20. 20. # Mongo DB db: image: mongo expose: - 27017 command: --smallfiles environment: - "constraint:environment==production” # Python App web: image: nicolaka/dockchat:v1 ports: - "5000” links: - db:db environment: - “constraint:environment==production - INTERLOCK_DATA={"hostname":"dockchat.com","domain":"dockchat.com”} interlock: image: ehazlett/interlock:latest ports: - "80:80” volumes: - /var/lib/docker:/etc/docker environment: - "constraint:environment==production” command: "--swarm-url tcp://$DOCKER_HOST --debug --plugin haproxy start" https://github.com/docker/dceu_tutorials/blob/master/2-orchestration.md
  21. 21. Code
  22. 22. 開発者がVMの上じゃなくて 一元管理されたところで 開発者がログを見たい と思うわ コンテナは心配やし パフォーマンスが気になるわ 私の環境はPublic/Privateクラウ ドを使っている。コンテナの 在庫棚卸必須やな
  23. 23. OPEN FLEXIBLE OMSContainers@microsoft.comまで
  24. 24. API ARM APIAPIAPI
  25. 25. JSON
  26. 26. リソース部分をARMで展開 コンテナ使って機能部分を展開
  27. 27. オープン ソース活用で もっと Azure を使い切ろう! https://channel9.msdn.com/Events/FEST/2015/CLD-331 https://docs.com/microsoftjapan-/6056/cld-331-azure
  28. 28. エバンジェリスト牛尾の Live DevOps! (Movie) https://channel9.msdn.com/Blogs/livedevopsinjapan Live DevOps in Japan! (Blog) http://blogs.technet.com/b/livedevopsinjapan/
  29. 29. DevOpsのマインドセットをマイクロソスフトの エバンジェリストとハッカソンで学ぶ2日間 Nov 28th – 29th with JJUG CCC Dec 9th – 10th @Shibuya dots. Jan 23rd – 24th @Osaka Microsoft corporation Senior Technical Evangelist for DevOps Microsoft 月次イベント Dev:http://aka.ms/dx1128-dev Ops:http://aka.ms/dx1128-it

×