|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/azure-devops-realtime-project/
课程评论:没有评论
课程名称:Azure DevOps 实时项目 课程概述:在一些公司中,专门的发布团队负责处理新代码版本。例如,当前稳定版本为 23.0.0 时,他们会创建发布候选版本 23.0.0.0-RC1。如果需要额外更改,他们可能会发布 RC2 或 RC3。经过测试后,该版本将变为稳定版本 23.0.0.0。如果发布后发现错误,则会发布热修复版本。 持续交付:在成功的集成测试后,应用程序会自动部署到开发或预发布等低环境。 持续部署:如果前面的阶段都顺利,应用程序则部署到生产等高环境。许多组织在生产部署之前更倾向于手动审批。 本课程将指导您如何通过创建虚拟机(VM)作为自托管代理设置 Azure DevOps 流水线,并分别完成以下步骤: 第1步:添加 SonarQube 集成 在 Azure DevOps 中通过服务连接设置 SonarQube。向流水线添加 SonarQube 阶段,并用必要的令牌进行配置。 第2步:构建并上传工件到 JFrog 创建用于存储敏感信息(如凭证)的安全文件。使用 Maven 构建项目并将工件存储在 JFrog 中。 第3步:将工件复制到 Azure Blob 存储 创建 Azure 存储账户,并添加名为 artifacts 的容器。在 Azure 中创建服务主体并用于认证,添加存储账户密钥作为流水线变量。 第4步:将 Docker 镜像推送到 ACR 和 Docker Hub 创建 Azure 容器注册表(ACR),为 ACR 和 Docker Hub 设置服务连接。将构建的 Docker 镜像推送到这两个注册表。 第5步:部署到 Azure 容器实例(ACI) 使用流水线将 Docker 镜像部署到 ACI。 第6步:设置预发布和生产环境 在 AWS 上创建两台 Ubuntu 服务器(一台用于预发布,一台用于生产)。使用 Route 53 配置 DNS 记录,并在 Azure DevOps 中注册服务器作为部署目标。 第7步:最终部署和测试 将应用部署到预发布和生产环境。使用 ZAP 等工具进行动态应用安全测试(DAST)。通过配置的 URL 访问应用以验证部署。 第8步:处理错误和调试 展示如何通过检查日志和错误消息来调试问题。必要时修改 Dockerfile 以使用正确的 Java 版本。 结论:在下一节课中,我们将介绍使用 Terraform 的基础设施流水线,并更加详细地讨论 SAST(静态应用安全测试)和 DAST。
In some companies, a dedicated release team handles new code versions. For example, if the current stable version is 23.0.0, they create a release candidate version 23.0.0.0-RC1. If additional changes are needed, they may release RC2 or RC3. Once testing is complete, it becomes the stable version 23.0.0.0. If a bug is found after release, a hotfix version is issued.Continuous Delivery:After successful integration testing, the application is automatically deployed to lower environments like development or staging.Continuous Deployment:If everything works well in the previous stages, the application is deployed to higher environments like production. Many organizations prefer manual approval before production deployment.So, we will Set up an Azure DevOps pipeline by creating a virtual machine (VM) as a self-hosted agent Configure the VM with necessary tools and integrate it with Azure DevOps.Conclusion:In the next session, we will cover infrastructure pipelines using Terraform.We will also discuss SAST (Static Application Security Testing) and DAST in more detail.Stage 1: Adding SonarQube IntegrationSet up SonarQube in Azure DevOps using service connections.Add a SonarQube stage in the pipeline and configure it with necessary tokens.Stage 2: Building and Uploading Artifacts to JFrogCreate a secure file for storing sensitive information like credentials.Build the project using Maven and store the artifacts in JFrog.Stage 3: Copying Artifacts to Azure Blob StorageCreate an Azure Storage Account.Add a container named artifacts.Create a service principal in Azure and use it for authentication.Add storage account keys as pipeline variables.Stage 4: Pushing Docker Images to ACR and Docker HubCreate an Azure Container Registry (ACR).Set up service connections for ACR and Docker Hub.Push the built Docker image to both registries.Stage 5: Deploying to Azure Container Instance (ACI)Use the pipeline to deploy the Docker image to ACI.Stage 6: Setting Up Staging and Production EnvironmentsCreate two Ubuntu servers on AWS (one for staging and one for production).Configure DNS records using Route 53.Register the servers as deployment targets in Azure DevOps.Stage 7: Final Deployment and TestingDeploy the application to staging and production.Perform DAST (Dynamic Application Security Testing) using tools like ZAP.Verify the deployment by accessing the application via the configured URLs.Stage 8: Handling Errors and DebuggingShow how to debug issues by checking logs and error messages.Modify the Dockerfile to use the correct Java version if needed.