SlideShare a Scribd company logo
Get start with Docker &
DevOps
Sr.Analyst Oksana Dudnik
Let’s start with Docker ToolBox
• At first we must install Docker ToolBox on local computer:
• Go to the Docker Toolbox page.
• https://www.docker.com/products/docker-toolbox
• Download and install (close all another programs).
Let’s create docker-machine
• In FAR or in Git CMD(run as administrator) :
• >docker-machine create –driver virtualbox –virtualbox-memory 4096 default
• If there now errors:
• >docker-machine create –driver virtualbox –virtualbox-memory 4096 adop
• >docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
adop * virtualbox Running tcp://192.168.99.101:2376 v1.10.3
default - virtualbox Running tcp://192.168.99.100:2376 v1.10.3
CREATE environment variables
• >SETX DOCKER_MACHINE_NAME “adop”
• >SETX DOCKER_HOST “tcp://192.168.99.101:2376”
• >SETX DOCKER_CERT_PATH
“C:Usersoksana.dudnik.dockermachinemachinesadop”
• >SETX DOCKER_TLS_VERYFY “1”
• setx LDAP_PWD "Jpk66g63ZifGYIcShSGM“
• setx LDAP_DOMAIN "ldap.example.com“
• setx LDAP_FULL_DOMAIN "dc=ldap,dc=example,dc=com“
• setx GERRIT_MYSQL_USER "gerrit“
• setx GERRIT_MYSQL_PASSWORD "gerrit“
• setx GERRIT_MYSQL_DATABASE "gerrit“
• setx GERRIT_USER_NAME "Gerrit Code Review"
• setx GERRIT_USER_EMAIL "gerrit@adop“
• setx SONAR_MYSQL_USER "sonar“
• setx SONAR_MYSQL_PASSWORD "sonar“
• setx SONAR_MYSQL_DATABASE "sonar“
• setx SONAR_ACCOUNT_LOGIN "jenkins“
• setx SONAR_ACCOUNT_PASSWORD "jenkins“
• setx SONAR_DB_LOGIN "%SONAR_MYSQL_USER%“
• setx SONAR_DB_PASSWORD "%SONAR_MYSQL_PASSWORD%“
• setx DOCKER_CLIENT_CERT_PATH “//root/.docker/”
Received environment variables
• CERT_PATH=$0 //root/.docker/
• CLIENT_SUBJ=/CN=client
• CUSTOM_NETWORK_NAME=adopnetwork
• DOCKER_CERT_PATH=C:Usersoksana.dudnik.dockermachinemachinesadop
• DOCKER_CLIENT_CERT_PATH=//root/.docker/
• DOCKER_HOST=tcp://192.168.99.101:2376
• DOCKER_MACHINE_NAME=adop
• DOCKER_TLS_VERIFY=1
• DOCKER_TOOLBOX_INSTALL_PATH=C:Program FilesDocker Toolbox
Envorment variables
• GERRIT_MYSQL_DATABASE=gerrit
• GERRIT_MYSQL_PASSWORD=gerrit
• GERRIT_MYSQL_USER=gerrit
• GERRIT_USER_EMAIL=gerrit@adop
• GERRIT_USER_NAME=Gerrit Code Review
• HOME=/root
• HOMEDRIVE=C:
• HOMEPATH=Usersoksana.dudnik
• HOST=192.168.99.100
• LDAP_DOMAIN=ldap.example.com
• LDAP_FULL_DOMAIN=dc=ldap,dc=example,dc=com
• LDAP_PWD=Jpk66g63ZifGYIcShSGM
Envorment variables
• LOGSTASH_HOST=192.168.99.101
• MACHINE_NAME=adop
• SONAR_ACCOUNT_LOGIN=jenkins
• SONAR_ACCOUNT_PASSWORD=jenkins
• SONAR_DB_LOGIN=sonar
• SONAR_DB_PASSWORD=sonar
• SONAR_MYSQL_DATABASE=sonar
• SONAR_MYSQL_PASSWORD=sonar
• SONAR_MYSQL_USER=sonar
• USER_HOME=C:Usersoksana.dudnik
CREATE network
• setx TARGET_HOST "192.168.99.101“
• setx LOGSTASH_HOST “%TARGET_HOST%"
• docker network create %CUSTOM_NETWORK_NAME%
Start docker-compose
• docker-compose -f compose/elk.yml pull
• docker-compose -f docker-compose.yml -f
etc/volumes/local/default.yml -f etc/logging/syslog/default.yml pull
• docker-compose pull
• docker-compose -f compose/elk.yml up -d
• docker-compose -f docker-compose.yml -f
etc/volumes/local/default.yml -f etc/logging/syslog/default.yml up -d
Run docker container jenkins
• >docker exec jenkins curl -I -s
jenkins:jenkins@localhost:8080/jenkins/
• >docker exec jenkins curl -X POST
jenkins:jenkins@localhost:8080/jenkins/job/Load_Platform/build
WithParameters --data token=gAsuE35s
GENERATE ssl certificates
• This command you must run from Git CMD as administrator
• Or from program Kitematic -> PowerShell (from DockerToolBox)
• >generate_client_certs.sh ${DOCKER_CLIENT_CERT_PATH}
Let’s go to docker-host:
Access the target host url
http://<TARGET_HOST>
with the
user john.smith
and
password Password01
Success!
Prepared project PetClinic
• http://<TARGET_HOST>/jenkins/job/LoadPlatform -
• rebuild All downstream jobs
• http://<TARGET_HOST>/jenkins/job/ExampleWorkspace/job/Exa
mpleProject/job/Create_Environment
• Click “Build with parameters”
• http://<TARGET_HOST>/jenkins/job/ExampleWorkspace/job/Exa
mpleProject/view/Java_Reference_Application/
• Click “Run”
Success build and deploy!
Click on link Console Output
Click on Environment URL
Click on link #1Reference_Application_Deploy
Get Result!
Let’s create own example
• Our tasks:
• Create new job for Jenkins for build project from GIT-repository
• Create shell script for setup tomcat-service
• Create new job for Jenkins for deploy this project with service
tomcat
• Create view for review our jobs
Let’s install Jenkins Job DSL plugin
Let’s check if installed
Let’s create freestyle initial job which will be
generate
another jobs : tomcat setup, build, deploy
Click add Item:
Let’s create freestyle initial job which will be
generate
another jobs : tomcat setup, build, deploy
Let’s add step during build “Process Job
DSLs”:
Let’s add step during build “Process Job
DSLs”:
Let’s create groovy - script for job
https://innersource.accenture.com/java201
/java201-adop-cartidge.git
//dls_generate_jobs.groovy
def PROJECT_NAME="Master_Build"
def WORKSPACE_NAME="Master_Build"
// Folders
def workspaceFolderName = "${WORKSPACE_NAME}"
def projectFolderName = "${PROJECT_NAME}"
// Variables
def referenceAppGitRepo = "master"
def referenceAppGitUrl =
"https://github.com/adm3942soit/Master.git"
Let’s see dsl_generate_job.groovy
on("This job builds Master application")
{
ildCleanup()
tPasswords()
asswords()
ent("adop-jenkins-master")
emote {
url(referenceAppGitUrl)
credentials("adop-jenkins-master")
ranch("*/master")
ntVariables {
WORKSPACE_NAME',workspaceFolderName)
PROJECT_NAME',projectFolderName)
ENVIRONMENT_NAME",'CI')
va8")
t{
vents{
refUpdated()
onfigure { gerritxml ->
gerritxml / 'gerritProjects' {
'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject' {
compareType("PLAIN")
pattern(referenceAppGitRepo)
'branches' {
'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch' {
compareType("PLAIN")
pattern("master")
}
}
}
}
gerritxml / serverName("ADOP Gerrit")
Creating view:
// Views
def pipelineView = buildPipelineView("Master_Application")
pipelineView.with{
title('Master_Application Pipeline')
displayedBuilds(5)
selectedJob("Master_Build")
showPipelineParameters()
showPipelineDefinitionHeader()
refreshFrequency(5)
}
queue("Master_Application")
Result:
Created view “Master_Application”
Click “Master_Application” tab:
Let’s add downstream-projects to view:
Let’s add new listview with button “Build”
Groovy script for this you will find in
repository:
• https://innersource.accenture.com/java201/java201-adop-
cartidge.git
References
• http://sheehan.github.io/job-dsl-slides/#/
• http://codeventor.blogspot.com/2015/06/jenkins-dsl-scripting-
part-1-basics-tldr.html
• http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting-
part-2-basics.html
• http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting-
part-3.html
• http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting-
part-4-adding-new-commands.html

More Related Content

What's hot

Deploying an application with Chef and Docker
Deploying an application with Chef and DockerDeploying an application with Chef and Docker
Deploying an application with Chef and Docker
Daniel Ku
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
Michele Orselli
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
Patrick Kleindienst
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
Chef Software, Inc.
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on Windows
Julian Dunn
 
Cooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 EditionCooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 Edition
Julian Dunn
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OS
Julian Dunn
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and Containers
Rodolfo Carvalho
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
Prabin Silwal
 
Configuration Management in a Containerized World
Configuration Management in a Containerized WorldConfiguration Management in a Containerized World
Configuration Management in a Containerized World
Julian Dunn
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
Geeta Vinnakota
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
Kimberly Macias
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
Puppet
 
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Docker, Inc.
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 
Tips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with ChefTips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with Chef
Chef Software, Inc.
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
Antons Kranga
 
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Carlos Sanchez
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of Kubernetes
Mike Splain
 

What's hot (20)

Deploying an application with Chef and Docker
Deploying an application with Chef and DockerDeploying an application with Chef and Docker
Deploying an application with Chef and Docker
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on Windows
 
Cooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 EditionCooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 Edition
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OS
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and Containers
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Configuration Management in a Containerized World
Configuration Management in a Containerized WorldConfiguration Management in a Containerized World
Configuration Management in a Containerized World
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
About Node.js
About Node.jsAbout Node.js
About Node.js
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor BrownDockerizing Windows Server Applications by Ender Barillas and Taylor Brown
Dockerizing Windows Server Applications by Ender Barillas and Taylor Brown
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
 
Tips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with ChefTips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with Chef
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of Kubernetes
 

Similar to Get started with docker &amp; dev ops

Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
Samuel Chow
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
Giacomo Vacca
 
Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker Swarm
Mario IC
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
Ben Hall
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
Fernando Lopez Aguilar
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
Ben Hall
 
Geode on Docker
Geode on DockerGeode on Docker
Geode on Docker
Apache Geode
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
Hsi-Kai Wang
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
msyukor
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
Alper Unal
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
Mohammad Fairus Khalid
 
Docker for dev
Docker for devDocker for dev
Docker for dev
Yusuf Found
 
Docker
DockerDocker
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
Ortus Solutions, Corp
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
Ortus Solutions, Corp
 
Azure from scratch part 5 By Girish Kalamati
Azure from scratch part 5 By Girish KalamatiAzure from scratch part 5 By Girish Kalamati
Azure from scratch part 5 By Girish Kalamati
Girish Kalamati
 
Create and use a Dockerized Aruba Cloud server - CloudConf 2017
Create and use a Dockerized Aruba Cloud server - CloudConf 2017Create and use a Dockerized Aruba Cloud server - CloudConf 2017
Create and use a Dockerized Aruba Cloud server - CloudConf 2017
Aruba S.p.A.
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
Ben Hall
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
Sreenivas Makam
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
Vincent Mercier
 

Similar to Get started with docker &amp; dev ops (20)

Docker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google CloudDocker, Kubernetes, and Google Cloud
Docker, Kubernetes, and Google Cloud
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker Swarm
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Simple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE LabSimple docker hosting in FIWARE Lab
Simple docker hosting in FIWARE Lab
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Geode on Docker
Geode on DockerGeode on Docker
Geode on Docker
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
moscmy2016: Extending Docker
moscmy2016: Extending Dockermoscmy2016: Extending Docker
moscmy2016: Extending Docker
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
Docker
DockerDocker
Docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Azure from scratch part 5 By Girish Kalamati
Azure from scratch part 5 By Girish KalamatiAzure from scratch part 5 By Girish Kalamati
Azure from scratch part 5 By Girish Kalamati
 
Create and use a Dockerized Aruba Cloud server - CloudConf 2017
Create and use a Dockerized Aruba Cloud server - CloudConf 2017Create and use a Dockerized Aruba Cloud server - CloudConf 2017
Create and use a Dockerized Aruba Cloud server - CloudConf 2017
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 

More from Asya Dudnik

Work with my_sql_-_database_in_java
Work with my_sql_-_database_in_javaWork with my_sql_-_database_in_java
Work with my_sql_-_database_in_java
Asya Dudnik
 
Oracle database
Oracle databaseOracle database
Oracle database
Asya Dudnik
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in java
Asya Dudnik
 
Jdbc in java
Jdbc in javaJdbc in java
Jdbc in java
Asya Dudnik
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
Asya Dudnik
 
Data bases in pictures
Data bases in picturesData bases in pictures
Data bases in pictures
Asya Dudnik
 
использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.Asya Dudnik
 
Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.
Asya Dudnik
 
использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.
Asya Dudnik
 
Work with my sql database in java
Work with my sql   database in javaWork with my sql   database in java
Work with my sql database in java
Asya Dudnik
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
Asya Dudnik
 
Web&java. gwt
Web&java. gwtWeb&java. gwt
Web&java. gwt
Asya Dudnik
 
Web&java.jsf.
Web&java.jsf.Web&java.jsf.
Web&java.jsf.
Asya Dudnik
 
Web&java. jsp
Web&java. jspWeb&java. jsp
Web&java. jsp
Asya Dudnik
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
Asya Dudnik
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
Asya Dudnik
 
Apache maven in java projects
Apache maven in java projectsApache maven in java projects
Apache maven in java projects
Asya Dudnik
 
Threads in java
Threads in javaThreads in java
Threads in java
Asya Dudnik
 
Ejb in java. part 1.
Ejb in java. part 1.Ejb in java. part 1.
Ejb in java. part 1.
Asya Dudnik
 

More from Asya Dudnik (20)

Work with my_sql_-_database_in_java
Work with my_sql_-_database_in_javaWork with my_sql_-_database_in_java
Work with my_sql_-_database_in_java
 
Oracle database
Oracle databaseOracle database
Oracle database
 
Work with xml in java
Work with xml in javaWork with xml in java
Work with xml in java
 
Jdbc in java
Jdbc in javaJdbc in java
Jdbc in java
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
 
Data bases in pictures
Data bases in picturesData bases in pictures
Data bases in pictures
 
использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.использование Hibernate java persistence.part 4.
использование Hibernate java persistence.part 4.
 
Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.Hibernate&ejb3 . part3.
Hibernate&ejb3 . part3.
 
использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.использование Hibernate java persistence.part 2.
использование Hibernate java persistence.part 2.
 
Work with my sql database in java
Work with my sql   database in javaWork with my sql   database in java
Work with my sql database in java
 
Java.fundamentals
Java.fundamentalsJava.fundamentals
Java.fundamentals
 
Web&java. gwt
Web&java. gwtWeb&java. gwt
Web&java. gwt
 
Web&java.jsf.
Web&java.jsf.Web&java.jsf.
Web&java.jsf.
 
Web&java. jsp
Web&java. jspWeb&java. jsp
Web&java. jsp
 
Web&java. jsp
Web&java. jspWeb&java. jsp
Web&java. jsp
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
 
Java fx for interface
Java fx for interfaceJava fx for interface
Java fx for interface
 
Apache maven in java projects
Apache maven in java projectsApache maven in java projects
Apache maven in java projects
 
Threads in java
Threads in javaThreads in java
Threads in java
 
Ejb in java. part 1.
Ejb in java. part 1.Ejb in java. part 1.
Ejb in java. part 1.
 

Recently uploaded

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 

Get started with docker &amp; dev ops

  • 1. Get start with Docker & DevOps Sr.Analyst Oksana Dudnik
  • 2. Let’s start with Docker ToolBox • At first we must install Docker ToolBox on local computer: • Go to the Docker Toolbox page. • https://www.docker.com/products/docker-toolbox • Download and install (close all another programs).
  • 3. Let’s create docker-machine • In FAR or in Git CMD(run as administrator) : • >docker-machine create –driver virtualbox –virtualbox-memory 4096 default • If there now errors: • >docker-machine create –driver virtualbox –virtualbox-memory 4096 adop • >docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS adop * virtualbox Running tcp://192.168.99.101:2376 v1.10.3 default - virtualbox Running tcp://192.168.99.100:2376 v1.10.3
  • 4. CREATE environment variables • >SETX DOCKER_MACHINE_NAME “adop” • >SETX DOCKER_HOST “tcp://192.168.99.101:2376” • >SETX DOCKER_CERT_PATH “C:Usersoksana.dudnik.dockermachinemachinesadop” • >SETX DOCKER_TLS_VERYFY “1”
  • 5. • setx LDAP_PWD "Jpk66g63ZifGYIcShSGM“ • setx LDAP_DOMAIN "ldap.example.com“ • setx LDAP_FULL_DOMAIN "dc=ldap,dc=example,dc=com“ • setx GERRIT_MYSQL_USER "gerrit“ • setx GERRIT_MYSQL_PASSWORD "gerrit“ • setx GERRIT_MYSQL_DATABASE "gerrit“ • setx GERRIT_USER_NAME "Gerrit Code Review" • setx GERRIT_USER_EMAIL "gerrit@adop“ • setx SONAR_MYSQL_USER "sonar“ • setx SONAR_MYSQL_PASSWORD "sonar“ • setx SONAR_MYSQL_DATABASE "sonar“ • setx SONAR_ACCOUNT_LOGIN "jenkins“ • setx SONAR_ACCOUNT_PASSWORD "jenkins“ • setx SONAR_DB_LOGIN "%SONAR_MYSQL_USER%“ • setx SONAR_DB_PASSWORD "%SONAR_MYSQL_PASSWORD%“ • setx DOCKER_CLIENT_CERT_PATH “//root/.docker/”
  • 6. Received environment variables • CERT_PATH=$0 //root/.docker/ • CLIENT_SUBJ=/CN=client • CUSTOM_NETWORK_NAME=adopnetwork • DOCKER_CERT_PATH=C:Usersoksana.dudnik.dockermachinemachinesadop • DOCKER_CLIENT_CERT_PATH=//root/.docker/ • DOCKER_HOST=tcp://192.168.99.101:2376 • DOCKER_MACHINE_NAME=adop • DOCKER_TLS_VERIFY=1 • DOCKER_TOOLBOX_INSTALL_PATH=C:Program FilesDocker Toolbox
  • 7. Envorment variables • GERRIT_MYSQL_DATABASE=gerrit • GERRIT_MYSQL_PASSWORD=gerrit • GERRIT_MYSQL_USER=gerrit • GERRIT_USER_EMAIL=gerrit@adop • GERRIT_USER_NAME=Gerrit Code Review • HOME=/root • HOMEDRIVE=C: • HOMEPATH=Usersoksana.dudnik • HOST=192.168.99.100 • LDAP_DOMAIN=ldap.example.com • LDAP_FULL_DOMAIN=dc=ldap,dc=example,dc=com • LDAP_PWD=Jpk66g63ZifGYIcShSGM
  • 8. Envorment variables • LOGSTASH_HOST=192.168.99.101 • MACHINE_NAME=adop • SONAR_ACCOUNT_LOGIN=jenkins • SONAR_ACCOUNT_PASSWORD=jenkins • SONAR_DB_LOGIN=sonar • SONAR_DB_PASSWORD=sonar • SONAR_MYSQL_DATABASE=sonar • SONAR_MYSQL_PASSWORD=sonar • SONAR_MYSQL_USER=sonar • USER_HOME=C:Usersoksana.dudnik
  • 9. CREATE network • setx TARGET_HOST "192.168.99.101“ • setx LOGSTASH_HOST “%TARGET_HOST%" • docker network create %CUSTOM_NETWORK_NAME%
  • 10. Start docker-compose • docker-compose -f compose/elk.yml pull • docker-compose -f docker-compose.yml -f etc/volumes/local/default.yml -f etc/logging/syslog/default.yml pull • docker-compose pull • docker-compose -f compose/elk.yml up -d • docker-compose -f docker-compose.yml -f etc/volumes/local/default.yml -f etc/logging/syslog/default.yml up -d
  • 11. Run docker container jenkins • >docker exec jenkins curl -I -s jenkins:jenkins@localhost:8080/jenkins/ • >docker exec jenkins curl -X POST jenkins:jenkins@localhost:8080/jenkins/job/Load_Platform/build WithParameters --data token=gAsuE35s
  • 12. GENERATE ssl certificates • This command you must run from Git CMD as administrator • Or from program Kitematic -> PowerShell (from DockerToolBox) • >generate_client_certs.sh ${DOCKER_CLIENT_CERT_PATH}
  • 13. Let’s go to docker-host: Access the target host url http://<TARGET_HOST> with the user john.smith and password Password01
  • 15. Prepared project PetClinic • http://<TARGET_HOST>/jenkins/job/LoadPlatform - • rebuild All downstream jobs • http://<TARGET_HOST>/jenkins/job/ExampleWorkspace/job/Exa mpleProject/job/Create_Environment • Click “Build with parameters” • http://<TARGET_HOST>/jenkins/job/ExampleWorkspace/job/Exa mpleProject/view/Java_Reference_Application/ • Click “Run”
  • 16. Success build and deploy!
  • 17. Click on link Console Output
  • 19. Click on link #1Reference_Application_Deploy
  • 21. Let’s create own example • Our tasks: • Create new job for Jenkins for build project from GIT-repository • Create shell script for setup tomcat-service • Create new job for Jenkins for deploy this project with service tomcat • Create view for review our jobs
  • 22. Let’s install Jenkins Job DSL plugin
  • 23. Let’s check if installed
  • 24. Let’s create freestyle initial job which will be generate another jobs : tomcat setup, build, deploy
  • 26. Let’s create freestyle initial job which will be generate another jobs : tomcat setup, build, deploy
  • 27. Let’s add step during build “Process Job DSLs”:
  • 28. Let’s add step during build “Process Job DSLs”:
  • 29. Let’s create groovy - script for job https://innersource.accenture.com/java201 /java201-adop-cartidge.git //dls_generate_jobs.groovy def PROJECT_NAME="Master_Build" def WORKSPACE_NAME="Master_Build" // Folders def workspaceFolderName = "${WORKSPACE_NAME}" def projectFolderName = "${PROJECT_NAME}" // Variables def referenceAppGitRepo = "master" def referenceAppGitUrl = "https://github.com/adm3942soit/Master.git"
  • 30. Let’s see dsl_generate_job.groovy on("This job builds Master application") { ildCleanup() tPasswords() asswords() ent("adop-jenkins-master") emote { url(referenceAppGitUrl) credentials("adop-jenkins-master") ranch("*/master") ntVariables { WORKSPACE_NAME',workspaceFolderName) PROJECT_NAME',projectFolderName) ENVIRONMENT_NAME",'CI') va8") t{ vents{ refUpdated() onfigure { gerritxml -> gerritxml / 'gerritProjects' { 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject' { compareType("PLAIN") pattern(referenceAppGitRepo) 'branches' { 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.Branch' { compareType("PLAIN") pattern("master") } } } } gerritxml / serverName("ADOP Gerrit")
  • 31. Creating view: // Views def pipelineView = buildPipelineView("Master_Application") pipelineView.with{ title('Master_Application Pipeline') displayedBuilds(5) selectedJob("Master_Build") showPipelineParameters() showPipelineDefinitionHeader() refreshFrequency(5) } queue("Master_Application")
  • 36. Let’s add new listview with button “Build”
  • 37. Groovy script for this you will find in repository: • https://innersource.accenture.com/java201/java201-adop- cartidge.git
  • 38. References • http://sheehan.github.io/job-dsl-slides/#/ • http://codeventor.blogspot.com/2015/06/jenkins-dsl-scripting- part-1-basics-tldr.html • http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting- part-2-basics.html • http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting- part-3.html • http://codeventor.blogspot.com/2015/07/jenkins-dsl-scripting- part-4-adding-new-commands.html