O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Open Source Lisbon 2018 - Sérgio Seabra Presentation

31 visualizações

Publicada em

Red Hat Strategies for DevOps - From Theory to Practice.

Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Open Source Lisbon 2018 - Sérgio Seabra Presentation

  1. 1. Red Hat Strategies for DevOps From Theory to Practice Sérgio Seabra Senior Solutions Architect Q3 2018 sseabra@redhat.com
  2. 2. What is DevOps? What is Agile Development? What is CI/CD? What’s a Kubernetes? Etc… So many questions, So little time(!)
  3. 3. Let’s begin with some definitions... DevOps is a software engineering culture and practice of putting horrors into containers and then talking about Kubernetes at conferences. @Almost everyone you meet...
  4. 4. IMHO, This one’s much better... As technology continues to innovate at a rapid pace, teams with heavy cross- functional dependencies will find that the problem will worsen. This might be the single biggest reason why projects fail. This is where standardization is most needed because, without standardization, it is hard to automate. @Jen Krieger - Chief Agile Architect at Red Hat
  5. 5. Why we’re in dire need of DevOps? “There are no IT projects, only business initiatives which require IT support to succeed.” Large Bank CIO Red Hat Customer
  6. 6. The “writing’s on the wall” and the consensus is: Develop: ➔ Without wait times, dependencies or cost overrun
  7. 7. Develop: Test: ➔ Without wait times, dependencies or cost overrun ➔ Immediately and across departments The “writing’s on the wall” and the consensus is:
  8. 8. Develop: Test: Deploy: ➔ Without wait times, dependencies or cost overrun ➔ Immediately and across departments ➔ Frequently, with agility and in a reliable manner The “writing’s on the wall” and the consensus is:
  9. 9. Develop: Test: Deploy: Monitor: ➔ Without wait times, dependencies or cost overrun ➔ Immediately and across departments ➔ Frequently, with agility and in a reliable manner ➔ CVEs, Infrastructure, platform, application usage The “writing’s on the wall” and the consensus is:
  10. 10. Develop: Test: Deploy: Monitor: Analize and React: ➔ Without wait times, dependencies or cost overrun ➔ Immediately and across departments ➔ Frequently, with agility and in a reliable manner ➔ CVEs, Infrastructure, platform, application usage ➔ In quasi realtime The “writing’s on the wall” and the consensus is:
  11. 11. To the Question - Why apply DevOps? Desarrollar: Probar: Desplegar: Monitorizar: Analizar y Reaccionar: ➔ Sin esperas, dependencias o sobrecostes ➔ Inmediatamente con la mayor cobertura ➔ Frecuentemente, ágilmente y fiablemente ➔ CVEs, Infraestructura, plataforma, uso aplicación ➔ En tiempo real To serve business initiatives at the required pace. Experiment, Deploy, Fail Fast and recover even faster, all without the legacy inertia, costs and overhead of the previous paradigm.
  12. 12. How to apply DevOps? DevOps is the practice of optimizing and applying continuous improvement to the process of development and delivery of applications and services based on software, through better collaboration, standardization and automation provided by technological facilitators. Technology ProcessesPersonas
  13. 13. That’s Great!! I now know I need to apply DevOps Let’s get started: First Step: ➔ Methodology The most popular and common ones are Scrum, eXtreme Programming (XP), Feature Driven Development (FDD), Dynamic Systems Development Method (DSDM), Adaptive Software Development (ASD), Crystal, and Lean Software Development (LSD)...
  14. 14. How to apply DevOps?
  15. 15. That’s Great! I now know I need to apply DevOps (take 2) Let’s get started (again): Second Step: ➔ Tools and Technology
  16. 16. CONFIDENTIAL - FOR INTERNAL USE ONLY 16 CONFIDENTIAL - FOR INTERNAL USE ONLY
  17. 17. CONFIDENTIAL - FOR INTERNAL USE ONLY 17 CONFIDENTIAL - FOR INTERNAL USE ONLY THE CLOUD-NATIVE APP DEV CHALLENGE
  18. 18. We need a baseline that brings order to chaos: ● Based on containers standard technology (OCI, CRI-O, Kubernetes). ● Offers an ample catalog of components, frameworks and development runtimes ● Creates application templates “Cloud Ready”, “Stateless”, “Stateful” and with native persistent storage ● Instances preconfigured environments on demand. ● Automates the construction, packaging, deployment and progression of applications ● Provides and/or Integrates with other SDLC Toolchain elements (Jenkins, Git, ...)
  19. 19. OPENSHIFT CONTAINER PLATFORM Self Provisioning Development Polyglot (Multi-Language) Support CI/CD Collaboration (projects) Standardization and Security Scalability and Operation Open Source Enterprise Ready
  20. 20. CrunchyData GitLab Iron.io Couchbase Sonatype EnterpriseDB NuoDB Fujitsu and many more ...and virtually any OCI image out there! TRUE POLYGLOT PLATFORM PHPPythonJava NodeJS Perl Ruby .NET Core Apache HTTP Server MySQL Redis nginx TomcatVarnish JBoss EAP JBoss A-MQ JBoss Fuse JBoss BRMS JBoss BPMS JBoss Data Grid JBoss Data Virt RH Mobile RH SSO 3SCALE API mgmt JBoss Web Server Spring Boot Wildfly Swarm Vert.x PostgreSQL MongoDB Phusion Passenger Third-party Language Runtimes Third-party Databases Third-party App Runtimes Third-party Middleware Third-party Middleware LANGUAGES DATABASES WEB SERVERS MIDDLEWARE
  21. 21. GENERAL DISTRIBUTION HOW OPENSHIFT ENABLES DEVELOPER PRODUCTIVITY SPRING & JAVA EE MICROSERVICES FUNCTIONS LANGUAGES DATABASES APPLICATION SERVICES LINUX WINDOWS* * coming soon CODE BUILD TEST DEPLOY MONITORREVIEW Self-service Provisioning Automated build & deploy CI/CD pipelines Consistent environments Configuration management App logs & metrics
  22. 22. GENERAL DISTRIBUTION “Team went from dev to prod in 2 months on OpenShift, and nobody in IT Ops knew. The friction was removed.” Simon Cashmore, Head of Middleware PM Barclays
  23. 23. GENERAL DISTRIBUTION THE POWER OF THE Red Hat OPENSHIFT ECOSYSTEM RED HAT ENTERPRISE LINUX ECOSYSTEM Hardware, Virtualization, Cloud and Service Provider Certifications RED HAT PORTFOLIO Optimized for Containers THIRD-PARTY ISV Red Hat Container Catalog (100s certified) CLOUD SERVICES Open Service Broker
  24. 24. OPENSHIFT TECHNICAL OVERVIEW25 THE INDUSTRY IS ALIGNING BEHIND THE KUBERNETES OPERATOR FRAMEWORK 60+ Certified ISV Operators in Red Hat Early Access Program
  25. 25. 26 USE CASES MAKING DEVOPS HAPPEN
  26. 26. Tecnología que permita: ● Escoger entre un amplio catálogo de componentes, frameworks y runtimes de desarrollo y servicios de plataforma ● Crear plantillas de aplicaciones “Cloud Ready”, “Stateless”, “Stateful” y con almacenamiento persistente nativo. ● Instanciar entornos bajo demanda preconfigurados. ● Automatizar la construcción, empaquetado, despliegue y progresión de aplicaciones ● Proporcione y/o permita Integrarse con otras herramientas del SDLC Toolchain (Jenkins, Git, ...) ● IDE web como servicio To DEVELOP without wait times, dependencies or cost overrun
  27. 27. Technology that allows: ● (Re) Instance ephemeral test environments on demand preconfigured and populated with data. ● Automate code validation, performance tests, regression, UAT. ● A/B Testing for code improvements ● Trace the interactions between microservices ● Decommission environments after change validation
  28. 28. Tecnología que permita: ● (Re)Instanciar entornos efímeros de prueba bajo demanda preconfigurados y poblados de datos. ● Automatizar la validación de código, pruebas de rendimiento, de regresión, UAT. ● A/B Testing por configuración ● Trazar las interacciones entre microservicios ● Decomisionar entornos una vez realizadas las pruebas. Test IMMEDIATELY and across departments
  29. 29. Technology that allows: ● Automate application progression throughout the SLDC eliminating manual intervention. ● Integrate with third parties to approve workflows. ● React to events to start deployments. ● React to failures and automatic rollback. ● Define infrastructure and configuration as code. ● Use various deployment and routing strategies: ○ Blue/green ○ Canary ○ A/B Testing
  30. 30. Tecnología que permita: ● (Re)Instanciar entornos efímeros de prueba bajo demanda preconfigurados y poblados de datos. ● Automatizar la validación de código, pruebas de rendimiento, de regresión, UAT. ● A/B Testing por configuración ● Trazar las interacciones entre microservicios ● Decomisionar entornos una vez realizadas las pruebas. DEPLOY Frequently with agility and in a reliable manner
  31. 31. Technology that allows: ● “Readiness”, “liveness” checks and “Self Healing”. ● Monitor consumptions, service traceability, pod, node. ● Exposition and automatic discovery of services. ● Scale dynamically. ● Balance workloads automatically. ● Define and audit Quotas. ● Role Based Access Control. ● Monitor CVEs and trigger automatic image update processes.
  32. 32. Tecnología que permita: ● “Readiness”, “liveness” checks y “Self Healing” ● Monitorizar consumos, trazabilidad servicio, pod, nodo ● Exposición y descubrimiento automático de servicios ● Escalar dinámicamente. ● Balancear cargas dinámicamente. ● Definir y Auditar Cuotas ● Role Based Access Control ● Monitorizar CVEs y disparar procesos automáticos de actualización de imágenes To MONITOR CVEs, Infrastructure, platform, application use and REACT in RealTime
  33. 33. OPERATOR FRAMEWORK https://github.com/operator-framework Build Operators without specialized knowledge of the Kubernetes API Install, update, and manage Operators and their dependencies Enable usage reporting for Operators An open source toolkit to manage application instances on Kubernetes in an automated, scalable way
  34. 34. FULL-STACK AUTOMATED OPERATIONS IN OPENSHIFT APPLICATIONS AND SERVICES ISV operators Custom operators (built w/Operator SDK) PLATFORM AND CLUSTER MANAGEMENT Automated updates for Kubernetes, monitoring, security, registry and more LINUX HOST Atomic, over-the-air updates for Red Hat CoreOS ANY INFRASTRUCTURE *coming soon
  35. 35. OPERATOR METERING *coming soon
  36. 36. Marketplace brings it all together Operator Catalog Ansible Broker & others Cloud Brokers Source 2 Image Existing content Existing RH content Customer s2i Go, Ansible, Helm *coming soon
  37. 37. CONTINUOUS INTEGRATION (CI) CONTINUOUS DELIVERY (CD) DevOps
  38. 38. DEVELOPER WORKFLOW
  39. 39. OPENSHIFT TECHNICAL OVERVIEW40 LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  40. 40. OPENSHIFT TECHNICAL OVERVIEW BOOTSTRAP ● Pick your programming language and application runtime of choice ● Create the project skeleton from scratch or use a generator such as ○ Maven archetypes ○ Quickstarts and Templates ○ OpenShift Generator ○ Spring Initializr 41 LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  41. 41. OPENSHIFT TECHNICAL OVERVIEW42 DEVELOP ● Pick your framework of choice such as Java EE, Spring, Ruby on Rails, Django, Express, ... ● Develop your application code using your editor or IDE of choice ● Build and test your application code locally using your build tools ● Create or generate OpenShift templates or Kubernetes objects LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  42. 42. OPENSHIFT TECHNICAL OVERVIEW43 LOCAL DEPLOY ● Deploy your code on a local OpenShift cluster ○ Red Hat Container Development Kit (CDK), minishift and oc cluster ● Red Hat CDK provides a standard RHEL-based development environment ● Use binary deploy, maven or CLI rsync to push code or app binary directly into containers LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  43. 43. OPENSHIFT TECHNICAL OVERVIEW44 VERIFY ● Verify your code is working as expected ● Run any type of tests that are required with or without other components (database, etc) ● Based on the test results, change code, deploy, verify and repeat LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  44. 44. OPENSHIFT TECHNICAL OVERVIEW45 GIT PUSH ● Push the code and configuration to the Git repository ● If using Fork & Pull Request workflow, create a Pull Request ● If using code review workflow, participate in code review discussions LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  45. 45. OPENSHIFT TECHNICAL OVERVIEW PIPELINE ● Pushing code to the Git repository triggers one or multiple deployment pipelines ● Design your pipelines based on your development workflow e.g. test the pull request ● Failure in the pipeline? Go back to the code and start again 46 LOCAL DEVELOPMENT WORKFLOW Develop Local Deploy Verify Git Push PipelineBootstrap
  46. 46. HERE ARE SOME OF THE DEVELOPMENT STRATEGIES POSSIBLE
  47. 47. OPENSHIFT TECHNICAL OVERVIEW48 DEPLOY SOURCE CODE WITH SOURCE-TO- IMAGE (S2I) Git Repository BUILD APP (OpenShift) Developer code Source-to-Image (S2I) Builder Image Image Registry BUILD IMAGE (OpenShift) DEPLOY (OpenShift) deployApplication Container OpenShift DoesUser/Tool Does
  48. 48. OPENSHIFT TECHNICAL OVERVIEW49 DEPLOY APP BINARY WITH SOURCE-TO- IMAGE (S2I) Application Binary (e.g. WAR) BUILD APP (Build Infra) Existing Build Process build Source-to-Image (S2I) Builder Image Image Registry BUILD IMAGE (OpenShift) DEPLOY (OpenShift) deployApplication Container OpenShift DoesUser/Tool Does Artifact Repository
  49. 49. OPENSHIFT TECHNICAL OVERVIEW50 EXAMPLE: USE ANY RUNTIME IMAGE WITH SOURCE-TO-IMAGE BUILDS DOCKER BUILDWILDFLY S2I BUILD app.war WildFly S2I Builder Image WildFly Runtime Image Use Source-to-Image to build app binaries and deploy on lean vanilla runtimes read more on https://blog.openshift.com/chaining-builds/
  50. 50. OPENSHIFT TECHNICAL OVERVIEW51 EXAMPLE: USE ANY BUILD TOOL WITH OFFICIAL RUNTIME IMAGES DOCKER BUILDCUSTOM GRADLE BUILD Custom Gradle S2I Builder Image Buildah Red Hat OpenJDK Image Use your choice of build tool like Gradle and deploy to official images like the JDK image read more on https://blog.openshift.com/chaining-builds/ app.war
  51. 51. OPENSHIFT TECHNICAL OVERVIEW52 OPENSHIFT CI/CD JENKINS-AS-A SERVICE ON OPENSHIFT HYBRID JENKINS INFRA WITH OPENSHIFT EXISTING CI/CD DEPLOY TO OPENSHIFT
  52. 52. OPENSHIFT TECHNICAL OVERVIEW APPLICATION IMAGE 53 CONTINUOUS DELIVERY PIPELINE DEV TEAMS GIT SERVER ARTIFACT REPOSITORY JENKINS IMAGE BUILD ● S2I build from source code ● S2I build from app binary ● Existing docker container image build process
  53. 53. OPENSHIFT TECHNICAL OVERVIEW ● Scale existing Jenkins infrastructure by dynamically provisioning Jenkins slaves on OpenShift ● Use Kubernetes plug-in on existing Jenkin servers 54 HYBRID JENKINS INFRA WITH OPENSHIFT OPENSHIFT APP APPrun job JENKINS SLAVE Run Job JENKINS SLAVE Run Job build JENKINS MASTER deploy
  54. 54. OPENSHIFT TECHNICAL OVERVIEW ● Existing CI/CD infrastructure outside OpenShift performs operations against OpenShift ○ OpenShift Pipeline Jenkins Plugin for Jenkins ○ OpenShift CLI for integrating other CI Engines with OpenShift ● Without disrupting existing processes, can be combined with previous alternative 55 EXISTING CI/CD DEPLOY TO OPENSHIFT OPENSHIFT APP EXISTING CI/CD INFRA Jenkins, Bamboo, TeamCity, etc APP build deploy S2I Buildrun job
  55. 55. OPENSHIFT TECHNICAL OVERVIEW56 OPENSHIFT PIPELINES ● OpenShift Pipelines allow defining a CI/CD workflow via a Jenkins pipeline which can be started, monitored, and managed similar to other builds ● Dynamic provisioning of Jenkins slaves ● Auto-provisioning of Jenkins server ● OpenShift Pipeline strategies ○ Embedded Jenkinsfile ○ Jenkinsfile from a Git repository apiVersion: v1 kind: BuildConfig metadata: name: app-pipeline spec: strategy: type: JenkinsPipeline jenkinsPipelineStrategy: jenkinsfile: |- node('maven') { stage('build app') { git url: 'https://git/app.git' sh "mvn package" } stage('build image') { sh "oc start-build app --from- file=target/app.jar } stage('deploy') { openshiftDeploy deploymentConfig: 'app' } } Provision a Jenkins slave for running Maven
  56. 56. OPENSHIFT TECHNICAL OVERVIEW OPENSHIFT IMAGE REGISTRY OPENSHIFT CLUSTER 57 CONTINUOUS DELIVERY PIPELINE GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY OPENSHIFT IMAGE REGISTRY OPENSHIFT CLUSTER GO LIVE? PROMOTE TO TEST PROMOTE TO UAT PROMOTE TO PROD RELEASE MANAGER NON-PROD PRODDEV TEST UAT ☒ DEVELOPER
  57. 57. MUITO OBRIGADO plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNews THANK YOU

×