您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > 亚马逊AWS 基于AWS的DevOps实践指南_王毅
基于AWS的DevOps实践指南基于AWS的DevOps实践指南亚马逊高级解决方案架构师,区域主管王毅亚马逊高级解决方案架构师,区域主管王毅什么是DevOps?“DevOps(英文Development和Operations的组合)代表一种文化、运动或实践。旨在促进软件交付和基础设施变更软件开发人员(Dev)和IT运维技术人员(Ops)之间的合作和沟通。它的目的是构建一种文化和环境使构建,测试,发布软件更加快捷,频繁和可靠.”Source:为什么需要DevOps?因为我们不希望事情是这样的…为什么需要DevOps?快速迭代,敏捷开发TimeChange瀑布式开发,版本发布少TimeChange我们希望…为什么需要DevOps?怎么实现DevOps?怎么实现DevOps?从软件开发的角度看DevOps逻辑与控制易用多语言的支持自动化的基础基础设施和操作系统平台APISDK框架/工具代码AWS对DevOps的全面支持程序,命令行,脚本Python,Java,PHP,Node.js,…RESTAPI基础服务平台APISDK框架/工具代码基于AWS的DevOps实践要素API&SDKCode&CLIAWSServices代码和命令行CloudFormationCodeDeployOpsWorksElasticBeanstalk第三方服务AnsibleSaltstack…Code&CLI代码和命令行操作AWS服务的三种方式APIsandSDKsManagementConsoleCommandLineInterfaceDevOps基础AWSTools(SDK,CLI,IDE,etc.):–StarttwoEC2instancesCLI-AddTagtoEC2instancesawsec2create-tags--resourcesi-ffb064c7i-8eb561b6--tagsKey=Name,Value=QConEC2大规模基础架构的DevOps需要框架和工具AWSDevOps服务适用场景ProvisionDeployMonitorCustomizationConvenienceCloudFormationCodeDeployCloudWatchBeanstalkOpsWorksIAMCloudFormation基础平台模板化•简化AWS服务的部署,快速部署一个Stack•模板化基础平台•CloudFormation自动解决资源部署的先后和依赖关系•版本控制•第三方管理工具可以通过API集成CloudFormationInfrastructureasCodeSamples:基于模板的快速部署CodeDeployAgentAgentAgentAgentAgentAgentDeploymentGroupDeploymentAmazonS3GitHubApplicationBundle自动化应用部署DeploymentConfigurationRollingupdatesv2v1AutoScalingsupportv2v2v2CustomizedInstallfiles:-source:/web_files/destination:/var/:BeforeInstall:-location:setup/install_dep.shApplicationStart:-location:setup/start_server.sh-location:setup/start_logger.shApplicationStop:-location:setup/stop_server.sh-location:setup/flush_logs.shApplicationSpecificationFileversion:0.0os:linuxfiles:-source:/destination:/var/:BeforeInstall:-location:scripts/install_dependencies.shtimeout:300runas:rootAfterInstall:-location:scripts/change_permissions.shtimeout:300runas:rootApplicationStart:-location:scripts/start_server.shtimeout:300runas:rootApplicationStop:-location:scripts/stop_server.shtimeout:300runas:rootDemoSnapshotOpsWorksOpsWorkAWSOpsWorksisaflexibleapplicationmanagementsolutionwithautomationtoolsthatenableyoutomodelandcontrolyourapplicationsandtheirsupportinginfrastructure.OpsWorks工作原理OpsWorksBackendOpsWorksAgentAmazonEC2,AmazonEBS,EIP,AmazonVPC,ElasticLoadBalancing….Auto-Scaling,Auto-Healing….On-instanceexecutionviaChefclient/zeroCommandJSONCommandLog+Status大大简化了Chef环境的搭建LifecycleeventsBuilt-inandCustomChefRecipesCustomeRecipeDemo–创建目录ElasticBeanstalk保存配置为A/B测试保存配置,这样可以很容易的复制和搭建环境应用程序版本所有的应用程序版本都存储在S3上.代码同样可以从Git推送!ElasticBeanstalk工作原理Application蓝绿部署CLIworkflowInitialappdeployment:$gitinit.$gitadd.InitializeyourGitrepository01Addyourcode04$ebinit$gitcommit–m“v1.0”CreateyourElasticBeanstalkapp02Commit05Followthepromptstoconfiguretheenvironment03Createtheresourcesandlaunchtheapplication06$ebcreateCLIworkflowUpdateyourapp:Updateyourcode01$gitadd.$gitcommit–m“v2.0”$ebdeployPushthenewcode02Monitorthedeploymentprogress03$ebstatusAmazonCloudWatchAWSIAM(Identity&AccessMgmt)MonitorresourcesManageusers,groups&permissions贯彻始终的安全与监控ProvisionDeployMonitorCustomizationConvenienceCloudFormationCodeDeployCloudWatchBeanstalkOpsWorksIAM
本文标题:亚马逊AWS 基于AWS的DevOps实践指南_王毅
链接地址:https://www.777doc.com/doc-6165097 .html