Top Banner
vRealize Automation Code Stream 入门 2019 12 19 vRealize Automation 8.0
14

vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

Jun 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

vRealize Automation Code Stream 入门

2019 年 12 月 19 日vRealize Automation 8.0

Page 2: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

您可以从 VMware 网站下载最新的技术文档:

https://docs.vmware.com/cn/。

如果您对本文档有任何意见或建议,请将反馈信息发送至:

[email protected]

VMware, Inc.3401 Hillview Ave.Palo Alto, CA 94304www.vmware.com

威睿信息技术(中国)有限公司北京办公室北京市朝阳区新源南路 8 号启皓北京东塔 8 层 801www.vmware.com/cn

上海办公室上海市淮海中路 333 号瑞安大厦 804-809 室www.vmware.com/cn

广州办公室广州市天河路 385 号太古汇一座 3502 室www.vmware.com/cn

版权所有 © 2020 VMware, Inc. 保留所有权利。 版权和商标信息

vRealize Automation Code Stream 入门

VMware, Inc. 2

Page 3: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

目录

1 vRealize Automation Code Stream 是什么 4

2 What Does vRealize Automation Code Stream Do 5

3 Before You Begin 8

4 How Do I Set It Up 10

5 我还可以使用它执行哪些操作 13

VMware, Inc. 3

Page 4: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

vRealize Automation Code Stream 是什么 1vRealize Automation Code Stream™ 是一个持续集成和持续交付 (CICD) 软件,使用该软件可以快速可靠地

以较小开销交付软件。vRealize Automation Code Stream 支持部署旧版单体应用程序以及在多个云上运行

的 Docker 和 Kubernetes 容器。

使用 vRealize Automation Code Stream,您可以创建管道来自动执行整个 DevOps 生命周期,同时还可以

使用现有开发工具(例如 Git 和 Jenkins)。

vRealize Automation Code Stream 可简化生成、测试和部署应用程序的功能,还可以提高将源代码从开发

存储库发布到测试存储库再发布到生产存储库这整个流程中的效率。vRealize Automation Code Stream 支持自定义应用程序和商业应用程序以及诸如蓝图等对象。

VMware, Inc. 4

Page 5: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

What Does vRealize Automation Code Stream Do 2vRealize Automation Code Stream models the tasks in your software release process, and automates the development and test of developer code to release it to production.

It integrates your release process with developer tools to accomplish specific tasks, and tracks all code artifacts and versions.

Cloud Assembly 的应用程序 YAML 或蓝图

存储库 Git Kubernetes K8S

群集上部署的App 或蓝图

CICD 管道

开发 测试 验收测试 生产

生成,配置 生成,配置,提出问题

生成,配置生成,配置,提出问题,

使用仪表板

Git Jenkins

Bamboo

Code Stream 内部版本

Bamboo

JIRA

电子邮件

Code Stream 内部版本

Jenkins

JIRA

Kubernetes

Docker

使用 Git 存储库的 VMware Code Stream

You create a pipeline that runs actions to build, deploy, test, and release your software. vRealize Automation Code Stream runs your software through each stage of the pipeline until it is ready to be released to production.

You integrate your pipeline with one or more DevOps tools such as data sources, repositories, or notification systems, which provide data for the pipeline to run.

For example, you might need to use several endpoints in a pipeline that downloads and deploys a Kubernetes application from GitHub to a Kubernetes cluster.

VMware, Inc. 5

Page 6: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

vRealize Automation Code Stream integrates with various endpoint types.

表 2-1. vRealize Automation Code Stream Integrates with DevOps Tools

DevOps endpoint What it does

Git Pulls developer code from the repository and works with the Git trigger to trigger pipelines when developers check in code.

Kubernetes Automates the steps to deploy, scale, and manage containerized applications.

vRealize Automation Code Stream Build

Creates native builds for continuous integration instead of using third-party integrations.

Jenkins Builds code artifacts.

Email Sends notifications to users.

JIRA Creates a ticket when a pipeline fails.

Bugzilla Creates and track bugs.

Why You Use vRealize Automation Code StreamAs a developer or a DevOps administrator, you use vRealize Automation Code Stream to automate your entire DevOps release lifecycle, while you continue to use your existing development tools. vRealize Automation Code Stream gives you:

n Easy automation

n Out-of-the-box plug-ins that work without open source

vRealize Automation Code Stream 入门

VMware, Inc. 6

Page 7: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

n Simple modeling experience and pipeline as code

n Straightforward integration with VMware Cloud PKS

n Reporting and insights

n End-to-end visibility with detailed dashboards

n Custom dashboards

n DevOps metrics and insights

n Governance

n Role-based access

n Secret and restricted variables, and approvals

n Projects

vRealize Automation Code Stream simplifies the deployment of software applications as your source code runs through the development and test phases, and is released to production. It also increases your productivity by using the Git trigger. When a developer checks in code, vRealize Automation Code Stream can trigger the pipeline and automate the build, test, and deployment of your application.

You can use vRealize Automation Code Stream with other vRealize Automation components.

n Deploy a vRealize Automation Cloud Assembly blueprint, and use the parameter values that the blueprint exposes.

n Publish your pipeline to vRealize Automation Service Broker so that other members of your team can request and deploy it to their cloud regions.

For other ways to use vRealize Automation Code Stream, see 第 5 章 我还可以使用 vRealize Automation Code Stream 执行哪些操作.

vRealize Automation Code Stream 入门

VMware, Inc. 7

Page 8: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

Before You Begin with vRealize Automation Code Stream 3As a DevOps administrator or developer, you need to sign up for a MyVMware account and log in before you can begin to use vRealize Automation Code Stream.

Log InAfter you log in, you can create, run, and manage pipelines.

表 3-1. Preparing to Use vRealize Automation Code Stream

Step Action What you need to do

1 Create a MyVMware account. Use your corporate email address to create your MyVMware account at https://my.vmware.com/.

2 Log in to vRealize Automation. Open HTTPS port 443 to outgoing traffic with access through the firewall to:

n *. vmwareidentity.com

n gaz.csp-vidm-prod.com

n *. vmware.com

3 Open the vRealize Automation Code Stream service.

Getting Started for DevOps AdministratorsAs a DevOps administrator, you have the Administrator role, and can create endpoints so that you can ensure that working instances are available for developers. You can create, manage, and trigger pipelines, and more.

For example, your developers might need to connect their pipeline tasks to a data source, repository, or notification system. These components provide data for their pipelines to run.

You can also integrate vRealize Automation Code Stream with other vRealize Automation components.

n Use vRealize Automation Cloud Assembly to deploy blueprints.

n Use vRealize Automation Service Broker to publish pipelines and trigger them.

VMware, Inc. 8

Page 9: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

Getting Started for DevelopersAs a developer, you use vRealize Automation Code Stream to build and run pipelines, and monitor pipeline activity on the dashboards. You'll need the User role.

After you run a pipeline, you'll want to know whether:

n Your code succeeded through all stages of your pipeline. Results appear in Executions.

n Your pipeline failed and what caused the failure. Key errors appear in Dashboards.

Using the Smart TemplatesTo save time when you create a pipeline that natively builds, tests, and deploys your application, use the smart templates. Each template asks you several questions, and creates a pipeline based on how you answer the questions.

n Your build goals, environments, and where your source code resides.

n Your deployment goals, and where you intend to deploy your application. For example, the smart template identifies your existing Kubernetes clusters. You can then select a cluster to use when you build and deploy your application.

After the template creates the pipeline, you can modify the pipeline further to make it even more specific to your needs.

vRealize Automation Code Stream 入门

VMware, Inc. 9

Page 10: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

How Do I Set Up vRealize Automation Code Stream 4As an administrator who sets up vRealize Automation Code Stream, after you log in, you can add endpoints, create and run pipelines, and view the results.

vRealize Automation Code Stream connects to endpoints to obtain data for your pipelines to run. In this use case, VMware Code Stream connects to a GitLab repository so that your pipeline can download a Kubernetes file.

A getting started process is also available as a guided setup in the vRealize Automation Code Stream user interface. Click the Help icon and click Guided Setup.

前提条件

n Verify that an on-premises GitLab or GitHub repository exists and contains the code that your pipeline will use.

步骤

1 Add a Git endpoint to connect vRealize Automation Code Stream to your on-premises GitLab repository.

a Click Endpoints.

b Select the Git endpoint type, and enter a name and description.

c Enter the remaining information.

d To test the connection to the endpoint, click Validate, then save the endpoint.

VMware, Inc. 10

Page 11: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

2 Click Pipelines, create a pipeline, and add a task that uses the Git endpoint. You can optionally add an email notification.

3 Save your pipeline, then click Enable to enable it to run.

vRealize Automation Code Stream 入门

VMware, Inc. 11

Page 12: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

4 When the pipeline card is enabled, click Run.

5 Click Executions, and watch your pipeline run.

6 If the pipeline fails, correct the problem and run it again.

7 Click Dashboards, and select your pipeline dashboard so that you can monitor the pipeline activity.

Your pipeline ran, and downloaded the developer file from a GitLab instance. The pipeline task deployed the application to a Kubernetes cluster, and you monitored all the activity on the pipeline dashboard.

后续步骤

If you don’t find the information you need here, you can get more help in the product.

n Click and read the signposts and tooltips in the user interface to get the context-specific information that you need where and when you need it.

n Open the In-product support panel and read the topics that appear for the active user interface page. You can also search in the panel to get answers to questions.

vRealize Automation Code Stream 入门

VMware, Inc. 12

Page 13: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

我还可以使用 vRealize Automation Code Stream 执行哪些操作

5作为 DevOps 管理员或开发人员,您可以使用 vRealize Automation Code Stream 创建更复杂的管道,以

用于对 DevOps 发布生命周期中的步骤进行建模并自动执行这些步骤。

要了解... 请参见使用和管理

它是什么以及您可以执行的操作 它是什么及其工作原理

对发布流程进行建模 设置以对发布流程进行建模

计划 CICD、CI 或 CD 原生内部版本,并创

建管道

规划本地构建、集成和交付代码

用例 如何持续将来自 GitHub 或 GitLab 存储库的代码集成到管道中

还有更多!

有关使用 vRealize Automation Code Stream 可以执行哪些操作的详细信息,请使用 vRealize Automation Code Stream 的帮助面板中的产品内置帮助。

使用产品内置帮助,可以了解有关这些功能以及其他功能的信息:

n 与端点通信

n 使用受限制的资源和变量

n 使用项目

n 在开发人员更新代码时触发管道

VMware, Inc. 13

Page 14: vRealize Automation Code Stream 入门 - vRealize Automation 8 · 2020-01-10 · vRealize Automation Code Stream simplifies the deployment of software applications as your source

n 在自定义仪表板上跟踪管道的 KPI

vRealize Automation Code Stream 入门

VMware, Inc. 14