SlideShare uma empresa Scribd logo
1 de 26
Baixar para ler offline
Let’s talk CI/CD and DevOps
with Cloudbees & ClusterHQ
Ryan Wallner
Developer Evangelist, ClusterHQ
What’s in here?
How to get CI and Staging
to use realistic data
for each branch and commit from every developer
Docker and Jenkins today
● Jenkins is great for automating builds … but it’s not so great at
managing data, this is left to external systems
● Docker and Docker Compose are great for defining and running multi
or single container environments … not so true for managing data.
● How do you pull point-in-time references of data to anywhere in your
CI/CD pipeline?
○ Consider Dev, Test, Staging, QA and Production.
Example Jenkins Workflows
Jenkins Master
Jenkins Slave
+ Docker
Jenkins Slave
+ Docker
Jenkins Slave
+ Docker
Docker
Staging
$ git push origin branch
Notify
Build Build
Success?
Dev Test Staging
*or maybe only
when you merge
into master or
specific
staging
branches
But.. staging and testing without realistic data isn’t great
● Does it represent what a user would see?
● Is there “enough” data to see how the application works under load?
● Is the data isolated so I can test or see how staging looks with different
types or amounts of data?
● Do I know where this data came from, who created it?
FlockerHub and Fli
FlockerHub is GitHub for data
a. Hub & Catalog for Docker data volumes
b. Fine-grained access controls & user mgmt
c. Available initially as ClusterHQ hosted
service
Fli is Git for data
a. cli interface for FlockerHub
b. Snapshot Docker volumes
c. Push & pull from FlockerHub
d. Available as Apache 2.0 download
User View
Data
Servers
https://flockerhub.clusterhq.com
https://data.flockerhub.clusterhq.com
Github/Google
Data operations
Session
Auth
Token
token.txt
Staging / test with realistic data is great - w/ FlockerHub
● Does it represent what a user would see?
Yes, I can have prod ops give us obfuscated production snapshots so we can get a realistic view of
data.
● Is there “enough” data to see how the application?
Yes, we can get a fresh, up-to-date snapshot from Ops teams.
● Is the data isolated so I can see how staging looks with different types or
amounts of data?
Yes, we can get fresh clones of a snapshot we choose each and every commit.
● Do I know where this data came from, who created it?
Yes, We can track who the snapshot was created by and who has access to it.
Example Jenkins Workflow with Fli and
FlockerHub
Jenkins Master
Jenkins Slave
+ Docker
Jenkins Slave
+ Docker
Jenkins Slave
+ Docker
Docker
Staging
$ git push
my-branch
Notify
Build Build
Success?
Dev Test Staging
*Jenkinsfile has a reference of what
Snapshot to use in staging.
$ fli pull
*every developer,
every branch.
Isolated snapshots
push
pull
Jenkins Master
Jenkins Slave
+ Docker
Docker
Staging
$ git push
my-branch
Notify
Build test_123
With snapshot 321
Success?
Dev Test Staging
*Jenkinsfile has a reference to use
snapshot 321 for test 123
$ fli pull
1. pull (only changes)
2. clone snapshot
3. give clone to docker
4. docker run && test
5. snapshot volume if failure
6. docker stop/kill
Manage snapshots, orgs and teams
https://flockerhub.clusterhq.com
Demo
Jenkins workflow with Fli and FlockerHub
Thank You
Sign up
https://clusterhq.com/register/flockerhub-beta/
@ryanwallner
Walkthrough
❏ Checkout new branch to work with, push and watch build in Jenkins
❏ Show Staging
❏ Change branch to use a different snapshot that has a bad phone number or vin number
❏ Show output from error in CI
❏ Use manifest produced by failure to reproduce locally.
❏ vi fli-docker-manifest.yml (in inventory-app)
❏ fli-docker run -f fli-docker-manifest.yml -c -t /root/fh.token
❏ docker ps to show locally running re-created env with snapshot
❏ run the test that failed locally.
❏ docker run --net=flicompose_net -e FRONTEND_HOST="frontend" -e DATABASE_HOST="db"
-e FRONTEND_PORT=8000 --rm -v ${PWD}/frontend/:/frontend clusterhq/mochatest
"cd /frontend && npm install && mocha --debug test/test_db_vehicle_vins.js"
❏ cleanup with fli-docker destroy -f fli-docker-manifest.yml -clean
Backup/Example Slides
Test failures within Jenkins
Test logs show failed test and what snapshot was taken after the failure
Jenkins Build/Test with Snapshots/Clones
Jenkins first pulls the necessary snapshots and creates a volume for the Docker app to use.
[parallel tests 9] Syncing Volumeset inventory-app
[parallel tests 9] Getting ID of the Snapshot 750k-records-snap
[parallel tests 9] ID of snapshot is 6234bb23-15c9
[parallel tests 9] Pulling inventory-app:6234bb23-15c9
[parallel tests 9] Creating volume from Snapshot
[parallel tests 9] Volume /chq/e41408a1-9e41/bd6f5bc0-f4ad created
[parallel tests 9] Loading the path into the application.
The volume /chq/e41408a1-9e41/bd6f5bc0-f4ad/ will be mapped into the
docker-compose.yml
The application boots up with a point in time snapshot of data in staging for the particular
branch
* http://jenkinsdemo.clusterhq.com/job/inventory-pipeline-multi/job/master/
Staging is available per commit with its own
isolated data.
fli-docker
https://github.com/ClusterHQ/fli-docker
Stateful-Apps as Code?
fli-docker
The fli-docker utility is designed to simplify the deployment of stateful applications inside
Docker containers using a Flocker Hub Stateful Application Manifest (SAM) used side by
side with the Docker Compose file.
In a local development environment
$ cat docker-compose.yml
services:
db:
networks:
- net
image: rethinkdb
volumes:
- rethink-data:/data
ports:
- 28015
- 29015
- 8080
command: rethinkdb
$ cat fli-manifest.yml
docker_app: docker-compose.yml
flocker_hub:
endpoint: data.flockerhub.clusterhq.com
volumes:
- name: rethink-data
snapshot: someSnapshot-of-DB
volumeset: inventory-app

Mais conteúdo relacionado

Mais procurados

ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
Daniel Oh
 

Mais procurados (20)

JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza JFrog container registry - DevOps extravaganza
JFrog container registry - DevOps extravaganza
 
Docker basic on azure
Docker basic on azureDocker basic on azure
Docker basic on azure
 
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
ApacheCon Europe 2016 : CONTAINERS IN ACTION - Transform Application Delivery...
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Dockercon2015 bamboo
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bamboo
 
中華電信 教育訓練
中華電信 教育訓練中華電信 教育訓練
中華電信 教育訓練
 
Docker dev, test & production (afas)
Docker  dev, test & production (afas)Docker  dev, test & production (afas)
Docker dev, test & production (afas)
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
Docker Best Practices Workshop
Docker Best Practices WorkshopDocker Best Practices Workshop
Docker Best Practices Workshop
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Grooving with Jenkins
Grooving with JenkinsGrooving with Jenkins
Grooving with Jenkins
 
Cloud Driven Development: a better workflow, less worries, and more power
Cloud Driven Development: a better workflow, less worries, and more powerCloud Driven Development: a better workflow, less worries, and more power
Cloud Driven Development: a better workflow, less worries, and more power
 
Евгений Жарков "React Native: Hurdle Race"
Евгений Жарков "React Native: Hurdle Race"Евгений Жарков "React Native: Hurdle Race"
Евгений Жарков "React Native: Hurdle Race"
 
A battle tested CI/CD Pipeline
A battle tested CI/CD PipelineA battle tested CI/CD Pipeline
A battle tested CI/CD Pipeline
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Lando - AddWeb Solution
Lando - AddWeb Solution Lando - AddWeb Solution
Lando - AddWeb Solution
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovy
 
CI CD WORKFLOW
CI CD WORKFLOWCI CD WORKFLOW
CI CD WORKFLOW
 
Jenkins for android developer at TWJUG
Jenkins for android developer at TWJUGJenkins for android developer at TWJUG
Jenkins for android developer at TWJUG
 
自己的 Jenkins 自己來 for Android developer
自己的 Jenkins 自己來  for Android developer自己的 Jenkins 自己來  for Android developer
自己的 Jenkins 自己來 for Android developer
 

Destaque

Zaragoza Turismo 19
Zaragoza Turismo 19Zaragoza Turismo 19
Zaragoza Turismo 19
Saucepolis blog & Hotel Sauce
 
手機與加油的重要提示
手機與加油的重要提示手機與加油的重要提示
手機與加油的重要提示
honan4108
 
Ratiu capitolul 3_politica_culturala_si_artele_2011
Ratiu capitolul 3_politica_culturala_si_artele_2011Ratiu capitolul 3_politica_culturala_si_artele_2011
Ratiu capitolul 3_politica_culturala_si_artele_2011
Aliona Rau
 
交點高雄vol.7 - Morgan - 鬼島風雲錄
交點高雄vol.7 - Morgan - 鬼島風雲錄交點高雄vol.7 - Morgan - 鬼島風雲錄
交點高雄vol.7 - Morgan - 鬼島風雲錄
交點
 

Destaque (17)

Zaragoza turismo 182
Zaragoza turismo 182Zaragoza turismo 182
Zaragoza turismo 182
 
2015 Giving Tuesday Infographic
2015 Giving Tuesday Infographic2015 Giving Tuesday Infographic
2015 Giving Tuesday Infographic
 
аблеш елдос + нянка на час + идея
аблеш елдос + нянка на час + идеяаблеш елдос + нянка на час + идея
аблеш елдос + нянка на час + идея
 
Ældreudspil 2013
Ældreudspil 2013Ældreudspil 2013
Ældreudspil 2013
 
Women in business gateway codesign workshop Jan 2016
Women in business gateway codesign workshop Jan 2016Women in business gateway codesign workshop Jan 2016
Women in business gateway codesign workshop Jan 2016
 
Careers in design industry and anthropology
Careers in design industry and anthropologyCareers in design industry and anthropology
Careers in design industry and anthropology
 
Hoofdstuk 4.
Hoofdstuk 4.Hoofdstuk 4.
Hoofdstuk 4.
 
Vähittäiskaupan digitalisaatio
Vähittäiskaupan digitalisaatioVähittäiskaupan digitalisaatio
Vähittäiskaupan digitalisaatio
 
Odusalud
Odusalud Odusalud
Odusalud
 
Zaragoza Turismo 19
Zaragoza Turismo 19Zaragoza Turismo 19
Zaragoza Turismo 19
 
Social Media Metrics
Social Media MetricsSocial Media Metrics
Social Media Metrics
 
手機與加油的重要提示
手機與加油的重要提示手機與加油的重要提示
手機與加油的重要提示
 
Radical Management Preface Introduction Steve Denning
Radical Management Preface Introduction Steve DenningRadical Management Preface Introduction Steve Denning
Radical Management Preface Introduction Steve Denning
 
Ratiu capitolul 3_politica_culturala_si_artele_2011
Ratiu capitolul 3_politica_culturala_si_artele_2011Ratiu capitolul 3_politica_culturala_si_artele_2011
Ratiu capitolul 3_politica_culturala_si_artele_2011
 
交點高雄vol.7 - Morgan - 鬼島風雲錄
交點高雄vol.7 - Morgan - 鬼島風雲錄交點高雄vol.7 - Morgan - 鬼島風雲錄
交點高雄vol.7 - Morgan - 鬼島風雲錄
 
yugam_anand
yugam_anandyugam_anand
yugam_anand
 
ТаксГИД по банкротству. Ноябрь 2015
ТаксГИД по банкротству. Ноябрь 2015ТаксГИД по банкротству. Ноябрь 2015
ТаксГИД по банкротству. Ноябрь 2015
 

Semelhante a November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins

Using Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at SplunkUsing Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at Splunk
Docker, Inc.
 

Semelhante a November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins (20)

DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Using Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at SplunkUsing Docker EE to Scale Operational Intelligence at Splunk
Using Docker EE to Scale Operational Intelligence at Splunk
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
 
Adventures in docker compose
Adventures in docker composeAdventures in docker compose
Adventures in docker compose
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Devops CI-CD pipeline with Containers
Devops CI-CD pipeline with ContainersDevops CI-CD pipeline with Containers
Devops CI-CD pipeline with Containers
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineers
 
Odo improving the developer experience on OpenShift - hack & sangria
Odo   improving the developer experience on OpenShift - hack & sangriaOdo   improving the developer experience on OpenShift - hack & sangria
Odo improving the developer experience on OpenShift - hack & sangria
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
Streamlining Agile Linux Development with Docker and RHEL Atomic
Streamlining Agile Linux Development with Docker and RHEL AtomicStreamlining Agile Linux Development with Docker and RHEL Atomic
Streamlining Agile Linux Development with Docker and RHEL Atomic
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
DevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of JenkinsDevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of Jenkins
 
Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019
 
Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.Drupal 8 DevOps . Profile and SQL flows.
Drupal 8 DevOps . Profile and SQL flows.
 

Último

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 

November 15 cloud bees clusterhq meetup fli, flockerhub, and jenkins

  • 1. Let’s talk CI/CD and DevOps with Cloudbees & ClusterHQ Ryan Wallner Developer Evangelist, ClusterHQ
  • 2. What’s in here? How to get CI and Staging to use realistic data for each branch and commit from every developer
  • 3.
  • 4. Docker and Jenkins today ● Jenkins is great for automating builds … but it’s not so great at managing data, this is left to external systems ● Docker and Docker Compose are great for defining and running multi or single container environments … not so true for managing data. ● How do you pull point-in-time references of data to anywhere in your CI/CD pipeline? ○ Consider Dev, Test, Staging, QA and Production.
  • 6. Jenkins Master Jenkins Slave + Docker Jenkins Slave + Docker Jenkins Slave + Docker Docker Staging $ git push origin branch Notify Build Build Success? Dev Test Staging *or maybe only when you merge into master or specific staging branches
  • 7. But.. staging and testing without realistic data isn’t great ● Does it represent what a user would see? ● Is there “enough” data to see how the application works under load? ● Is the data isolated so I can test or see how staging looks with different types or amounts of data? ● Do I know where this data came from, who created it?
  • 8.
  • 9. FlockerHub and Fli FlockerHub is GitHub for data a. Hub & Catalog for Docker data volumes b. Fine-grained access controls & user mgmt c. Available initially as ClusterHQ hosted service Fli is Git for data a. cli interface for FlockerHub b. Snapshot Docker volumes c. Push & pull from FlockerHub d. Available as Apache 2.0 download
  • 11. Staging / test with realistic data is great - w/ FlockerHub ● Does it represent what a user would see? Yes, I can have prod ops give us obfuscated production snapshots so we can get a realistic view of data. ● Is there “enough” data to see how the application? Yes, we can get a fresh, up-to-date snapshot from Ops teams. ● Is the data isolated so I can see how staging looks with different types or amounts of data? Yes, we can get fresh clones of a snapshot we choose each and every commit. ● Do I know where this data came from, who created it? Yes, We can track who the snapshot was created by and who has access to it.
  • 12. Example Jenkins Workflow with Fli and FlockerHub
  • 13. Jenkins Master Jenkins Slave + Docker Jenkins Slave + Docker Jenkins Slave + Docker Docker Staging $ git push my-branch Notify Build Build Success? Dev Test Staging *Jenkinsfile has a reference of what Snapshot to use in staging. $ fli pull *every developer, every branch. Isolated snapshots push pull
  • 14. Jenkins Master Jenkins Slave + Docker Docker Staging $ git push my-branch Notify Build test_123 With snapshot 321 Success? Dev Test Staging *Jenkinsfile has a reference to use snapshot 321 for test 123 $ fli pull 1. pull (only changes) 2. clone snapshot 3. give clone to docker 4. docker run && test 5. snapshot volume if failure 6. docker stop/kill
  • 15. Manage snapshots, orgs and teams https://flockerhub.clusterhq.com
  • 16. Demo Jenkins workflow with Fli and FlockerHub
  • 18. Walkthrough ❏ Checkout new branch to work with, push and watch build in Jenkins ❏ Show Staging ❏ Change branch to use a different snapshot that has a bad phone number or vin number ❏ Show output from error in CI ❏ Use manifest produced by failure to reproduce locally. ❏ vi fli-docker-manifest.yml (in inventory-app) ❏ fli-docker run -f fli-docker-manifest.yml -c -t /root/fh.token ❏ docker ps to show locally running re-created env with snapshot ❏ run the test that failed locally. ❏ docker run --net=flicompose_net -e FRONTEND_HOST="frontend" -e DATABASE_HOST="db" -e FRONTEND_PORT=8000 --rm -v ${PWD}/frontend/:/frontend clusterhq/mochatest "cd /frontend && npm install && mocha --debug test/test_db_vehicle_vins.js" ❏ cleanup with fli-docker destroy -f fli-docker-manifest.yml -clean
  • 21. Test logs show failed test and what snapshot was taken after the failure
  • 22. Jenkins Build/Test with Snapshots/Clones Jenkins first pulls the necessary snapshots and creates a volume for the Docker app to use. [parallel tests 9] Syncing Volumeset inventory-app [parallel tests 9] Getting ID of the Snapshot 750k-records-snap [parallel tests 9] ID of snapshot is 6234bb23-15c9 [parallel tests 9] Pulling inventory-app:6234bb23-15c9 [parallel tests 9] Creating volume from Snapshot [parallel tests 9] Volume /chq/e41408a1-9e41/bd6f5bc0-f4ad created [parallel tests 9] Loading the path into the application. The volume /chq/e41408a1-9e41/bd6f5bc0-f4ad/ will be mapped into the docker-compose.yml The application boots up with a point in time snapshot of data in staging for the particular branch * http://jenkinsdemo.clusterhq.com/job/inventory-pipeline-multi/job/master/
  • 23. Staging is available per commit with its own isolated data.
  • 25. Stateful-Apps as Code? fli-docker The fli-docker utility is designed to simplify the deployment of stateful applications inside Docker containers using a Flocker Hub Stateful Application Manifest (SAM) used side by side with the Docker Compose file.
  • 26. In a local development environment $ cat docker-compose.yml services: db: networks: - net image: rethinkdb volumes: - rethink-data:/data ports: - 28015 - 29015 - 8080 command: rethinkdb $ cat fli-manifest.yml docker_app: docker-compose.yml flocker_hub: endpoint: data.flockerhub.clusterhq.com volumes: - name: rethink-data snapshot: someSnapshot-of-DB volumeset: inventory-app