Fabric8
CI/CD
● happy father
● SA in EPAM Systems
● Java is my primary language
● hands-on-coding with Groovy, Ruby
● exploring FP with Erlang/Elixir
● passionate about agile, clean code and devops
Agenda
● What is CI/CD?
● Foundation
● Fabric8
● Demo
● Takeaways
● References
● Q&A
What...
is
CI/CD?
CI/CD
Foundation
Architecture
● Image
○ Read-only FS
○ Deploy & Share
○ Blueprint for a
container
Concepts
● Container
○ Read-write FS
○ Image Instance
○ Has a lifecycle
● Volume
○ External storage
○ Share data
○ Persist data
● Registry
○ Image Repository
Storage
Docker CLI
● docker search #search for images in a registry
● docker pull #downloads image from a registry
● docker images #displays existing images on a machine
● docker run #creates and runs container from an image
● docker ps #displayes all containers
● docker start/stop #starts/stops containers
● docker rm #removes containers
● docker rmi #removes images
Concepts
● Pod (collection of one or more Docker containers)
● Replication Controller (creates and cares about PODs)
● Service (proxy for a collection of PODs with single IP)
● Namespaces (divide cluster resources between multiple uses)
● Nodes (worker machine)
● Secret (holds sensitive information)
Concepts
● Labels (used to specify identifying attributes of objects)
● Volume (volume with POD’ lifecycle)
● Persistent Volumes (networked storage in the cluster)
● Persistent Volume Claim (a request for storage)
● etc
Architecture
K8s CLI
● kubectl get pods #displayes PODs
● kubectl get services #displayes services
● kubectl get rc #displayes replication controllers
● kubectl get nodes #displayes nodes
● kubectl create #creates objects
● kubectl delete #deletes objects
● kubectl edit #allows to modify resource on the server
● kubectl scale #sets a new size for RC or DC
● kubectl autoscale #auto sets a new size for RC or DC based on metrics
Concepts
● Build (transformation of input parameters into a resulting object)
● Image Stream (automatically performs image build on events)
● Route (exposes service by externally-reachable name)
● Template (describes a set of objects that can be parameterized and processed to
produce a list of objects for creation by OpenShift)
● Deployment Config (adds support for software deployments concept)
● Project (is a Kubernetes namespace with additional annotations)
Architecture
OpenShift CLI
● oc project #switches between projects
● oc get routes #displayes routes
● oc rsh $cnt #ssh into container
● oc new-app #creates new application
● oc new-build #creates new build
● oc deploy #views, starts, cancels, or retries a deployment
● oc rollback #reverts part of an application back to a previous deployment
● oc import-image #import Docker image from registry
History
● Fuse ESB (Open Source integration platform by FuseSource)
● Fabric (extension for managing many ESBs)
● Fabric8 1.x (Red Hat acquired FuseSource in 2012; Fuse ESB => JBoss Fuse; Fabric
closed; based on Zookeeper)
● Fabric8 2.x (on top of Kubernetes, 1.x become Jube - pure Java implementation of
Kubernetes API)
Architecture
Services & Tools
● Fabric8 Console (management console for Kubernetes)
● CD Pipeline (set of CI/CD and infra mgm apps baked into Docker images)
● DevOps Tools (set of tools to deal with k8s and OpenShift)
● iPaaS (set of apps to provide orchestration of messaging, API and integration
svcs)
Demo
Takeaways
- Docker is cool for light-weight v12n and simplifies things
- Kubernetes is powerful container orchestration platform
- OpenShift enhances “Build” capabilities on top of k8s
- Fabric8 enables CI/CD to shine with less effort
- Explore technologies to move faster
References
- Fabric8 http://fabric8.io
- Kubernetes http://k8s.io/
- OpenShift https://www.openshift.org/
- Jenkins Job DSL https://jenkinsci.github.io/job-dsl-plugin/
- Source Code https://github.com/webdizz/fabric8-ci-cd
Q&A
Izzet_Mustafayev@EPAM.com
@webdizz webdizz
izzetmustafaiev
http://webdizz.name
Thanks

Fabric8 CI/CD

  • 1.
  • 2.
    ● happy father ●SA in EPAM Systems ● Java is my primary language ● hands-on-coding with Groovy, Ruby ● exploring FP with Erlang/Elixir ● passionate about agile, clean code and devops
  • 3.
    Agenda ● What isCI/CD? ● Foundation ● Fabric8 ● Demo ● Takeaways ● References ● Q&A
  • 4.
  • 5.
  • 6.
  • 8.
  • 9.
    ● Image ○ Read-onlyFS ○ Deploy & Share ○ Blueprint for a container Concepts ● Container ○ Read-write FS ○ Image Instance ○ Has a lifecycle ● Volume ○ External storage ○ Share data ○ Persist data ● Registry ○ Image Repository Storage
  • 10.
    Docker CLI ● dockersearch #search for images in a registry ● docker pull #downloads image from a registry ● docker images #displays existing images on a machine ● docker run #creates and runs container from an image ● docker ps #displayes all containers ● docker start/stop #starts/stops containers ● docker rm #removes containers ● docker rmi #removes images
  • 12.
    Concepts ● Pod (collectionof one or more Docker containers) ● Replication Controller (creates and cares about PODs) ● Service (proxy for a collection of PODs with single IP) ● Namespaces (divide cluster resources between multiple uses) ● Nodes (worker machine) ● Secret (holds sensitive information)
  • 13.
    Concepts ● Labels (usedto specify identifying attributes of objects) ● Volume (volume with POD’ lifecycle) ● Persistent Volumes (networked storage in the cluster) ● Persistent Volume Claim (a request for storage) ● etc
  • 14.
  • 15.
    K8s CLI ● kubectlget pods #displayes PODs ● kubectl get services #displayes services ● kubectl get rc #displayes replication controllers ● kubectl get nodes #displayes nodes ● kubectl create #creates objects ● kubectl delete #deletes objects ● kubectl edit #allows to modify resource on the server ● kubectl scale #sets a new size for RC or DC ● kubectl autoscale #auto sets a new size for RC or DC based on metrics
  • 17.
    Concepts ● Build (transformationof input parameters into a resulting object) ● Image Stream (automatically performs image build on events) ● Route (exposes service by externally-reachable name) ● Template (describes a set of objects that can be parameterized and processed to produce a list of objects for creation by OpenShift) ● Deployment Config (adds support for software deployments concept) ● Project (is a Kubernetes namespace with additional annotations)
  • 18.
  • 19.
    OpenShift CLI ● ocproject #switches between projects ● oc get routes #displayes routes ● oc rsh $cnt #ssh into container ● oc new-app #creates new application ● oc new-build #creates new build ● oc deploy #views, starts, cancels, or retries a deployment ● oc rollback #reverts part of an application back to a previous deployment ● oc import-image #import Docker image from registry
  • 21.
    History ● Fuse ESB(Open Source integration platform by FuseSource) ● Fabric (extension for managing many ESBs) ● Fabric8 1.x (Red Hat acquired FuseSource in 2012; Fuse ESB => JBoss Fuse; Fabric closed; based on Zookeeper) ● Fabric8 2.x (on top of Kubernetes, 1.x become Jube - pure Java implementation of Kubernetes API)
  • 22.
  • 23.
    Services & Tools ●Fabric8 Console (management console for Kubernetes) ● CD Pipeline (set of CI/CD and infra mgm apps baked into Docker images) ● DevOps Tools (set of tools to deal with k8s and OpenShift) ● iPaaS (set of apps to provide orchestration of messaging, API and integration svcs)
  • 24.
  • 25.
    Takeaways - Docker iscool for light-weight v12n and simplifies things - Kubernetes is powerful container orchestration platform - OpenShift enhances “Build” capabilities on top of k8s - Fabric8 enables CI/CD to shine with less effort - Explore technologies to move faster
  • 26.
    References - Fabric8 http://fabric8.io -Kubernetes http://k8s.io/ - OpenShift https://www.openshift.org/ - Jenkins Job DSL https://jenkinsci.github.io/job-dsl-plugin/ - Source Code https://github.com/webdizz/fabric8-ci-cd
  • 27.
  • 28.