DevOps Guide PDF
Document Details
Uploaded by UnparalleledMars
PXL Hogeschool
Donovan Brown
Tags
Summary
This document provides an overview of DevOps practices, tools, and concepts. It details different aspects of DevOps, including culture, practices, and tools used for faster application delivery. The text also explores various design patterns and Git principles.
Full Transcript
Visies DevOps Donovan Brown DevOps is the union of people, process and products to enable continuous delivery of value to our end users. Amazon DevOps combines culture, practices, and tools to speed up app delivery, allowing organizations to serve customers and compete more effectively Wat is Dev...
Visies DevOps Donovan Brown DevOps is the union of people, process and products to enable continuous delivery of value to our end users. Amazon DevOps combines culture, practices, and tools to speed up app delivery, allowing organizations to serve customers and compete more effectively Wat is DevOps? DevOps is een combinatie van cultuur, werkwijzen en tools die organisaties helpt om sneller applicaties en diensten te leveren, zodat ze hun producten sneller kunnen verbeteren en beter kunnen concurreren. Wie heeft het gecreëerd? Patrick Debois Wat is ESM? (Enterprise Systems Management) Deze richt zich op geavanceerde sysadmins die alles automatiseren met configuratiebeheer, systeemmonitoring en geautomatiseerde provisioning. Wat is Agile Development? Een nauwe samenwerking met alle betrokkenen, niet alleen voor het leveren van code, maar ook voor het leveren van waarde. DevOps: 3 stage conversation 1. Zorg voor de juiste mensen met de benodigde vaardigheden en motivatie. 2. Gebruik duidelijke en efficiënte werkmethoden om doelen te bereiken. 3. Lever een eindresultaat dat waarde biedt aan de klant. Foundations van DevOps - Collaboration - Automation - Continuous Monitoring - Continuous Integration - Continuous Delivery - Continuous Testing Voordelen van DevOps - Speed - Rapid Delivery - Reliability - Scale - Improved Collaboration - Security Azure DevOps Wat is het? Software As A Service (Saas) Welke features? - Azure Boards (Kanban = continue doorstroom en flexibiliteit, zonder vaste sprints, Scrum = tijdgebonden sprints met vaste rollen en ceremonies) - Azure Pipelines - Azure Repos (Links naar andere Azure tools = alles is aan elkaar gelinkt) - Azure Test Plans - Azure Artifacts Design Patterns (Originally introduced by Uncle Bob) Strategy Design Pattern UML Behavior voorbeeld Observers Design Pattern Implementatie voorbeeld Factory Design Pattern UML Command Design Pattern UML Decorator Design Pattern UML Template Method Design Pattern UML Singleton Design Pattern UML GIT Door wie gecreëerd? Linus Torvalds Git Configuration System-level configuration git config --system User-level configuration git config --global Repository-level configuration git config Git principes Staging You pick the files in the staging area that you want to commit You inspect the stage with git status Commit You commit the staged changes. You can inspect a commit with git log You can tag a commit with git tag (git tag -a v1.0 -m “Stable release”) Undoing Changes To undo a modified file, not staged git checkout HEAD -- To undo a modified file, staged git reset HEAD -- To undo stage and modified files git reset HEAD –hard To get rid of untracked files git clean -f To undo the last commit locally (use with caution on shared branches) git reset HEAD~1 To create a new commit with the undoing info git revert To add the current stage to the previous commit git commit –amend Branches To create a branch and also checkout to it git checkout -b To just create a branch git branch To delete a branch git branch -d To delete a branch from the remote repository git push origin –delete To switch to an existing branch git checkout Push To push commits to current branch git push Pull To pull the latest changes from main branch to current local branch git pull origin main (origin ) To pull from current branch git pull Merge Fast forward Moves the branch pointer up if there are no side changes (Basically you are merging with a branch that doesn’t have any changes) 3 Way Merge Combines different changes into a new commit when both (Basically you are merging with a branch that does have changes) Rebase What is rebasing Rebasing moves a branch to start from a different point, making the project history straight and tidy. How to rebase Step 1: Checkout to the other branch git checkout some-feature Step 2: Rebase branch git rebase main Rebasing vs 3 way commit Merging diverged branches often creates a cluttered history with lots of extra merge commits. Never rebase a branch that has been pushed to a public repository. Fetch Downloads updates from a remote repository (like new branches and changed to existing branches) How to fetch a remove branch git fetch [] Shortcut for fetch and merge git pull Workflows Two types of workflows Centralized Developers work alone in their local repo, then clean and merge their code into the main branch before pushing it to the shared central repo, requiring SSH access. Integrator As an integrator, you blend changes from various devs into one main project, keeping everything organized and in sync without a single bottleneck. Git Flow Main: contains only tagged (official) releases Develop: ongoing work Feature: branches from Develop => work on new features > merges into develop Release: Candidates for release => once polished can be merged into Main Hotfix: User reports error => dev creates hotfix branch from main => merges into master and develop 4. SOLID Single Responsibility Each class should have one job and one reason to change. Open Closed Extension = expendable = can add new features For example Strategy: Architecture allows adding new features Classes should be extendable without altering their source code. Liskov Substitution Subclasses should work as their base class without altering expected behavior. You can reuse a class with same properties but alter the ones that differ. Interface Segregation Split interfaces to prevent unused method dependencies. Dependency Inversion High-level modules should interact through shared abstractions, not details.