Deploying AWS CloudFormation and Azure Resource Manager templates

Last updated 4 April, 2019

About deploying to AWS and Azure

As a consumer, you can use the HPE OneSphere portal to deploy resources that the administrator has curated for your assigned projects.

Microsoft Azure Resource Manager (ARM) templates and Amazon Web Services (AWS) CloudFormation templates allow you to deploy and manage the components of your application, including virtual machines. Each project is assigned its own virtual private cloud (virtual network dedicated to the AWS or Azure account) and subnet.

See also

Deploying an AWS CloudFormation (CFN) template to AWS

AWS CloudFormation templates state the various resource objects that are required in a specific deployment within an AWS account. A template can be a single virtual machine instance (an AWS service) or a combination of virtual machines, container services, and other AWS services (DNS, load balancing, databases, firewalls, and so on) to deploy a full application stack (AWS App Frameworks).

For more information, see AWS CloudFormation Documentation and AWS CloudFormation sample templates.

Deploy an AWS CloudFormation (CFN) template registered in the HPE OneSphere catalog to AWS. 

Prerequisites

The administrator:

Procedure
  1. From the HPE OneSphere main menu, click Projects.

    (Administrator users can click Catalog, and skip step 2, 3, and 4.)

  2. Click a project that you want to associate with the CloudFormation stack deployment.
  3. On the Projects screen, click Deployments.

    Members of the selected project can view and manage the CloudFormation stack after it is deployed.

  4. From the top right corner, click the plus sign  to the right of Deployments. The Catalog screen opens.
  5. Browse or search the catalog for a template labeled AWS CFN Templates.

    The catalog items deploy a CloudFormation stack on AWS.

  6. Click the three dots in the lower right corner of the catalog item, then select Deploy.
    If you selected the item, deselect it to see the three dots.
  7. On the Deploy panel:
    1. Enter a Name of the new deployment.

      NOTE:

      Be sure to specify a unique name. HPE OneSphere does not prevent you from specifying a duplicate name if another CloudFormation stack deployment is occurring at the same time.

      Do not specify restricted characters <>={}(),";& in the CloudFormation stack name. These characters are used as dimension values in the HPE OneSphere monitoring service.

    2. From the Project drop-down menu, select the project in which you want to deploy the CFN template.
    3. From the Region drop-down menu, select the region from the drop-down list into which to deploy the CloudFormation stack. All enabled regions of the Public Provider are listed.
    4. From the Version drop-down, select the version of the application you want to deploy.
    5. Fill in the remaining fields with the appropriate parameters that appear after you select the version.
       
      To find the information required by these fields, refer to the file (json, yml, and template) for the template you registered. You can also select the template on the Catalog screen; click the Detailed Description link under the template name.
    6. (Optional) Click Customize Deployment to see additional parameters. These parameters display the default values that are set on the CFN template.
  8. Click Deploy.

    After the application is deployed, you can view the details of the created application in your project.

    You can also verify the application deployed successfully by logging into your https://console.aws.amazon.com account. After you log in, select the Region, and under Service select the CloudFormation.

Deploying an Open Service Broker (OSB) service to AWS 

Open Service Broker is a standard API that allows you to deliver services to applications running within cloud native platforms. After registering services offered by third party OSB brokers into the HPE OneSphere Catalog, you can deploy OSB images into your AWS project.

Refer to the Open Service Broker specification to create a template and the Open Service Broker API for more information.

After you deploy an OSB service, you cannot update it to make changes (for example, to change the name).

Prerequisites

The administrator:

Procedure
  1. From the HPE OneSphere main menu, click Projects.
    (Administrator users can click Catalog, and skip step 2, 3, and 4.)
  2. Click a project that you want to associate with the OSB deployment.

    Members of the selected project can view and manage the OSB deployment after it is deployed.

  3. On the Projects screen, click Deployments.
  4. From the top right corner, click the plus sign  to the right of Deployments. The Catalog screen opens.
  5. Browse or search the catalog for an image labeled Open Service Broker, or filter the results to show only Open Service Broker images. 

    The image is the software that will be deployed in the project.

  6. Click the three dots in the lower right corner of the catalog item, then select Deploy.
    If you selected the item, deselect it to see the three dots.
  7. On the Deploy panel:
    1. Enter a Name for the new OSB image deployment.

      NOTE:

      Be sure to specify a unique name. HPE OneSphere does not prevent you from specifying a duplicate name if another OSB image is being deployed at the same time.

      Do not specify restricted characters <>={}(),";& in the OSB deployment name. These characters are used as dimension values in the HPE OneSphere monitoring service.

    2. From the Project drop-down menu, select the project where the OSB image will be deployed.
    3. From the Version drop-down list, select the version type of OSB image.
    4. Fill in the remaining fields that appear after you select the version.

      NOTE:

      To find the information required by these fields, refer to the OSB template you registered. You can also select the template on the Catalog screen, then click the Detailed Description link under the template name.

      HPE OneSphere does not recognize minLength and maxLength for string, securestring, and array.

      HPE OneSphere does not recognize minLength and maxLength for string, securestring, and array.

  • Click Deploy.

    After the OSB image is deployed, you can view the details of the created OSB deployment in your project.

Deploying an Azure Resource Manager application to a Microsoft Azure public cloud 

Deploy an application to Microsoft Azure using an Azure Resource Manager (ARM) template registered in the HPE OneSphere catalog.

ARM templates are JSON files that define the resources, including virtual machines, that you need to deploy for your solution.

For more information, see Azure Resource Manager Documentation and Azure Quickstart Templates.

Prerequisites

The administrator:

Procedure
  1. From the HPE OneSphere main menu, click Projects.

    (Administrator users can click Catalog, and skip step 2, 3, and 4.)

  2. Click a project that you want to associate with the application deployment.
  3. On the Projects screen, click Deployments.

    Members of the selected project can view and manage the application after it is deployed.

  4. From the top right corner, click the plus sign  to the right of Deployments to open the Catalog screen.
  5. Browse or search the catalog for a template labeled Azure ARM Templates.

    The template is the application that will be deployed on the Microsoft Azure.

  6. Click the three dots in the lower right corner of the catalog item, then select Deploy.
    If you selected the item, deselect it to see the three dots.
  7. On the Deploy panel:
    1. Enter a Name for the new application.

      NOTE:

      Be sure to specify a unique name. HPE OneSphere does not prevent you from specifying a duplicate name if another virtual machine deployment is occurring at the same time.

      Do not specify restricted characters <>={}(),";& in the application name. These characters are used as dimension values in the HPE OneSphere monitoring service.

    2. From the Project drop-down menu, select the project you want to assign your application deployment to.
    3. From the Version drop-down, select the version of the application you want to deploy.
    4. Fill in the remaining fields that appear after you select the version.

      NOTE:

      You must specify a new, unique resource group for each deployment.

      To find the information required by these fields, refer to the .json file for the template you registered. You can also select the template on the Catalog screen, then click the Detailed Description link under the template name.

    5. (Optional): Click Customize Deployment to see additional parameters. These parameters display the default values that are set in the ARM Template. You can change these parameters on this screen.
  8. Click Deploy.

    After the application is deployed, you can view the details of the created application in your project.

    You can also verify the application deployed successfully by logging into your https://portal.azure.com account and clicking Resource Groups. If access details are available with your Template, you will be able to see access details in your deployment in the Access section.

Creating an SSH public key pair

Create a key pair to use SSH to log in to a virtual machine instance after it is deployed.

Procedure
  1. Create an SSH public key pair. From the command line of a workstation or PC accessible to the browser used to access HPE OneSphere, enter:
    ssh-keygen -t rsa -f cloud-key

    This command generates two files:

    • cloud-key, a private key you keep secret

    • cloud-key.pub, a public key you enter on the HPE OneSphere Virtual Machine panel

      You enter the public key when you deploy a virtual machine to the public cloud or private cloud.

  2. (Optional) Log in to the deployed virtual machine from the command line.
    ssh -i cloud-key username@vm-instance-ip-address

    You can also log in to the deployed virtual machine in HPE OneSphere. Under Projects, select a deployment, then click the Console icon.

    The console is launched if the proper routing and firewall rules are in place from the host to your local client.