# Getting started with HPE Morpheus Enterprise and Azure

## Introduction

This guide is designed to help you get started and quickly get the most out of Morpheus with Microsoft Azure public cloud. By the end, you will integrate your first cloud with HPE Morpheus Enterprise, configure networking, prepare and consume images, provision instances, and get started with automation. We will briefly discuss installation and account setup but will provide links to additional resources for those very first steps. For the most part, this guide assumes you are able to get HPE Morpheus Enterprise installed and are ready to move forward from that point. There is a lot more to see and do in Morpheus that is beyond the scope of this guide. For more, consult the complete Morpheus documentation or take part in our [Reddit user community forum](https://www.reddit.com/r/morpheusdata/).

## Installation & Setup

In the simplest configuration, HPE Morpheus Enterprise needs one appliance server which will contain all the components necessary to orchestrate virtual machines and containers. Full requirements, including storage and networking considerations, can be found in HPE Morpheus Enterprise documentation [here](https://docs.morpheusdata.com/en/latest/getting_started/requirements/requirements.html). In order to provision any new Instances, hosts, or applications (or convert any discovered resources to managed resources) you will need a valid license. If you don’t have one, you can request a community edition license for free at [Morpheus Hub](https://app.morpheushub.com). Once obtained, the license can be applied in Administration > Settings > License. For more, take a look at our community edition [welcome package](https://www.morpheusdata.com/community-welcome).

## Groups

Groups in HPE Morpheus Enterprise define which resources a user has access to. Clouds are added to Groups and a user can only access Clouds that are in the Groups to which their roles give them access. More information on HPE Morpheus Enterprise Groups is [here](https://docs.morpheusdata.com/en/latest/infrastructure/groups/groups.html#groups). A deep dive into Groups goes beyond the scope of this guide but it’s often useful to create a Group that contains all Clouds for testing purposes. We will create that group now so that we can add our first Cloud into this Group in the next section.

Navigate to Infrastructure  >  Groups. Here we will see a list of all configured groups but, of course, this will be empty immediately after installation. Click “+CREATE”. Give your group a name, such as “All Clouds”. The “CODE” field is used when calling HPE Morpheus Enterprise through HPE Morpheus Enterprise API or HPE Morpheus Enterprise CLI. It’s useful in most cases to have an “All Clouds” group for testing purposes so this will likely help you down the road.

Click SAVE CHANGES. Your Group is now ready to accept Clouds.

![../../_images/1newGroup.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-542A0791-5B19-4A90-A597-CF88E9A0B7F9-high.png)

## Integrating Your First Cloud

Clouds in HPE Morpheus Enterprise consist of any consumable endpoint whether that be on-prem, public clouds, or even bare metal. In this guide, we will focus on integrating and working with Microsoft Azure public cloud.

To get started, we will navigate to Infrastructure  >  Clouds. This is the Cloud list page which lists all configured Clouds. It will be empty if you’ve just completed installation and setup of HPE Morpheus Enterprise but soon we will see our integrated Azure cloud here.

Click the “+ADD” button to pop the “CREATE CLOUD” wizard. Select “AZURE (PUBLIC)” and click the “NEXT” button.

On the “CONFIGURE” tab, we’re asked to provide Azure-specific details to connect to the cloud. HPE Morpheus Enterprise Azure integration requires Owner or Contributor access to subscription via App Registration. Adding an Azure Cloud or Clouds to HPE Morpheus Enterprise will require the following:

- Azure Subscription ID
- Directory (tenant) ID
- Application (client) ID
- Application (client) Secret
- Application (client) must be Owner or Contributor of Subscription

CSP Accounts require the additional following input:

- CSP Directory (tenant) ID
- CSP Application (client) ID
- CSP Application (client) SECRET

![../../_images/2createCloud.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-31D2E874-AE3E-4F65-B514-72258B2A437B-high.png)

### Create App Registration

#### About this task

HPE Morpheus Enterprise authenticates with Azure via an App Registration with an Owner or Contributor Role on a Subscription. Use the steps below to create and collect the required credentials and assign the required permissions to integrate Azure with HPE Morpheus Enterprise.

WARNING

Using an App Registration (service principal) that has selective resource permissions and is not an Owner or Contributor of the Subscription is not supported and will cause failures/issues. Please confirm the App Registration you use to integrate Azure with HPE Morpheus Enterprise has Owner or Contributor permissions on the specified Subscription.

If you do not have an existing Azure Active Directory App Registration, or you wish to use an new one for HPE Morpheus Enterprise, you will need to create one using the steps below. If you already have one you wish to use, continue to the next section.

#### Procedure

1. Log into the Azure portal
2. Select “Azure Active Directory”
3. Select “App Registrations”
4. Select “New Registration” 

   ![../../_images/Default_Directory_App_registrations_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-A57114C7-68E3-4BBA-B11D-51BC35609D3C-high.png)
5. Next, give the app a name, specify Web app / API for the type (default) and enter any URL for the Sign-on URL:
6. Click Create and your new App Registration will be created. 

   ![../../_images/Register_an_application_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-55330F72-25B5-4408-8A33-43884CBF6D26-high.png)

#### Results

Now that we have our App Registration, we will gather the credentials required for the HPE Morpheus Enterprise Azure integration in the next section.

### Copy Directory (tenant) and Application (client) IDs

#### About this task

The App Registration Directory (tenant) and Application (client) ID are required for the HPE Morpheus Enterprise Azure integration. Both can be found in the overview section of the App Registration.

#### Procedure

1. Go to the Overview section of your App Registration
2. Copy the Directory (tenant) ID
3. Store/Paste for use as the Tenant ID when adding your Azure cloud in HPE Morpheus Enterprise
4. Copy the Application (client) ID
5. Store/Paste for use as the Client ID when adding your Azure cloud in HPE Morpheus Enterprise

#### Results

![../../_images/morpheusAppReg_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-3DD99466-18E6-40A5-A2C4-63B8D766487E-high.png)

### Generate a Client Secret

#### About this task

While still in your App Registration:

#### Procedure

1. Select “Certificates & secrets” in the Manage section
2. Select `+ New client secret` 

   ![../../_images/morpheusAppReg_Certificates_secrets_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-FEF1F839-2F89-43AA-A5F8-744B625725F0-high.png)
3. The “Add a client secret” modal will come up
4. Add a description to help identify the secret in the future
5. Select an expiration duration
6. Click Add 

   ![../../_images/morpheusAppReg_Certificates_secrets_Add.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-201809CC-7FE8-42EF-87DE-2FDE9015C0E9-high.png)
7. Copy the newly-generated client secret value. 

   IMPORTANT

   Copy the client secret value before continuing as it will not be viewable again later.

   ![../../_images/morpheusAppReg_Certificates_secrets_Copy.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-276863D1-39D2-4F67-8A52-511B32010C1B-high.png)
8. Store/Paste client secret for use later when adding your Azure cloud in HPE Morpheus Enterprise

#### Results

You now have three of the four credentials required for HPE Morpheus Enterprise Azure cloud integration. The last credential required is the Azure Subscription ID which we will gather in the next section.

### Subscription ID

#### About this task

To get the Azure Subscription ID:

#### Procedure

1. Navigate to the Subscriptions section. The search function can help to locate these sections if they aren’t immediately apparent in the UI menu 

   ![../../_images/azuresubscriptionssearch.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-AE54CAA0-CE46-424A-ADB0-5F5C2E2521AF-high.png)
2. In the Subscriptions section, copy the Subscription ID 

   ![../../_images/Subscriptions_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-2DA76817-C462-4B49-BCA8-DCBF83CA8860-high.png)
3. Store/Paste for use as the Subscription ID when adding your Azure cloud in HPE Morpheus Enterprise

### Make App Registration owner or contributor of Subscription

#### About this task

The App Registration used needs to be an owner of the Azure Subscription used for the HPE Morpheus Enterprise cloud integration. If lesser permissions are given or permissions are assigned at individual resource levels, HPE Morpheus Enterprise will not be able to properly inventory existing cloud resources, create resources or remove them.

#### Procedure

1. In the Subscriptions section in Azure, select the Subscription
2. In the Subscription pane, select “Access Control (IAM)”
3. Either Click :guilabel`+ Add`, and then “Add Role Assignment” OR simply select “Add a role assignment” 

   ![../../_images/Azure_subscription_1_Access_control_IAM_Microsoft_Azure.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-68F85CA0-5206-4738-8FA9-11A40E6B4277-high.png)
4. In the right pane, select “Owner” or “Contributor” Role type
5. Search for the name of the App Registration used for the HPE Morpheus Enterprise integration
6. Select the App Registration in the search results
7. Select “Save” 

   ![../../_images/Add_role_assignment_save.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-374258C1-E537-4439-BCE9-9F8918C369E4-high.png)

#### Results

You now have the required credentials and permissions to add an Azure Cloud integration into HPE Morpheus Enterprise. Continue on with the next sections of this guide to complete the integration from the HPE Morpheus Enterprise side.

### Complete the Add Cloud Process in HPE Morpheus Enterprise

If you’ve followed this guide from the start, you will already have a Cloud integration modal open in HPE Morpheus Enterprise UI. If you still need to open that wizard, navigate to Infrastructure > Clouds > + ADD > Azure (Public) and click NEXT. Fill in the following fields with the information gathered in the steps above:

- Subscription ID
- Tenant ID
- Client ID
- Client Secret
- Location
- Resource Group
- Inventory Existing Instances
- Inventory Level
- Account Type

Once valid credentials are populated in the appropriate fields, the LOCATION dropdown menu will be populated. Select an available region, this is also a helpful check to ensure you’ve correctly provided working credentials. In addition, we can scope the cloud integration to all resource groups in the region (All) or can select a specific resource group to limit HPE Morpheus Enterprise resource inventorying and creation to just that resource group.

By checking INVENTORY EXISTING INSTANCES, HPE Morpheus Enterprise will automatically onboard existing cloud resources which are scoped to the region and resource group indicated. If this box is checked, we will also need to select either basic inventorying, which syncs name, IP addresses, platform types, power status, and sizing data (storage, CPU, and RAM) OR full (API heavy) inventorying which syncs resource utilization metrics (storage, CPU, and RAM) when available in addition to what we get with basic inventorying.

To move on, expand the “Advanced Options” section.

NOTE

CSP accounts will also need to enter CSP TENANT ID, CSP CLIENT ID, and CSP CLIENT SECRET in the Advanced Options section.

Within the “Advanced Options” drawer are additional configurations to consider for your first Cloud. Some of these won’t usable until they reference additional configured integrations. Common settings to consider are **DOMAIN**, **STORAGE TYPE**, **APPLIANCE URL** (overrides the HPE Morpheus Enterprise URL for external systems), **GUIDANCE** (setting “Manual” will make recommendations for rightsizing), **COSTING**, **DNS INTEGRATION**, **CMDB**, and **AGENT INSTALL MODE**.

Once you’re satisfied with your selections, click “NEXT”

We have now arrived at the “GROUP” tab. In this case, we will mark the radio button to “USE EXISTING” Groups if you wish to use the Group we configured earlier. Alternatively, you can create a new one here.

![../../_images/3cloudGroup.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-0908B711-2897-4E7C-8C95-07D3BE88990B-high.png)

Once you’ve selected or created the Group, click “NEXT”

On the final tab of the “CREATE CLOUD” wizard, you’ll confirm your selections and click “COMPLETE”. The new Cloud is now listed on the Cloud list page. After a short time, HPE Morpheus Enterprise will provide summary information and statistics on existing virtual machines, networks, and other resources available in the Cloud.

#### Viewing Cloud Inventory

Now that we’ve integrated our first Azure cloud, we can stop for a moment to review what HPE Morpheus Enterprise gives us from the Cloud detail page. We can see that HPE Morpheus Enterprise gives us estimated costs and cost histories, metrics on used resources, and also lists out resource counts in various categories including container hosts, hypervisors, and virtual machines. We can drill into these categories to see lists of resources in the various categories by clicking on the category tabs. We can link to the detail page for any specific resource by clicking on it from its resource category list.

#### Configuring Resource Pools

With our Azure Cloud configured, HPE Morpheus Enterprise will automatically sync in available resource pools and data stores.

For resource pools, once HPE Morpheus Enterprise has had time to ingest them, then will be visible from the cloud detail page. Navigate to Infrastructure  >  Clouds  >  (your Azure cloud)  >  Resources tab. In here, we are able to see and control access to the various resource pools that have been configured in Azure. For example, we can restrict access to a specific resource pool within HPE Morpheus Enterprise completely by clicking on the “ACTIONS” button, then clicking “Edit”. If we unmark the “ACTIVE” button and then click “SAVE CHANGES” we will see that the resource pool is now grayed out in the list. The resources contained in that pool will not be accessible for provisioning within HPE Morpheus Enterprise if it is not configured as active.

![../../_images/4resourcePool.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-7380FEF7-F20E-43FE-B217-9597FD1569DE-high.png)

Often our clients will want to make specific blocks of resources available to their own customers. This can be easily and conveniently controlled through the same “EDIT RESOURCE POOL” dialog box we were just working in. If we expand the “Group Access” drawer, we are able to give or remove access to each pool to any Group we’d like. We can also choose to make some or all of our resource pools available to every Group. Specific resource pools can also be defined as the default for each Group when needed.

![../../_images/5resourcePoolGroup.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-BDAD86D8-81F9-4622-BB7D-FE2E1FCEFC1E-high.png)

Additionally, we may choose to allow only certain service plans to be provisioned into a specific pool of resources. For example, perhaps a specific cluster is my SQL cluster and only specific services plans should be consumable within it. We can control that through this same dialog box.

#### Configuring Data Stores

To take a look at data stores, we’ll move from the “Resources” tab to the “Data Stores” tab on our Cloud detail page.

HPE Morpheus Enterprise gives the user similar control with data stores to what we saw with our resources pools earlier. Just like with resource pools, we can disable access within HPE Morpheus Enterprise completely by clicking on “ACTIONS” and then “Edit”. If we unmark the “ACTIVE” checkbox and click “SAVE CHANGES”, you will see that specific data store has been grayed out.

![../../_images/6dataStore.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-971BB5E6-79F2-4447-9227-2000EAB24BEF-high.png)

Just like with resource pools, we are also able to scope data stores to specific Groups. This ensures that the members of each Group are only able to consume the data stores they should have access to.

#### Configuring Network for Provisioning

When configuring networking, we can set global defaults by going to Infrastructure  >  Network  >  NETWORKS tab. Here we can add or configure networks from all Clouds integrated into HPE Morpheus Enterprise. Depending on the number of clouds HPE Morpheus Enterprise has ingested, this list may be quite large and may also be paginated across a large number of pages. In such a case, it may be easier to view or configure networks from the specific Cloud detail page so that networks from other Clouds are not shown.

Still in Infrastructure  >  Network, make note of the “INTEGRATIONS” tab. It’s here that we can set up any integrations that may be relevant, such as IPAM integrations. Generally speaking, when adding IPAM integrations, we simply need to name our new integration, give the API URL, and provide credentials. There’s more information in the [IPAM integration](https://docs.morpheusdata.com/en/latest/integration_guides/integration_guides.html#networking) section of HPE Morpheus Enterprise Docs.

In Infrastructure  >  Networking we can also set up IP address pools from the IP Pools tab. These pools can be manually defined, known as a Morpheus-type IP pool, or they can come from any IPAM integrations you’ve configured. As instances are provisioned, Morpheus will assign IP addresses from the pool chosen during provisioning. When the instance is later dissolved, Morpheus will automatically release the IP address to be used by another instance when needed. When adding or editing a network, we can opt to scope the network to one of these configured IP address pools. Edit an existing network by clicking the pencil icon on the Networks List Page (Infrastructure > Networks > NetworksTab) and fill in the “Network Pool” field to associate the IP Pool with the network.

Since this guide is focused on working within an Azure cloud that we integrated at the start, we will take a look at our network configurations on the cloud detail page as well. Navigate to Infrastructure  >  Clouds  >  (your Azure cloud)  >  NETWORKS tab. Just as with resource pools and data stores, we have the ability to make certain networks inactive in HPE Morpheus Enterprise, or scope them to be usable only for certain Groups or Tenants.

![../../_images/7cloudNetworks.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-EB96C871-9B00-4B7B-9BBD-6800427665D5-high.png)

#### Provisioning Your First Instance

At this point, the groundwork is laid and we are ready to attempt our first new provisioning. As a first Instance, we’ll provision an Apache web server to our Azure cloud. HPE Morpheus Enterprise includes a very robust catalog of pre-configured Instance types. We’ll use one of these included catalog items for this guide but you’ll likely also need to prep your own custom images and Instance types to make available to your users. Much more on this can be found elsewhere in HPE Morpheus Enterprise documentation.

Navigate to |ProIns|. If any Instances are currently provisioned, we will see them listed here. To start a new Instance we click + ADD to open the “CREATE INSTANCE” wizard. We’ll scroll down to and select the Apache instance type and click “NEXT”.

![../../_images/8createInstance.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-82D93BA5-71D0-4A63-9DBA-C13AE6E3C395-high.png)

First, we’ll specify the Group to provision into which determines the Clouds available. If you’ve followed this guide to this point, you should at least have a Group that houses all of your Clouds which you can select here. This will allow us to select the Azure cloud from the “CLOUD” dropdown menu. Provide a unique name to this instance and then click “NEXT”

From the “CONFIGURE” tab, we’re presented with a number of options. The options are cloud and layout-specific, more generalized information on creating Instances and available options is [here](https://docs.morpheusdata.com/en/latest/provisioning/instances/instances.html). For our purposes, we’ll select the following options:

- **LAYOUT**: Includes options such as the base OS, custom layouts will also be here when available
- **PLAN**: Select the resource plan for your instance. Some plans have minimum resource limits, HPE Morpheus Enterprise will only show plans at or above these limits. User-defined plans can also be created in |AdmPla|.
- **VOLUMES**: The minimum disk space is set by the plan, this value may be locked if you’ve selected a custom plan that defines the volume size
- **NETWORKS**: Select a network

Under the “User Config” drawer, mark the box to “CREATE YOUR USER”. Click NEXT.

![../../_images/9configureInstance.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-E9D875CD-D6C4-4D20-AD60-767C3A47671E-high.png)

NOTE

“CREATE YOUR USER” will seed a user account into the VM with credentials set in your HPE Morpheus Enterprise user account settings. If you’ve not yet defined these credentials, you can do so by clicking on your username in the upper-right corner of the application window and selecting “USER SETTINGS”.

For now, we’ll simply click NEXT to move through the “AUTOMATION” tab but feel free to stop and take a look at the available selections here. There is more information later in this guide on automation and even more beyond that in the rest of HPE Morpheus Enterprise docs.

Review the settings for your first instance and click COMPLETE.

We are now dropped back onto the Instances list page. We can see a new entry in the list at this point with a status indicator that the new machine is being launched (rocket icon in the status field). We can double click on the Instance in the list to move to the Instance detail page. For now we will see a progress bar indicating that the Instance is being created and is starting up. The exact amount of time this process will take depends on selections made when provisioning the Instance. Initially, HPE Morpheus Enterprise will guess as to how long this will take and the progress bar may not be accurate. Over time, HPE Morpheus Enterprise will learn how long these processes take and progress bar accuracy will improve. For more detailed information on the status of various provisioning processes, we can scroll down and select the “HISTORY” tab. The “STATUS” icon will change from the blue rocket to a green play button when the Instance is fully ready. Furthermore, we can click on the hyperlinked IP address in the “VMS” section of this page to view a default page in a web browser to confirm success.

#### Creating Your First Library Item

In the prior section, we manually provisioned our first Instance. However, HPE Morpheus Enterprise allows you to build a catalog of custom provisionable items to simplify and speed provisioning in the future. In this section, we’ll build a catalog item and show how that can translate into quick Instance provisioning after configuration.

NOTE

Before starting this process, it’s important to decide which virtual image you plan to use. If you’re not using a HPE Morpheus Enterprise-provided image, you’ll want to ensure it’s configured. You will not be able to complete this section without selecting an available image. In this example we will use a CentOS image that was previously configured in the HPE Morpheus Enterprise library. If you need to configure your own images prior to starting this section, navigate to Library > Virtual Images and click + ADD. A deeper dive into image prep and virtual image configuration goes beyond the scope of this guide.

Provisionable elements in HPE Morpheus Enterprise combine a Node Type(s), Layout(s), and an Instance Type. The [Overview section](https://docs.morpheusdata.com/en/latest/provisioning/library/library.html#overview) of HPE Morpheus Enterprise docs discusses these objects and how they work together in greater detail. Our first step here will be to create a Node Type which wrap the image itself with additional configuration, templates, and scripts. While not strictly required, creating the Node Type, Instance Type, and then the Layout is often a good workflow for creating Library items. That is the order we will follow in this guide.

Navigate to Library > Blueprints > Node Types and click + ADD

In this example, I am going to set the following options in the “NEW NODE TYPE” wizard:

- **NAME**: Example Azure CentOS 7
- **SHORT NAME**: eac7 (Identifies the Node Type in HPE Morpheus Enterprise API/CLI)
- **VERSION**: 7 (Ensures the correct Node Types are used when tying Layouts with multiple images to the same Instance Type)
- **TECHNOLOGY**: Azure
- **VM IMAGE**: Azure-Centos-7

Click SAVE CHANGES

![../../_images/10addNodeType.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-A92C3DF6-A4AF-4C9E-8DFD-0ADC4CCEDC48-high.png)

With the new Node Type created, we’ll now add a new Instance type which will be accessible from the provisioning wizard once created. Move from the “NODE TYPES” tab to the “INSTANCE TYPES” tab and click + ADD.

In the “NEW INSTANCE TYPE” wizard, I’ll simply enter a **NAME** and **CODE** value. Click SAVE CHANGES. You could also provide a description, icon, and category for easier identification from the provisioning wizard later.

![../../_images/11addInstanceType.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-E5B46F39-E1FE-4EDF-9C6B-348A60C37A00-high.png)

Now that we’ve created a new Instance type, access it by clicking on the name in the list of custom Instances you’ve created. In my case, I’ve given the name “Example Azure CentOS 7”.

Once we’ve opened the new Instance type, by default, we should be on the “LAYOUTS” tab. Click + ADD LAYOUT. I’ve set the following fields on my example layout:

- **NAME**: Example Azure CentOS 7
- **VERSION**: 7 (This is the version number of the layout itself, which is labeled 7 in the example)
- **TECHNOLOGY**: Azure
- **Nodes**: Select the Node Type we created earlier, if desired you can specify multiple nodes

Click SAVE CHANGES.

![../../_images/12addLayout.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-D60CF065-8C8D-4F3F-8068-61523120D1FE-high.png)

At this point we’ve completed the setup work and can now provision the Instance we’ve created to our specifications. Navigate to |ProIns| and click + ADD. From the search bar we can search for the new Instance type we’ve created.

![../../_images/13createCustomInstance.png](https://support.hpe.com/hpesc/public/api/document/sd00007510en_us/GUID-C1C05D91-5824-4DAD-8132-CF4EF2D46BD6-high.png)

As before, we can select a Group and Cloud to provision this new Instance. Click NEXT. On the “CONFIGURE” tab, make note that the layout and plan are already selected because they were configured as part of creating the new Instance type. Select a network and click NEXT. Once again we will also click NEXT through the “AUTOMATION” tab. Finally, click COMPLETE.

As before when we provisioned a pre-existing Instance from the default catalog, HPE Morpheus Enterprise will now begin to spin up the new VM. How long this will take depends on the configuration and environmental factors but HPE Morpheus Enterprise will predict how long this process will take and represent that on a progress bar. Over time, HPE Morpheus Enterprise begins to learn how long these processes take and becomes more accurate in predicting spin-up time.

Once the provisioning process has completed, open the Instance detail page in HPE Morpheus Enterprise and click on the “CONSOLE” tab. You’ll be logged in with your user account and are then able to confirm the machine is ready and available, assuming the image and your custom catalog item were configured to seed user accounts and connect back to the HPE Morpheus Enterprise appliance.

#### Automation and Configuration Management

HPE Morpheus Enterprise automation is composed of Tasks and Workflows. A Task could be a script added directly, scripts or Blueprints pulled from the HPE Morpheus Enterprise Library, playbooks, recipes, or a number of other things. The complete list of Task types can be found in the [Automation section](https://docs.morpheusdata.com/en/latest/provisioning/automation/automation.html#automation) of HPE Morpheus Enterprise docs. Tasks can be executed individually but they are often combined into workflows. We can opt to run a workflow at provision time or they can be executed on existing instances through the Actions menu.

In this guide we will set up an Ansible integration, create a Task, add the Task to a Workflow, and run the Workflow against a new and existing Instance. If you’ve worked through this guide to this point, you should already have an Apache instance running. If you don’t yet have that, provision one before continuing with this guide and ensure it’s reachable on port 80.

We’ll first set up the Ansible integration, you can integrate with the sample repository referenced here or integrate with your own. Go to ‘Administration > Integrations’. Click +NEW INTEGRATION and select Ansible from the dropdown menu. Fill in the following details:

- **NAME**
- **ANSIBLE GIT URL**: <https://github.com/ncelebic/morpheus/-ansible-example>, or enter the URL for your own Ansible git repository
- **PLAYBOOKS PATH**
- **ROLES PATH**
- Mark the box to “USE HPE Morpheus Enterprise AGENT COMMAND BUS”

NOTE

If your git repository requires authentication, you should create a keypair and use the following URL format: [git@github.com](mailto:git%40github.com):ncelebic/morpheus/-ansible-example.git.

Click SAVE CHANGES. You’ll now see our new Ansible integration listed among any other configured integrations. If we click on this new integration to view detail, a green checkmark icon indicates the git repository has been fully synced.

With the Ansible integration set up, we can now create a task that includes our playbook. Go to |LibAut|, click + ADD. We’ll first set our “TYPE” value to Ansible Playbook so that the correct set of fields appear in the “NEW TASK” wizard. Set the following options:

- **NAME**
- **ANSIBLE REPO**: Here we will choose the Ansible integration that we just created
- **PLAYBOOK**: In our example case, enter ‘playbook.yml’

Click “SAVE CHANGES” to save our new task. We can test the new task on our Apache VM now by going to |ProIns| and clicking into our VM. From the “ACTIONS” menu select “Run Task”. From the “TASK” dropdown menu, select the task we just added and click “EXECUTE”.

To see the progress of the task, click on the “HISTORY” tab and click on the (i) button to the right of each entry in the list. In this case, we can also see the results of the task by clicking on the link in the “LOCATION” column of the “VMS” section.

Now that our task is created, we can put it into a workflow. Back in |LibAut| we will click on the “WORKFLOWS” tab. Click “+ADD” and select Provisioning Workflow. We’ll give the new workflow a name and expand the Post Provision section. As we begin to type in the name of the task we’ve created, it should appear as a selection. Click “SAVE CHANGES”.

Now that we have a Workflow, return to |ProIns| and begin to provision another Apache instance. More detailed instructions on provisioning a new Apache instance are included earlier in this guide if needed. Now, when you reach the “AUTOMATION” section of the “CREATE INSTANCE” wizard, we have a workflow to select. From the “WORKFLOW” dropdown menu, select the workflow we just created and complete provisioning of the new instance.

As the instance is provisioning, we can go to the “HISTORY” tab and see HPE Morpheus Enterprise executing the tasks that were contained in our workflow.

This is just one example of using HPE Morpheus Enterprise to automate the process of configuring an instance to your needs. There are a number of other automation types that can be built into your Workflows as well. For further information, take a look at the [automation integrations](https://docs.morpheusdata.com/en/latest/integration_guides/integration_guides.html#automation) guide in HPE Morpheus Enterprise docs.

#### Conclusion

At this point you should be up and running in HPE Morpheus Enterprise, ready to consume Azure public cloud. This guide only scratches the surface, there is a lot more to see and do in HPE Morpheus Enterprise. Take a look at the rest of [Morpheus Docs](https://docs.morpheusdata.com/en/latest/index.html) for more information on supported integrations and other things possible.
