As a cloud administrator who has recently added a new cloud account, you want to begin managing some of the vCenter Server workloads using Cloud Assembly and Service Broker. This tutorial guides you through the onboarding process and how to set up a few of the management options for your existing vSphere workloads.
The sample management tasks include adding the resources to a project, creating and applying an approval policy in Service Broker, and running a few day 2 actions on the resources to demonstrate the life cycle management tools and to trigger the approval policy.
This tutorial assumes that although you might be relatively new to Cloud Assembly, you have configured new vSphere cloud account. When you add the cloud account, Cloud Assembly discovers the currently unmanaged resources on your vSphere instance.
What to do first
- Add your new vCenter Server account. For additional instructions, see Create a vCenter cloud account in vRealize Automation.
- Verify that your user account has at least Cloud Assembly Administrator and Service Broker Administrator service roles. See What are the vRealize Automation user roles.
- To properly test the approval policy from the perspective of one of your users, verify that you have a user account that has only the following user roles. In this tutorial, the user is named Sylvia.
- Organization Member
- Cloud Assembly User
- Service Broker User
For more information about user roles, see What are the vRealize Automation user roles.
Step 1: Verify that Cloud Assembly discovered the resources
When you add a vCenter Server account, Cloud Assembly discovers the resources on the vCenter Server instance. You can verify that the machines that you want to begin managing are available to onboard.
- In Cloud Assembly, select .
- In the grid, review the Origin and Account/Region.
The Discovered origin type indicates that the machine is discovered on your vSphere instance rather than deployed by vRealize Automation or already onboarded.
In this example, the Account/Region isvCenter Account / wld01-DC
.
Step 2: Create a target project
Create a project that you can assign the onboarded machines to. To manage the resources, they must be part of a project that includes the source cloud zone on which they were originally deployed.
To test this tutorial, you must have another user who is not an administrator. In this step, as an administrator, you add Sylvia as the project member.
For more information about projects, see Adding and managing Cloud Assembly projects.
- In Cloud Assembly, select
- On the Projects page, click New Project.
- Enter the project Name.
In this tutorial, the project name is Onboarding Project.
- Click the Users tab.
- Click Add Users and add at least one user as at least a project member.
In this tutorial, you add Sylvia.
- Click Add.
- Click Add Users and add at least one user as at least a project member.
- Click Provisioning.
- Click Add Zone.
- Click Cloud Zone.
- Select the account/region you identified in Step 1.
In this tutorial, the sample value is vCenter Account / wld01-DC.
- Click Add.
- Click Create.
Step 3: Create and run an onboarding plan
As a cloud administrator, you onboard discovered machines from your vSphere instance so that you can apply governance and manage the resources with day 2 actions.
For more information about onboarding plans, see What are onboarding plans in Cloud Assembly.
- In Cloud Assembly, select , and then click New Onboarding Plan.
- Enter the onboarding information.
Setting Sample Value Plan name wld01-DC Onboarding Plan Cloud account vCenter Account Default project Onboarding Project - Click Create.
- Add the machines that you want to onboard.
Do not run the onboarding plan until you complete all of the following steps.
- Click Machines, and then click Add Machines.
- Select the machines that you want to include in the plan, and then click OK.
For this tutorial, only two machines are selected.
- In the Create Deployments dialog box, select Create plan deployments for each machine, and then click Create.
You select this option when you want the machines as individual deployments so that you can manage them as individual resources.
- The selected machines are added to the list.
- Rename the deployments.
- Click Deployments on the onboarding page.
- To change the generated deployment name, select a deployment and click Rename.
- Enter the new name, and then click Save.
For example, Onboarded machine 1.
- Repeat as needed.
- Assign an owner to the deployments.
If you do not assign an owner, you become the owner. The owner must be a member of the target project.
This tutorial assigns all the deployments to the same owner. Optionally, you can assign different deployments to different owners.
- Select all the deployments and click Edit Owner.
- Select the owner and click Save.
Review the deployment name and owner changes in the grid.
- Click Run.
After you run the onboarding plan, you cannot modify the name or assign owners. If you add more machines to the plan, you can modify the name or the owner.
- Review the resources that you onboarded as deployments.
- Select .
- To locate deployments, you can search by deployment name, project, or owner.
Now that you have brought machines into vRealize Automation, you can begin managing them.
Step 4: Resize a deployment
Perform this step as a cloud administrator and familiarize yourself with how day 2 actions work. The changes that you can make to deployments are referred to as day 2 actions. Using day 2 actions are the first step in managing your resources.
For this tutorial, you think that the CPU count on a machine is too high, and you want to decrease the consumed CPUs. This procedure assumes that you are running the resize action on a vSphere machine that is powered on. It also assumes that you do not have any day 2 policies that prohibit a user from running this action.
The available actions depend on the resource type, the resource state, and the day 2 policies. For more information about day 2 actions, see What actions can I run on Cloud Assembly deployments.
- In Cloud Assembly, select , and then locate your onboarded deployments.
You can use the search or filter options.
- Expand the deployment using the arrow on the left, and then click the vertical ellipsis on the machine name and click Resize.
- In the Resize dialog box, decrease the CPU count to 4 and click Submit.
The suggested value is an example, change the CPU count to a value that works in your environment.
The action runs on the machine.
- To verify that the CPU count is changed, open the deployment and check the cpuCount custom property for the machine.
- You can also verify the count in vCenter Server.
Step 5: Applying approval policies
As a cloud administrator, you can apply governance in vRealize Automation to limit what the users can do or to require them to have approval before they do it. This tutorial shows you how to apply approval policies to the resize action so that your users cannot reconfigure a machine, perhaps catastrophically, without your approval or the approval of another administrator.
The policies are created in Service Broker. However, the policies apply to the relevant requests in Cloud Assembly and Service Broker.
As an approver, you must respond to the approval request in Service Broker.
- In Service Broker, select , and then click New Policy.
- Click Approval Policy.
- Configure the approval policy.
The following table includes sample values that illustrate how to create the policy.
Setting Sample value Name Resize Approval Policy Scope Select Project, and then select Onboarding Project. The approval policy is triggered when a user who is a member of the project runs a Resize day 2 action.
Approval type User based This value allows you to name the approvers.
Approver mode Any If you have multiple approvers, the approval request can be resolved by at least one approver.
Approvers Add yourself as an approver. Auto expiry decision Reject By rejecting an unreviewed request, you reduce the risk of making a machine either unusable or over resourced.
Auto expiry trigger 1 Actions Select the resize action that triggers the approval policy. - Enter machine.resize in the Search.
- Click Select multiple in the search results drop-down list.
- Select Cloud.vSphere.Machine.Resize.
For this tutorial, which is based on vSphere, you select the vSphere.Machine action. If you want the action policy to apply to other resource types, you can add the other Machine.Resize actions.
Step 6: Request a resize request as a user
In this step you log in to Service Broker as an Organization member and Service Broker user and run a resize day 2 request. The request creates an approval request. The user can also perform the same steps in Cloud Assembly.
In the step after this one, you log in as the user who you assigned as an approver in Step 5 and approve the request.
- Log in to Service Broker as a user.
In this tutorial, the user is Sylvia.
- Select
This deployment is the one where you ran the resize action on the machine in Step 4, changing the number of CPUs from 8 to 4. If you used a different value, modify the machine in a way that you want to test.
and locate Onboarded machine 1. - Run the Resize action on the machine, increasing the CPU count to 6.
- Notice that the request is waiting for an approval.
To see the pending status, hover over the information icon in the grid or open the deployment and review the History tab.
- As a user, the change the Sylvia requested does not proceed until it is approved.
- Log out of Service Broker as the user.
In Step 7 you log in as the assigned approver and respond to the request.
Step 7: Respond to an approval request
When a request requires an approval, and you are the approver, you receive in email message. For this tutorial, we are not waiting for the message. Instead, the process guides you through directly to responding to approval requests using the Service Broker Inbox tab.
- Log in to Service Broker as the user you assigned as the approver in Step 5.
In this tutorial, the approver is Fritz.
- Select
The status is the grid looks the same as it did for Sylvia.
and locate Onboarded machine 1. - Select
Notice that you have an approval request pending.
. - To view the request details, click the deployment name.
- Click Approve, provide a comment, if needed, and click Approve.
- Return to the Deployments page to see that the Sylvia's resize action is now in progress.
- When the resize action is completed, you can verify the number of CPUs in the deployment details and in the vSphere Client.
This tutorial guided you through the process of bringing the machines into vRealize Automation so that you can begin managing the life cycle of the resource.