Technological Foundations of Software Development PDF
Document Details
Uploaded by WorthBagpipes
Mines Saint-Étienne
Maxime Lefrançois
Tags
Summary
This document provides a high-level overview of continuous integration and deployment practices and associated technologies, including a discussion of Agile vs. DevOps methodologies. It's related to Computer Science and software engineering concepts.
Full Transcript
Technological foundations of software development Integrate and deploy your software continuously ICM – Computer Science Major – Course unit on Technological foundations of computer science M1 Cyber Physical and Social Systems – Course unit on...
Technological foundations of software development Integrate and deploy your software continuously ICM – Computer Science Major – Course unit on Technological foundations of computer science M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development Maxime Lefrançois https://maxime-lefrancois.info online: https://ci.mines-stetienne.fr/cps2/course/tfsd/ Objectives of the session This session is designed to get you familiar with methods and tools for continuous software integration and deployment. In particular, we will cover Gitlab CI/CD, and Github Actions 2 Technological foundations of software development Integrate and deploy your software continuously Part 1: DevOps ICM – Computer Science Major – Course unit on Technological foundations of computer scienceopment M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development Maxime Lefrançois https://maxime-lefrancois.info online: https://ci.mines-stetienne.fr/cps2/course/tfsd/ DevOps DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary with Agile software development; several DevOps aspects came from the Agile methodology. — Contributors, Wikipedia https://en.wikipedia.org/wiki/DevOps There are many variants 4 https://theagileadmin.com/what-is-devops/ Agile vs DevOps DevOps is a practice of bringing development and operations teams together whereas Agile is an iterative approach that focuses on collaboration, customer feedback and small rapid releases. DevOps focuses on constant testing and delivery while the Agile process focuses on constant changes. DevOps requires relatively a large team while Agile requires a small team. DevOps leverages both shifts left and right principles, on the other hand, Agile leverage shift-left principle. The target area of Agile is Software development whereas the Target area of DevOps is to give end-to-end business solutions and fast delivery. DevOps focuses more on operational and business readiness whereas Agile focuses on functional and non-function readiness. 5 Source: https://www.guru99.com/agile-vs-devops.html 6 https://s32860.pcdn.co/wp-content/uploads/2019/11/devops-hero-1-87966cfbc9c5713ae047551c7b22985c.png Definitions Continuous Integration for every change submitted to an application - even to development branches - it’s built and tested automatically and continuously, ensuring the introduced changes pass all tests, guidelines, and code compliance standards you established for your app. Continuous Delivery not only built and tested at every code change pushed to the codebase, but, as an additional step, it’s also deployed continuously, though the deployments are triggered manually Continuous Deployment instead of deploying your application manually, you set it to be deployed automatically. It does not require human intervention at all to have your application deployed 7 https://docs.gitlab.com/ee/ci/introduction/ 8 https://docs.gitlab.com/ee/ci/introduction/ Many tools for CI/CD … Circle CI Travis CI Jenkins GitLab CI/CD GitHub Actions 2011 2011 2011 2013 2018 https://circleci.com/ http://travis-ci.com/ https://jenkins.io/ https://gitlab.com/ https://github.com/ YAML YAML Groovy YAML features/actions YAML … and others … all supporting Docker (2013) Circle CI Travis CI Jenkins GitLab CI/CD GitHub Actions 2011 2011 2011 2013 2018 https://circleci.com/ http://travis-ci.com/ https://jenkins.io/ https://gitlab.com/ https://github.com/ YAML YAML Groovy YAML features/actions Supports Docker Supports Docker Supports Docker Supports Docker YAML Supports Docker Technological foundations of software development Intégrer et déployer son logiciel en continue Part 2: Gitlab CI/CD ICM – Computer Science Major – Course unit on Technological foundations of computer scienceopment M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development Maxime Lefrançois https://maxime-lefrancois.info online: https://ci.mines-stetienne.fr/cps2/course/tfsd/ Pipelines Stag e Pipelin e Jo 14 https://docs.gitlab.com/ee/ci/introduction/ b Pipelines Stage s default: By - Build - Test - Deploy 15 Pipelines Stage s default: By - Build - Test - Deploy Job s key names YAML 16 Env variables Variable s At the project level Group level By default https://docs.gitlab.com/ ee/ci/variables/predefin ed_variables.html https://docs.gitlab.com/ee/ci/variables/README.html 17 Environments https://docs.gitlab.com/ee/ci/environments/index.html 18 Configuration of the pipeline execution Scheduled execution Configuration in the.gitlab-ci.yml file Configuration for a Job tags: to choose the “runner” stage: in which stage the job is run variables: define job variables on a job level. dependencies: list of jobs whose artifacts will be used when: When to run job. Also available: when:manual and when:delayed. allow_failure: false (by default), true script: the shell script(s) to execute. only: limit when jobs are created. Also available: only:refs, only:kubernetes, only:variables, and only:changes. except: limit when jobs are not created. Also available: except:refs, except:kubernetes, except:variables, and except:changes. image: docker image to use name:tag services: use Docker services images. Also available: services:name, services:alias, services:entrypoint, and services:command. https://docs.gitlab.com/ee/ci/yaml/ 19 Configuration of the pipeline execution Scheduled execution Configuration in the.gitlab-ci.yml file Configuration for a Job only: limit when jobs are created. Also available: only:refs, only:kubernetes, only:variables, and only:changes. except: limit when jobs are not created. Also available: except:refs, except:kubernetes, except:variables, and except:changes. https://docs.gitlab.com/ee/ci/yaml/ 20 Configuration of the pipeline execution Scheduled execution Configuration in the.gitlab-ci.yml file Configuration for a Job only: limit when jobs are created. Also available: only:refs, only:kubernetes, only:variables, and only:changes. except: limit when jobs are not created. Also available: except:refs, except:kubernetes, except:variables, and except:changes. https://docs.gitlab.com/ee/ci/yaml/ 21 Configuration of the pipeline execution Scheduled execution Configuration in the.gitlab-ci.yml file Configuration for a Job image: docker image to use name:tag services: use Docker services images. Also available: services:name, services:alias, services:entrypoint, and services:command. https://docs.gitlab.com/ee/ci/yaml/ 22 Configuration de l’exécution du pipeline Scheduled execution Configuration in the.gitlab-ci.yml file Configuration for a Job before_script after_script cache: List of files that should be cached between subsequent runs. Also available: cache:paths, cache:key, cache:untracked, cache:when, and cache:policy. variables image: defines the default image services : defines the default services https://docs.gitlab.com/ee/ci/yaml/ 23 Job artifacts: Output, use, and reuse job artifacts. Artifact s Archive available on success. Configuration (sub-list): artifacts:paths, artifacts:exclude, artifacts:expose_as, artifacts:name, artifacts:untracked, artifacts:when, artifacts:expire_in, and artifacts:reports. https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html 24 Example https://saref.etsi.org/sources/saref4lift/ 25 Example https://saref.etsi.org/sources/saref4lift/ 26 Example https://saref.etsi.org/sources/saref4lift/ 27 Technological foundations of software development Integrate and deploy your software continuously Part 3: GitHub Actions ICM – Computer Science Major – Course unit on Technological foundations of computer scienceopment M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development Maxime Lefrançois https://maxime-lefrancois.info online: https://ci.mines-stetienne.fr/cps2/course/tfsd/ GitHub Actions: GitHub's response Circle CI Travis CI Jenkins GitLab CI/CD GitHub Actions 2011 2011 2011 2013 2018 https://circleci.com/ http://travis-ci.com/ https://jenkins.io/ https://gitlab.com/ https://github.com/ YAML YAML Groovy YAML features/actions Supports Docker Supports Docker Supports Docker Supports Docker YAML Supports Docker 30 Find actions 31 Example https://github.com/HyperAgents/ns.hyperagents.org/ 32 Example https://github.com/HyperAgents/ns.hyperagents.org/ 33 Example https://github.com/HyperAgents/ns.hyperagents.org/ 34 Technological foundations of software development Integrate and deploy your software continuously ICM – Computer Science Major – Course unit on Technological foundations of computer scienceopment M1 Cyber Physical and Social Systems – Course unit on CPS2 engineering and development, Part 2: Technological foundations of software development Maxime Lefrançois https://maxime-lefrancois.info online: https://ci.mines-stetienne.fr/cps2/course/tfsd/... Your turn Complete the TODO section: https://ci.mines-stetienne.fr/cps2/course/tfsd/course-8.html#_todos 36