You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this section:

The section describes orchestrating the creation of a Standalone SBC on Azure using a Terraform module.

Note

Terraform also supports orchestrating creation of SBC HFE 2.0 and SBC HFE 2.1. For more information, refer to the following README files in the software bundle:

  • HFE 2.0: ./iac/orchestration/azure/sbc_hfe2.0/README.md
  • HFE 2.1: ./iac/orchestration/azure/sbc_hfe2.1/README.md


Prerequisites

Before you execute the Terraform module, ensure the following steps are complete:

  • Creation of Subscription for creating resources.
  • Creation of Service Principle, and setting Terraform Environmental Variables with Subscription ID and Service Principle Details, as shown bellow.

    export ARM_SUBSCRIPTION_ID="<SUBSCRIPTION ID>"
    export ARM_TENANT_ID="<TENANT ID>"
    export ARM_CLIENT_ID="<SP appID>"
    export ARM_CLIENT_SECRET="<SP password>"
    Note

    The Service Principle must have enough privilege to create and assign roles.

  • The following directories/files are present under main source directory:
    • common_modules/   - This directory contains all the sub-modules used to create the resources such as Virtual Networks, Subnets, and Security Groups.
    • sbc_stand_alone/  - This directory contains all the files necessary to start the SBC.

Create Standalone SBC

To create a Standalone SBC, perform the following steps:

  1. Modify the module terraform.tfvars under the directory sbc_stand_alone/.

    1. Change the highlighted parameters in the image below, based on your user account/requirements.

      terraform.tvars - Highlighted parameters for modification




      Modify other parameters based on your deployment scenario.

    2. Depending on the SBC image, modify the parameters highlighted below.

      SBC image - Highlighted parameters for modification


      Update other parameters to suit your requirements.

  2. Execute the Terraform commands mentioned below:

    terraform init
    terraform validate
    terraform plan
    terraform apply


For more information, refer to the README.md file in the software bundle. A sample of the file is given below for quick reference.

SBC SWe Orchestration on Microsoft Azure
===================================

This module provide a mechanism to set up and deploy SBC SWe instance in [Microsoft Azure](https://azure.microsoft.com).
This module creates resource groups and other resources like virtual networks , subnets, security rules etc. and deploys one
[SWe SBC](https://azure.microsoft.com).


**WARNING**: This module and the automated tests for it deploy real resources into your Microsoft Azure account which can cost you money.


Procedure to orchestrate SBC SWe in Microsoft Azure
-----------------------------------------------

1. Change to following directory for SBC SWe orchestration.

    $ `cd orchestration/azure/sbc_stand_alone`

2. Edit terraform.tfvars to provide inputs for deployment like Azure region, resource group name etc. Please refer to instructions in terraform.tfvars/variables.tf for each input parameter.

3. Set environment variables 'ARM_SUBSCRIPTION_ID','ARM_TENANT_ID','ARM_CLIENT_ID' and 'ARM_CLIENT_SECRET' to be able to access Microsoft Azure account.
    export ARM_SUBSCRIPTION_ID="<subscription_id>"
    export ARM_TENANT_ID="<tenant_id>"
    export ARM_CLIENT_ID="<client_id>"
    export ARM_CLIENT_SECRET="<client_secret>"
 NOTE: Make sure client has write permission for Microsoft Authorization  

4. Initialize [terraform](https://www.terraform.io/ Version : Terraform v0.11.11): 

    $ `terraform init`

5. Run the following command to apply the resource configuration. Preview the resources to be created shown in console output and confirm with `yes`.

    $ `terraform apply`

    Make sure that the resources are getting created as per the deployment needs


    In the output, take a note of following fields:

       SBC public IP:				    sbc_public_ip

5. Login to Microsoft Azure account and check the instance launched and login to SBC  using credentials provided earlier in terraform.tfvars.

6. Configure SBC

    **NOTE:**: To destroy the resources from Microsoft Azure, please run the following command:
    $ `terraform destroy`


  • No labels