Features
Sample
Community
JOIN FREE
X
YOU ARE DOWNLOADING DOCUMENT
2016 Microsoft Azure 雲的萬物論研討會.Jenkins + Docker @azure Container Service.Spooky@Trunk-Studio(謝宗穎)
Category:
Software
2016 Microsoft Azure 雲的萬物論研討會.Jenkins + Docker @azure Container Service.Spooky@Trunk-Studio(謝宗穎)
Please tick the box to continue:
DOWNLOAD NOW
Transcript
1. Jenkins + Docker @Azure Container Service
2. SPOOKY trunk.studio/website trunk.studio/blog trunk.studio/facebook
3. DevOps
4. CI / CD
5. Docker On Azure
6. Jenkins Use Docker
7. Docker Run Jenkins Jenkins Use Docker
8. Create Docker Machine On Azure ~ docker-machine create -h Usage: docker-machine create [OPTIONS] [arg...]
9. Create Docker Machine driver azure Required: --azure-subscription-id: Your Azure Subscription ID. Optional: --azure-size: Size for Azure Virtual Machine. [?] docker-machine create--driver azure--azure-size Standard_A1_v2--azure-subscription-id XXXXXazure-docker
10. Azure Subscription Id
11. docker-machine create--driver azure--azure-size Standard_A1_v2--azure-subscription-id XXXXXazure-docker Running pre-create checks... (azure-docker) Completed machine pre-create checks. Creating machine... (azure-docker) Querying existing resource group. name="docker-machine" (azure-docker) Resource group "docker-machine" already exists. (azure-docker) Configuring availability set. name="docker-machine" (azure-docker) Configuring network security group. name="azure-docker-firewall" location="westus" (azure-docker) Querying if virtual network already exists. name="docker-machine-vnet" location="westus" (azure-docker) Creating virtual network. name="docker-machine-vnet" location="westus" (azure-docker) Configuring subnet. name="docker-machine" vnet="docker-machine-vnet" cidr="192.168.0.0/16" (azure-docker) Creating public IP address. static=false name="azure-docker-ip" (azure-docker) Creating network interface. name="azure-docker-nic" (azure-docker) Creating storage account. name= location="westus" (azure-docker) Creating virtual machine. location="westus" size="Standard_A1_v2" username="docker-user" osImage="canonical:UbuntuServer:16.04.0-LTS:latest" name="azure-docker" Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with ubuntu(systemd)... Installing Docker...
12. Resources
13. Active Docker Machine
14. List Docker Machine NAME ACTIVE DRIVER STATE URL azure-docker - azure Running tcp://104.42.230.152:2376 ~ docker-machine ls
15. Active Docker Machine export DOCKER_TLS_VERIFY="1" export DOCKER_HOST= export DOCKER_CERT_PATH= export DOCKER_MACHINE_NAME="azure-docker" # Run this command to configure your shell: # eval $(docker-machine env azure-docker) ~ eval $(docker-machine env azure-docker) ~ docker-machine ls ~ docker-machine env azure-docker NAME ACTIVE DRIVER STATE URL azure-docker * azure Running tcp://104.42.230.152:2376
16. Docker Run Jenkins With Docker
17. ~ docker run--name jenkins-dind--privileged--detach--restart always--publish 8080:8080--publish 5900:5900--publish 5001:5001--volume /home/docker-user/jenkins:/var/lib/jenkinsagileworks/jenkins-dind nameContainer privilegedroot detach restart alwaysContainer
18. ~ docker run--name jenkins-dind--privileged--detach--restart always--publish 8080:8080--publish 5900:5900--publish 5001:5001--volume /home/docker-user/jenkins:/var/lib/jenkinsagileworks/jenkins-dind publish 8080 Jenkins publish 5900 VNC publish 5001 Website volume Jenkins Home
19. ~ docker run--name jenkins-dind--privileged--detach--restart always--publish 8080:8080--publish 5900:5900--publish 5001:5001--volume /home/docker-user/jenkins:/var/lib/jenkinsagileworks/jenkins-dind Docker Jenkins Jenkins Docker https://github.com/smlsunxie/docker-jenkins-dind
20. Setting Azure Static IP
21. Setting Azure Firewall
22. Check Docker Version
23. Scenario
24. Demo
25. Debug With VNC ~ open vnc://104.42.230.152:5900
26. Dev & Prod Environment Dockerle
27. Development / Test FROM mhart/alpine-node:5.12.0 RUN apk add --update git RUN apk add --update build-base libffi-dev ruby ruby-dev&& gem install sass compass --no-ri --no-rdoc&& apk del build-base libffi-dev ruby-dev&& rm -rf /var/cache/apk/* RUN apk add --no-cache make gcc g++ python && rm -rf /var/cache/apk/* FROM agileworks/sails_sample_env COPY ./ /sailsSample WORKDIR /sailsSample EXPOSE 5011 CMD /bin/sh -l -c 'npm start --production' Production
28. Continuous Integration Flow Jenkinsle
29. stage('build'){ sh "docker build -t agileworks/sails_sample_env dockers/node" sh "docker-compose run --rm build" } stage('test'){ sh "docker-compose run --rm --service-ports --name debug test" sh "docker-compose run -d --rm --service-ports --name dev dev" try{ def url = 'http://localhost:5001/' input message: "Does staging at $url look good? ", ok: "ok! build production image." }finally{ sh "docker rm -f dev" } } stage('production'){ sh "docker build -t agileworks/sails_sample_prod ." try{ sh "docker rm -f sails_sample_prod" } catch(e) {} sh "docker run -d --name sails_sample_prod -p 8800:5011 --restart always agileworks/sails_sample_prod" } UAT
30. stage('build'){ sh "docker build -t agileworks/sails_sample_env dockers/node" sh "docker-compose run --rm build" } stage('test'){ sh "docker-compose run --rm --service-ports --name debug test" sh "docker-compose run -d --rm --service-ports --name dev dev" try{ def url = 'http://localhost:5001/' input message: "Does staging at $url look good? ", ok: "ok! build production image." }finally{ sh "docker rm -f dev" } } stage('production'){ sh "docker build -t agileworks/sails_sample_prod ." try{ sh "docker rm -f sails_sample_prod" } catch(e) {} sh "docker run -d --name sails_sample_prod -p 8800:5011 --restart always agileworks/sails_sample_prod" } UAT
31. test: container_name: debug image: agileworks/sails_sample_env command: "npm run test-e2e-docker" expose: - "1338" ports: - "5001:5001" working_dir: /sailsSample volumes: - ./:/sailsSample depends_on: - "e2e-env" module.exports = { port: 4444, host: "e2e-env", browser: 'firefox', screenshotPath: '/app/test/e2e/report/', webdriverio: { baseUrl: 'http://debug:1338', waitforTimeout: 5000, }, }; e2e-env: container_name: e2e-env image: selenium/standalone-firefox-debug expose: - "4444" ports: - 5900:5900" VNC Preview docker-compose.yml chimp cong webDriver API test
32. browser.windowHandleSize({width:1280,height:900}).url('/'); browser.click('#login'); browser.setValue('#identifier', 'admin') browser.setValue('#password', 'admin') browser.click('#submit-button'); browser.element('#logout-link').state.should.be.equal('success'); #identifier #password #submit-button #login
33.
34. Azure docker-machine Docker Azure Docker Jenkins Docker CI Docker
LOAD MORE
Related Documents
30330030- ---11111111- ---20122012 · 2013-02-08 · +68...
Category:
Documents
萬里長城萬里長 The Great Wall of China
Category:
Travel
2012 李星穎《小小烘培師》
Category:
Education
Azure RTOS GUIX - download.microsoft.com · Microsoft Azure...
Category:
Documents
20170902 kixs azure&azure stack
Category:
Technology
佳穎12.10 v.3
Category:
Documents
Global Azure Bootcamp - Azure OMS
Category:
Technology
SMB JumpStart: Azure Backup and Azure Site Recovery · PDF.....
Category:
Documents
2013.12.11 102062551 徐晨桓 9762113 李柏穎. ...
Category:
Documents
佳穎1029 v.4
Category:
Documents
3a 1002445113 吳采穎
Category:
Documents
Intro to Azure - Azure Fundamentals
Category:
Documents
PowerPoint 簡報 - PMDHKpmdhk.com.hk/HK/images/2020.03.18.....
Category:
Documents
Windows Azure Storage SQL Azure
Category:
Documents
Digitale Strategien individuell umsetzen · Azure...
Category:
Documents
Azure Prime: Azure Mobile Apps Azure Mobile Engagement
Category:
Documents
INT 江忠穎
Category:
Documents
PowerPoint Presentation · Azure Stream Analytics Azure...
Category:
Documents
Selected work of Lee Wing Shan 利穎珊
Category:
Documents
戴承穎 9A01C007
Category:
Documents
Azure Powershell. Azure Automation
Category:
Engineering
Modern Art Master 9353017 范思穎
Category:
Documents
Cognitive Services Walking Deck - L100 · Azure Cognitive.....
Category:
Documents
基泰國際公司 鄧麗穎
Category:
Documents
2012年10月 大穎文化目錄
Category:
Documents
S202 42 顏秀穎
Category:
Documents
盧貞穎 Jenny
Category:
Documents
Azure Summit 2014 - Azure Search
Category:
Internet
Azure documentDB and Azure Search
Category:
Software
《人間詞話》club.ntu.edu.tw/~davidhsu/New-Davidhome/05...
Category:
Documents