SlideShare ist ein Scribd-Unternehmen logo
1 von 57
Delivery Pipeline for
Windows Machines
18.09.2017 @buzdin
for fun and profit
Working as a consultant
• DevOps
• Test Automation
• Software Architecture (aka Microservices)
• Java Development
• Web Development (not JavaScript)
Continuous Delivery
Getting a code change to production in a most efficient way
(preferably automated)
Lets build a delivery pipeline!
https://xebialabs.com/periodic-table-of-devops-tools/
Jenkins Pipeline
Git
checkout
Gradle
build
Run Integ
Tests
Publish to
Nexus
Deploy to
Dev
Run Func
Tests
Push to
Release
Deploy to
Staging
Steps to Deploy
• Generate SSH Certificate
• Provision Linux via Ansible
• Install dependencies via apt-get
• Download artefact from Artifactory via curl
• Start app as a service using systemd
• Think about switching to Docker later
Things to Consider
• Clustering – round-robin or
hash-based?
• Blue-green deployment
strategy?
• Should we take Kubernetes
or simply Docker Swarm?
VS
Mission Impossible
1. Don’t spend any money on licenses
2. Automate using familiar tools
3. You have a Mac
4. Don’t think about Docker all the time
Step #1 Where to get a
Windows VM?
Create Compute Instance
Create Account
Connect with RDP
Linux Windows
ansible ?
ssh ?
apt-get ?
systemd ?
docker ?
Ansible Core Concepts
• Works on SSH and Python
• Tasks (what to do)
• Playbook (aggregations of tasks)
• Inventory files (where to connect)
• Lots of configs, modules and plugins
• All written in YAML
https://www.ansible.com/
http://docs.ansible.com/ansible/list_of_windows_modules.html
Ansible Win Tasks
win_file
win_copy
win_service
win_uri
win_get tasks:
- name: Create a directory
win_file:
path: “C:Applogs“
state: directory
Useful commands:
Getting There From MacOS
$ pip install ansible
$ pip install "pywinrm>=0.2.2"
Windows Remote
Management Protocol
https://msdn.microsoft.com/en-us/library/aa384426(v=vs.85).aspx
“Windows Remote Management (WinRM) is the
Microsoft implementation of WS-Management
Protocol, a standard Simple Object Access Protocol
(SOAP)-based, firewall-friendly protocol that allows
hardware and operating systems, from different
vendors, to interoperate.”
Linux Windows
ansible ansible
ssh ?
apt-get ?
systemd ?
docker ?
PowerShell
https://msdn.microsoft.com/powershell
PowerShell
PowerShell Curl
https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod?view=powershell-5.1
> Invoke-WebRequest -Uri http://my.artifactory/repo/artifact
-OutFile app.jar
$ curl http://my.artifactory/repo/artifact
--output app.jar
PowerShell Remoting
> Enable-PSRemoting –force
> Enter-PSSession -ComputerName 127.0.0.1 -Credential User
$ ssh user@127.0.0.1
Enable Ansible Remoting
Add Firewall Rule
Success!
PowerShell on MacOS
https://github.com/PowerShell/PowerShell/
Works on MacOS 10.12 Sierra
built on .NET Core
Linux Windows
ansible ansible
ssh PowerShell
apt-get ?
systemd ?
docker ?
$ sudo apt-get install java
VS
Chocolatey
https://chocolatey.org/
Install Package with
Chocolatey
> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope
CurrentUser
> choco install jdk8 -y -params 'installdir=c:java8'
> Set-ExecutionPolicy AllSigned; iex ((New-Object
System.Net.WebClient).DownloadString('https://chocolatey.org/
install.ps1'))
Ansible Support
tasks:
- name: Install Java
win_chocolatey:
name: jdk8
state: present
params: "installdir=c:java8"
Linux Windows
ansible ansible
ssh PowerShell
apt-get Chocolatey
systemd ?
docker ?
$ sudo systemctl restart apache2.service
VS
Non-Sucking Service
Manager
https://nssm.cc/
“nssm is a service helper which doesn't suck.”
NSSM Usage
Ansible Support
tasks:
win_nssm:
name: “my_service"
application: “c:java8binjavaw.exe”
start_mode: manual
state: started
stdout_file: "{{logs_path}}stdout.log"
stderr_file: "{{logs_path}}stderr.log"
app_parameters_free_form: “{{java_opts}}"
DEMO TIME
Linux Windows
ansible ansible
ssh PowerShell
apt-get Chocolatey
systemd NSSM
docker ?
https://www.brianchristner.io/docker-image-base-os-size-comparison/
???
windowsservercore:latest
9426 mb
Layers: ???
~2000x
Nice to Know
• Possible to install Docker on Windows
• Not possible to run Windows containers and Linux
containers at the same time
Linux Windows
ansible ansible
ssh PowerShell
apt-get Chocolatey
systemd NSSM
docker WAT?
What have we learned today?
Same Tools, Patterns &
Practices Apply
https://octoverse.github.com/
Microsoft DevOps
sort of…
https://github.com/buzdin/ansible-winows-gcloud

Weitere ähnliche Inhalte

Was ist angesagt?

Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
eleksdev
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystem
Alex Tumanoff
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in Kostroma
Iosif Itkin
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
Maveryx
 

Was ist angesagt? (20)

Acceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvmAcceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvm
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
 
Take Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersTake Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainers
 
Open Source Software Testing Tools
Open Source Software Testing ToolsOpen Source Software Testing Tools
Open Source Software Testing Tools
 
Java Development EcoSystem
Java Development EcoSystemJava Development EcoSystem
Java Development EcoSystem
 
Soap UI - Lesson45
Soap UI - Lesson45Soap UI - Lesson45
Soap UI - Lesson45
 
ASP.NET security vulnerabilities
ASP.NET security vulnerabilitiesASP.NET security vulnerabilities
ASP.NET security vulnerabilities
 
Microsoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable CodeMicrosoft Fakes, Unit Testing the (almost) Untestable Code
Microsoft Fakes, Unit Testing the (almost) Untestable Code
 
Node.js quick intro
Node.js quick introNode.js quick intro
Node.js quick intro
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
Unit Testing in Swift
Unit Testing in SwiftUnit Testing in Swift
Unit Testing in Swift
 
Introduction to SoapUI day 4-5
Introduction to SoapUI day 4-5Introduction to SoapUI day 4-5
Introduction to SoapUI day 4-5
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
 
Exactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in KostromaExactpro Systems for KSTU Students in Kostroma
Exactpro Systems for KSTU Students in Kostroma
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-Assured
 
Exploring No Mans Land with Keyword-Driven Testing
Exploring No Mans Land with Keyword-Driven TestingExploring No Mans Land with Keyword-Driven Testing
Exploring No Mans Land with Keyword-Driven Testing
 
Spring Test Framework
Spring Test FrameworkSpring Test Framework
Spring Test Framework
 

Ähnlich wie Delivery Pipeline for Windows Machines

Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
Suresh Balla
 
Docker intro
Docker introDocker intro
Docker intro
spiddy
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola
 

Ähnlich wie Delivery Pipeline for Windows Machines (20)

Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
Containerisation Hack of a Legacy Software Solution - Alex Carter - CodeMill ...
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Docker intro
Docker introDocker intro
Docker intro
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Vagrant and chef
Vagrant and chefVagrant and chef
Vagrant and chef
 
#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
DevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux ContainersDevOps Workflow: A Tutorial on Linux Containers
DevOps Workflow: A Tutorial on Linux Containers
 

Mehr von Dmitry Buzdin

Developing Useful APIs
Developing Useful APIsDeveloping Useful APIs
Developing Useful APIs
Dmitry Buzdin
 
Архитектура Ленты на Одноклассниках
Архитектура Ленты на ОдноклассникахАрхитектура Ленты на Одноклассниках
Архитектура Ленты на Одноклассниках
Dmitry Buzdin
 
Riding Redis @ask.fm
Riding Redis @ask.fmRiding Redis @ask.fm
Riding Redis @ask.fm
Dmitry Buzdin
 
Rubylight JUG Contest Results Part II
Rubylight JUG Contest Results Part IIRubylight JUG Contest Results Part II
Rubylight JUG Contest Results Part II
Dmitry Buzdin
 
Rubylight Pattern-Matching Solutions
Rubylight Pattern-Matching SolutionsRubylight Pattern-Matching Solutions
Rubylight Pattern-Matching Solutions
Dmitry Buzdin
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 
Poor Man's Functional Programming
Poor Man's Functional ProgrammingPoor Man's Functional Programming
Poor Man's Functional Programming
Dmitry Buzdin
 
Rubylight programming contest
Rubylight programming contestRubylight programming contest
Rubylight programming contest
Dmitry Buzdin
 
Continuous Delivery
Continuous Delivery Continuous Delivery
Continuous Delivery
Dmitry Buzdin
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
Dmitry Buzdin
 
Thread Dump Analysis
Thread Dump AnalysisThread Dump Analysis
Thread Dump Analysis
Dmitry Buzdin
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programming
Dmitry Buzdin
 
Code Structural Analysis
Code Structural AnalysisCode Structural Analysis
Code Structural Analysis
Dmitry Buzdin
 

Mehr von Dmitry Buzdin (20)

How Payment Cards Really Work?
How Payment Cards Really Work?How Payment Cards Really Work?
How Payment Cards Really Work?
 
Как построить свой фреймворк для автотестов?
Как построить свой фреймворк для автотестов?Как построить свой фреймворк для автотестов?
Как построить свой фреймворк для автотестов?
 
Big Data Processing Using Hadoop Infrastructure
Big Data Processing Using Hadoop InfrastructureBig Data Processing Using Hadoop Infrastructure
Big Data Processing Using Hadoop Infrastructure
 
JOOQ and Flyway
JOOQ and FlywayJOOQ and Flyway
JOOQ and Flyway
 
Developing Useful APIs
Developing Useful APIsDeveloping Useful APIs
Developing Useful APIs
 
Whats New in Java 8
Whats New in Java 8Whats New in Java 8
Whats New in Java 8
 
Архитектура Ленты на Одноклассниках
Архитектура Ленты на ОдноклассникахАрхитектура Ленты на Одноклассниках
Архитектура Ленты на Одноклассниках
 
Dart Workshop
Dart WorkshopDart Workshop
Dart Workshop
 
Riding Redis @ask.fm
Riding Redis @ask.fmRiding Redis @ask.fm
Riding Redis @ask.fm
 
Rubylight JUG Contest Results Part II
Rubylight JUG Contest Results Part IIRubylight JUG Contest Results Part II
Rubylight JUG Contest Results Part II
 
Rubylight Pattern-Matching Solutions
Rubylight Pattern-Matching SolutionsRubylight Pattern-Matching Solutions
Rubylight Pattern-Matching Solutions
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Poor Man's Functional Programming
Poor Man's Functional ProgrammingPoor Man's Functional Programming
Poor Man's Functional Programming
 
Rubylight programming contest
Rubylight programming contestRubylight programming contest
Rubylight programming contest
 
Continuous Delivery
Continuous Delivery Continuous Delivery
Continuous Delivery
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Thread Dump Analysis
Thread Dump AnalysisThread Dump Analysis
Thread Dump Analysis
 
Mlocjs buzdin
Mlocjs buzdinMlocjs buzdin
Mlocjs buzdin
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programming
 
Code Structural Analysis
Code Structural AnalysisCode Structural Analysis
Code Structural Analysis
 

Kürzlich hochgeladen

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 

Kürzlich hochgeladen (20)

Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 

Delivery Pipeline for Windows Machines