Top Banner
Getting Started with VMware Code Stream 18 MAY 2020 VMware Code Stream VMware vRealize Automation Cloud
17

Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

May 20, 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: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

Getting Started with VMware Code Stream

18 MAY 2020VMware Code StreamVMware vRealize Automation Cloud

Page 2: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

You can find the most up-to-date technical documentation on the VMware website at:

https://docs.vmware.com/

If you have comments about this documentation, submit your feedback to

[email protected]

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

Copyright © 2020 VMware, Inc. All rights reserved. Copyright and trademark information.

Getting Started with VMware Code Stream

VMware, Inc. 2

Page 3: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

Contents

1 What Is VMware Code Stream 4

2 What Does VMware Code Stream Do 5

3 Before You Begin 8

4 How Do I Set It Up 10

5 What Else Can I Do With It 16

VMware, Inc. 3

Page 4: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

What Is VMware Code Stream 1VMware Code Stream™ is continuous integration and continuous delivery (CICD) software that enables you to deliver software rapidly and reliably, with little overhead. VMware Code Stream supports deploying monolithic legacy applications, as well as Docker and Kubernetes containers running on multiple clouds.

With VMware Code Stream, you create pipelines that automate your entire DevOps lifecycle while using existing development tools such as Git and Jenkins.

VMware Code Stream simplifies the ability to build, test, and deploy your applications, and increases your productivity as you release source code from the development repository, through testing, to production. VMware Code Stream supports custom and commercial applications, and objects such as blueprints.

VMware, Inc. 4

Page 5: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

What Does VMware Code Stream Do 2VMware 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.

Application YAML or Blueprint from Cloud Assembly

RepositoryGit Deployed App

or BlueprintOn Kubernetes

K8S cluster

CICD Pipeline

Development Test AcceptanceTest Production

Build,Configure

Build,Configure,

Raise IssueBuild,

Configure

Build, Configure,Raise Issue,

Use Dashboards

Git Jenkins

Bamboo

Code StreamBuild

Bamboo

JIRA

Email

Code StreamBuild

Jenkins

JIRA

Kubernetes

Docker

Code Stream with Git repository

You create a pipeline that runs actions to build, deploy, test, and release your software. VMware 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. It also connects to remote sources through a cloud proxy.

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: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

VMware Code Stream integrates with various endpoint types.

Table 2-1. VMware 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.

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.

For a complete list of supported endpoints, see What are Endpoints.

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

n Easy automation

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

Getting Started with VMware Code Stream

VMware, Inc. 6

Page 7: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

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

VMware 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, VMware Code Stream can trigger the pipeline and automate the build, test, and deployment of your application.

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

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

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

For other ways to use VMware Code Stream, see Chapter 5 What Else Can I Do with Code Stream.

Getting Started with VMware Code Stream

VMware, Inc. 7

Page 8: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

Before You Begin with VMware 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 VMware Code Stream.

Log InYou use your Cloud Account to access and use VMware Code Stream.

After you log in, you can create, run, and manage pipelines.

Table 3-1. Preparing to Use VMware 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 Cloud.

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 VMware 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. Endpoints can be cloud-based or remote. To connect VMware Code Stream to on-premises remote endpoints, your developers need a cloud proxy.

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

n Use VMware Cloud Assembly to deploy blueprints.

VMware, Inc. 8

Page 9: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

n Use VMware Service Broker to publish pipelines and trigger them.

For more information about how you can use VMware Code Stream, see What is VMware Code Stream and how does it work.

Getting Started for DevelopersAs a developer, you use VMware 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.

For more information about how you can use VMware Code Stream, see What is VMware Code Stream and how does it work.

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.

For more information about planning your native build and use the smart templates, see Planning to natively build, integrate, and deliver your code.

Getting Started with VMware Code Stream

VMware, Inc. 9

Page 10: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

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

Code Stream connects to on-premises endpoints through a cloud proxy. Your network configuration and the location of your on-premises endpoints in those networks determine how many cloud proxy instances you need. If all your on-premises endpoints are in the same network, install a single cloud proxy. If your on-premises endpoints reside in different networks, install one cloud proxy for each independent network. Then, in the endpoint configuration in Code Stream, select the cloud proxy that resides in the same network as your endpoint.

In this use case, you add a cloud proxy that connects your cloud-based Code Stream service to an on-premises GitLab repository so that your pipeline can download a Kubernetes file.

To add the cloud proxy, you download the OVA from VMware Cloud Assembly, and install it in your vCenter Server instance. Then, in Code Stream you add a Git endpoint that Code Stream uses to connect through the cloud proxy to the on-premises repository. You will then create a pipeline that obtains the developer code from the on-premises GitLab repository, and deploys it to a Kubernetes cluster.

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

VMware, Inc. 10

Page 11: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

In VMware Cloud Assembly, add aCloud Proxy to connect your

cloud-based VMware Code Streamto your on-premises remote GitHub

repository.Cloud Proxies > New

In VMware Code Stream, add a Git endpoint, and select the

Cloud Proxy.Endpoints > New Endpoint

Create a pipeline and add thestages and tasks that model your

software release process.Pipelines > New Pipeline > Blank

Canvas

Enable and run your pipeline toexecute the stages and tasks.

Pipelines > Your Pipeline > Enable> Run

Watch the pipeline execution as your pipeline runs.

Executions

Monitor the results of your pipelinerun on the dashboard.

Dashboards > Pipeline Dashboards

Go to your Kubernetes cluster andverify that your pipeline deployed

your application.

Prerequisites

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

n To connect your cloud-based Code Stream service to your on-premises GitLab or GitHub repository, verify that you can access VMware Cloud Assembly so that you can add a cloud proxy.

Getting Started with VMware Code Stream

VMware, Inc. 11

Page 12: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

Procedure

1 Set up the cloud proxy that your cloud-based Code Stream uses to connect to your on-premises GitLab repository.

Or, if a local cloud proxy is available, when you add your Git endpoint you can select Default for the cloud proxy. In this use case example, the cloud proxy is named codestream.

a To add a cloud proxy, download the cloud proxy OVA, and install it in your vCenter Server instance.

b Go to your VMware Cloud Assembly service, click Cloud Proxies, click New, and install the cloud proxy.

2 Add a Git endpoint to connect Code Stream to your on-premises GitLab repository.

a Click Endpoints.

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

c Select the cloud proxy that you created, which in this use case example is named codestream. Or, to use a local cloud proxy select Default.

Getting Started with VMware Code Stream

VMware, Inc. 12

Page 13: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

d Enter the remaining information and the token.

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

Getting Started with VMware Code Stream

VMware, Inc. 13

Page 14: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

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

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

Getting Started with VMware Code Stream

VMware, Inc. 14

Page 15: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

5 When the pipeline card is enabled, click Run.

6 Click Executions, and watch your pipeline run.

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

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

Results

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.

What to do next

To learn more about using Code Stream, see What is VMware Code Stream and how does it work.

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.

Getting Started with VMware Code Stream

VMware, Inc. 15

Page 16: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

What Else Can I Do with Code Stream 5As a DevOps administrator or developer, you can use Code Stream to create more complex pipelines that model and automate the steps in your DevOps release lifecycle.

To learn about... See Using and managing

What it is and what you can do What is it and how does it work

Modeling your release process Setting up to model my release process

Planning a CICD, CI, or CD native build, and creating the pipeline

Planning to natively build, integrate, and deliver your code

Use cases How do I continuously integrate code from my GitHub or GitLab repository into my pipeline

And more!

For more information about what you can do with Code Stream, use the in-product help in the help panel in Code Stream.

By using the in-product help, you can learn about these features and much more:

n Communicating with cloud-based and on-premises remote endpoints

n Working with restricted resources and variables

n Working with projects

n Triggering a pipeline when developers update code

VMware, Inc. 16

Page 17: Getting Started with VMware Code Stream - VMware Code Stream · 2020-03-27 · What Is VMware Code Stream 1 VMware Code Stream ™ is continuous integration and continuous delivery

n Tracking KPIs for your pipelines on custom dashboards

Getting Started with VMware Code Stream

VMware, Inc. 17