《用于基礎架構自動化的 CI CD 管道.pdf》由會員分享,可在線閱讀,更多相關《用于基礎架構自動化的 CI CD 管道.pdf(36頁珍藏版)》請在三個皮匠報告上搜索。
1、#CiscoLive#CiscoLiveAdrian ILIESIU,Senior Developer AdvocateaidevnetDEVNET-2117CI/CD pipelines for infrastructure automationAgenda 2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicCI/CD overviewGitLabExample of a CI/CD pipeline workflowDemoResourcesDEVNET-21173 2023 Cisco and/or its
2、affiliates.All rights reserved.Cisco Public#CiscoLiveEnter your personal notes hereCisco Webex App 4Questions?Use Cisco Webex App to chat with the speaker after the sessionFind this session in the Cisco Live Mobile AppClick“Join the Discussion”Install the Webex App or go directly to the Webex spaceE
3、nter messages/questions in the Webex spaceHowWebex spaces will be moderated by the speaker until June 9,2023.12344https:/ 2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicDEVNET-2117CI/CD overview 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveCI/CD Pipeli
4、nesPractice of integrating codecode that developers are producingCode is developed in separate branchesbranchesMultiple developersMultiple featuresWhen code is mergedmerged into a branchTesting validates changesFlush out potential bugsEnsure quality and no integrationintegration issuesContinuous Int
5、egration-SoftwareDEVNET-21176 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveCI/CD PipelinesReleases can be created and delivered at any timeHave changes met integration requirements?Push to a“stage”environmentRun additional tests and checksAll tasks are automatedContinuo
6、us Delivery-SoftwareDEVNET-21177 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveCI/CD PipelinesTakes delivery a step furtherDeploys changes to a production environmentMany different deployment strategies availableBlue/Green,Canary,RollingContinuous Deployment-SoftwareDEVN
7、ET-21178 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveCI/CD PipelinesConfiguration changes are done through automationHistorical insight into changes made to the networkValidate changes prior to configuring the networkIf an issue is introduced into the network,those cha
8、nges can be rolled back to a known good stateIntegration with change and ticketing systems for true Continuous Deployment Infrastructure AutomationDEVNET-21179GitLab 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabComplete DevOps platformProject ManagementHosted Git
9、repositoriesBuilt-in CI/CDOverviewDEVNET-211711 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabCode,issues,wikis,etc.are organized into projectsProjectsDEVNET-211712 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabCreate new projects
10、from scratch,use a template,or import an existing projectConfigurable visibilitylevels:private,internal,publicProjectsDEVNET-211713 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabView,edit,create files under or in your project(repository)FilesDEVNET-211714 2023 Cisc
11、o and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabView and managecommits within your projectCommitsDEVNET-211715 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabA version of a projectsworking treeCreate merge requestsPerform inline code reviewBr
12、anchesDEVNET-211716 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabUsed for collaborating on ideas and planning workEnable sharing and discussion of ideas/proposalsTrack status of work and tasks IssuesDEVNET-211717 2023 Cisco and/or its affiliates.All rights reserve
13、d.Cisco Public#CiscoLiveGitLabRequest to merge one branch into anotherMerge RequestsDEVNET-211718 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabFundamental building blocks for CI/CDPipelinesDEVNET-211719 2023 Cisco and/or its affiliates.All rights reserved.Cisco Pu
14、blic#CiscoLiveGitLabComposed of:Jobs What to doStages-When to run jobsA typical pipeline would contain four stagesBuild(compile)Test(unit-tests)Staging(deploy-to-stage,integration-tests)Production(deploy-to-prod)PipelinesDEVNET-211720 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public
15、#CiscoLiveGitLabUsed to run the jobs and send results back to GitLabWhen a pipeline is triggered,a Runner will git clone the repo and then execute the instructions inside of.gitlab-ci.ymlImplements a variety of executorsJobs can run in different scenariosSSH,Shell,Parallels,VirtualBox,Docker,Kuberne
16、tes,CustomRunnersDEVNET-211721 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLab.gitlab-ci.ymlDEVNET-211722 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabPipelines normally run when conditions are metWhen a branch is pushed to a repo
17、sitorySchedules enable pipeline runs at specific intervalsOnce every dayEvery FridayAny schedule as neededSchedulesDEVNET-211723 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveGitLabUseful for customizing your jobsEnvironment VariablesDEVNET-211724Example of a CI/CD Pipel
18、ine Workflow 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveDEVNET-211726Demo 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveTest environmentDEVNET-211728Dev Dev WorkstationWorkstationSource Source ControlControlInfrastructure Infrastructure as
19、 Codeas CodeNetwork Network SimulationSimulationHosting Hosting ServerServerTesting Testing FrameworkFramework 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveResources 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLivehttps:/ 2023 Cisco and/or its
20、 affiliates.All rights reserved.Cisco Public#CiscoLiveFill out your session surveys!Attendees who fill out a minimum of four session surveys and the overall event survey will get Cisco Live-branded socks(while supplies last)!32DEVNET-2117These points help you get on the leaderboard and increase your
21、 chances of winning daily and grand prizesAttendees will also earn 100 points in theCisco Live Challenge for every survey completed.2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicContinue your educationVisit the Cisco Showcase for related demosBook your one-on-oneMeet the Engineer
22、meetingAttend the interactive education with DevNet,Capture the Flag,and Walk-in LabsVisit the On-Demand Library for more sessions at www.CiscoL you#CiscoLive 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLive35Gamify your Cisco Live experience!Get points Get points for atte
23、nding this session!for attending this session!Open the Cisco Events App.Click on Cisco Live Challenge in the side menu.Click on View Your Badges at the top.Click the+at the bottom of the screen and scan the QR code:How:123435 2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicDEVNET-2117#CiscoLive