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.

A Brief About DevOps and its Practices

DevOps is a term used to refer to a set of practices that emphasize the collaboration and communication of both software developers and information (IT) professionals while automating the process of software delivery and infrastructure changes.

DevOps in itself is not a tool, but the combination of cultural philosophies, practices, and tools that increase an organization’s ability to deliver applications and services faster against traditional software development and infrastructure management processes.

Learn more about:
What is DevOps?
» How to adopt a DevOps Model?
» DevOps Practices.
» Benefits of DevOps.
» DevOps Tools deep dive.
» Continuous Integration/Deployment, Monitoring, Logging, and Testing.
» AWS DevOps.
» Putting it all together.

  • Entre para ver os comentários

A Brief About DevOps and its Practices

  1. 1. A Brief About DevOps and its Practices We manage learning. “Building an Innovative Learning Organization. A Framework to Build a Smarter Workforce, Adapt to Change, and Drive Growth”. Download now!
  2. 2. NetCom Learning
  3. 3. NetCom Learning – Managed Learning Services
  4. 4. DevOps:Terms DevOps (development and operations) is an enterprise software development phrase used to mean a type of agile relationship between Development and IT Operations. The goal of DevOps is to change and improve the relationship by advocating better communication and collaboration between the two business units. Continuous delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time. It aims at building, testing, and releasing software faster and more frequently. Continuous software development is an umbrella term that describes several aspects of iterative software application development, including continuous integration, continuous delivery, continuous testing and continuous deployment. Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. Software Delivery is the process of getting a software product to market. Your particular “market” and “product” could be: An alpha product to an early adopter. The next release of an internal operations product. A first release of a main product for a major company Continuous Delivery (CD) is the application development discipline that takes Agile to its logical conclusion, creating software that is always ready to release. It does this by building upon and extending Agile, CI and DevOps practices and tools to transform the way software is delivered. Automate everything.
  5. 5. DevOps LifeCycle
  6. 6. DevOps Model
  7. 7. Benefits of DevOps
  8. 8. DevOps Tools
  9. 9. A workflow
  10. 10. Maven build lifecycle
  11. 11. Maven build lifecycle Phases
  12. 12. Goal A goal represents a specific task which contributes to the building and managing of a project. It may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of the build lifecycle by direct invocation.
  13. 13. Goal
  14. 14. Clean lifecycle
  15. 15. Points to Remember
  16. 16. Build Lifecycle Phases
  17. 17. Repository
  18. 18. Local Repository
  19. 19. Central Repository
  20. 20. Remote Repository
  21. 21. Plugins
  22. 22. Plugins: imp points
  23. 23. Task: do it
  24. 24. Archetype
  25. 25. Snapshot
  26. 26. Dependency Management
  27. 27. Deployment Automation
  28. 28. Solutions
  29. 29. case jenkins and github Setup: set up a Jenkins job which builds a project of a GitHub repository. Additionally, the build process is automatically started when a contributor pushes to the respective GitHub repository.
  30. 30. Complete Solution
  31. 31. Jenkins • Open source CI/CD project • On premise tool • Supports plugins • Integrates with 3rd party tools and services
  32. 32. Organisation folder Workflow Multibranch Pipeli ne New in Jenkins 2
  33. 33. Workflow Multibranch • Automatic Workflow (job) creation in Jenkins per new branch in the repository (assuming webhooks are registered from SCM to Jenkins) • Build specific to that child-branch and its unique scm change and build history • Automatic job pruning/deletion for branches deleted from the repository, according to the settings • Flexibility to individually configure branch properties, by overriding the parent properties, if required • * Source: Jenkins.io
  34. 34. Organization folder • Works on project space level within organization SCM. • Provides ability to create and manage workflow jobs for all repositories • Automatically removes jobs for merged back branches • Simplified configuration that requires only project name and credentials • Provides pull request testing functionality. Jenkins will create a new CD pipeline when a pull-request is submitted and build/test the pull-request.
  35. 35. Setting up Organization folder
  36. 36. Pipeline Execution
  37. 37. Pipeline definition • Pipelines are “Jenkins job definitions” enabled by the Pipeline plugin • Based on Groovy programming language • Pipelines leverage the power of multiple steps to execute both simple and complex tasks according to parameters that you establish • Pipelines can build code and orchestrate the work required to drive applications from commit to delivery • * Source: Jenkins.io
  38. 38. Pipeline attributes • Durable: Pipelines can survive both planned and unplanned restarts of your Jenkins master. • Pausable: Pipelines can optionally stop and wait for human input or approval before completing the jobs for which they were built. • Versatile: Pipelines support complex real-world requirements, including the ability to fork or join, loop, and work in parallel with each other. • Extensible: The Pipeline plugin supports custom extensions to its DSL (domain scripting language) and multiple options for integration with other plugins. • * Source: Jenkins.io
  39. 39. Pipeline pros • Supports complex, real-world, CD Pipeline requirements: pipelines can fork/join, loop, parallel, to name a few • Resilient - pipeline executions can survive master restarts • Pausable - pipelines can pause and wait for human input/approval • Efficient - pipelines can restart from saved checkpoints • Visualized - Pipeline StageView provides status at-a-glance dashboards including trending • Artifact traceability with fingerprinting - support tracking versions of artifacts using file fingerprinting
  40. 40. Pipeline vocabulary • Step is a single task that is part of build sequence • Node typically enlists help from available executors on agents to: •Schedules the steps contained within it to run by adding them to the Jenkins build queue •Creates a workspace where resource-intensive processing can occur without negatively impacting your pipeline performance • Stage is a logically distinct part of the execution of any task, with parameters for locking, ordering, and labeling its part of a process relative to other parts of the same process • * Source: Jenkins.io
  41. 41. step([$class: 'ArtifactArchiver', artifacts: '**/target/*.war’, fingerprint: true])
  42. 42. The Jenkinsfile • Jenkinsfile is a container for pipeline (or other) script, which details what specific steps are needed to perform a job for which you want to use Jenkins. • Jenkinsfile can be created with text/Groovy editor, or through the configuration page on of Jenkins instance. • Provides DSL steps with most common build tasks (https://jenkins.io/doc/pipeline/steps/) • Can be extended by external shell scripts and import user Groovy scripts
  43. 43. DSL examples • sh, bat - script execution for Unix and Windows system • scm, checkout - checkout source code from VCS • readFile, writeFile, fileExists - file handling • stash, unstash - share workspace results between stages • withEnv, evn.Foo, $BUILD_NUMBER - getting and setting variables • parallel - set up concurrent tasks
  44. 44. node('nodeJs') { currentBuild.result = "SUCCESS" try { stage('Checkout') checkout scm stage('Test') env.NODE_ENV = "test" print "Environment will be : ${env.NODE_ENV}" sh 'node -v && npm prune && npm install && npm test' stage('Build Docker') sh './dockerBuild.sh' stage('Deploy') echo 'Push to Repo ssh to web server and tell it to pull new image' sh './dockerPushToRepo.sh' stage('Cleanup') echo 'prune and cleanup' sh 'npm prune && rm node_modules -rf' mail body: 'project build successful', from: 'xxxx@yyyyy.com', replyTo: 'xxxx@yyyy.com', subject: 'project build successful', to: 'yyy@yy.com' } catch (err) { currentBuild.result = "FAILURE" def specificCause = currentBuild.rawBuild.getCause(hudson.model.Cause$UserIdCause) mail body: "project build error is here: ${env.BUILD_URL}" , from: 'xxxx@yyyy.com', replyTo: 'yyyy@yyyy.com', subject: 'project build failed', to: 'zz@yy.com' throw err }}
  45. 45. Master-agent architecture • Master node has a list of all configured agents • Master node starts required Agents and passes build steps from Jenkinsfile • All “hard work” is done by Agents Http: 8080 Slave: 50000 Mast er Agent nodejs Agent java Agent golang Slave: 50000 Slave: 50000 Slave: 50000
  46. 46. Jenkins in Kubernetes
  47. 47. Jenkins usage across teams Nan a Bet a Pi ... Jenkins agent images Source code + Pipeline libraries
  48. 48. What makes "Pipeline as a code" valuable for build/deployments in Newsweaver? • Organization folders - enable Jenkins to automatically detect and include any new repositories within them as resources. • Jenkinsfile as part of source code - A Jenkinsfile is a container for your pipeline (or other) script, which details what specific steps are needed to perform a job for which you want to use Jenkins. • Groovy is good - Jenkinsfiles are written as Groovy scripts which makes them easy to write and add complex logic • Ability to record test results and artifacts • Call agent for help - build tasks can be distributed and assigned to remote nodes. • DRY - Pipeline can reuse build steps stored in SCM which can allow us to avoid code duplication in all branches • Inputs - pipelines can be programed with pauses/human interaction • Concurrent build actions - with a help of Parallel Test Executor we can split steps in parallel parts • Active community - there are plenty code examples, best practices, tutorials on the web
  49. 49. New & noteworthy features • Blue Ocean - new UI tailored pipelines as a central theme to the Jenkins user experience • Visual Pipeline Editor - helps to make things clearer for a range of users, to help with Workflow adoption
  50. 50. Blue Ocean (https://jenkins.io/projects/blueocean/)
  51. 51. Visual Pipeline Editor (https://www.cloudbees.com/blog/introducing-experimental-visual-pipeline-editor)
  52. 52. Watch the Live Demonstration Watch the recorded webinar here!
  53. 53. Recommended Courses NetCom Learning offers a comprehensive portfolio for DevOps training options. Please see below the list of recommended courses: DevOps Engineering on AWS Check out more DevOps training options with NetCom Learning – CLICK HERE
  54. 54. Our live webinars will help you to touch base a wide variety of IT, soft skills and business productivity topics; and keep you up to date on the latest IT industry trends. Register now for our upcoming webinars: A Brief on MS-Access 2016 and its Integration – April 25 How About Cloud Computing in the Current Era? – April 27 Agile Project Management – May 02 5 Practices of Exemplary Leadership – May 04 Networking Fundamentals (Part. 1) – May 09
  55. 55. Special Promotion Whether you're learning new IT or Business skills, or you are developing a learning plan for your team, now you can register for our Guaranteed to Run classes with confidence. From Microsoft, to CompTIA, to CISSP; all classes delivered by top-notch instructors in in- person Instructor-led Classroom or Live Online. Learn more»
  56. 56. To get latest technology updates, please follow our social media pages!
  57. 57. THANK YOU !!! We manage learning. “Building an Innovative Learning Organization. A Framework to Build a Smarter Workforce, Adapt to Change, and Drive Growth”. Download now!

×