Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Deploying Contrail on Microsoft Azure

Starting from Contrail Release 5.0.2, you can deploy Contrail on Microsoft Azure public cloud. This topic describes Contrail deployment procedures on Azure and also the procedure to delete the deployment.

Deployment of Contrail on Azure

Ensure that you have a valid subscription to an Azure account for virtual networks and virtual machines (VMs). Create the contrail-multicloud resource group on the Azure portal. Ensure that you have installed the Docker on the local deployer host.

Perform the following detailed steps for deploying Contrail on Azure.

Perform the following steps to create a topology with two virtual networks, two gateways, two compute hosts and one controller in Azure.

  1. To download the Multicloud Deployer package file, follow these steps:
    1. Select Contrail version 5.0.x from the Version list in the Juniper Networks Software Downloads page.

    2. In the Application Tools section, click the Multicloud Deployer tgz file.

      You are now redirected to the Software Download page.

    3. Log in to the download page.

      A End User License Agreement is displayed. Select I Agree and click on Proceed.

    4. Download the file on your localhost or on your device.

    5. Follow the Usage Instructions on the download page to install the file.

  2. Extract the contents of the .tgz file.
  3. Create the secret.yml file. The secrets.yml file contains required credentials for multicloud deployment. For Azure you need to add only the public_key.
  4. Define the topology. The topology.yml file comprises the resource group, virtual networks or clouds, and instances. Instances can have roles such as the gateway role for the multicloud gateway, controller and k8s_master roles for the controller nodes, and compute role for the compute nodes. The instance type as defined in standard Azure documentation and you must be aware of what is available in Azure for populating the topology.

    Here is an example of a topology.yml file.

  5. (Optional) On Linux-based systems, when the ssh-agent is running, the deployer.sh can add the keys to ssh-agent. Use the following command to start ssh-agent.

    On Linux-based systems, if the added keys are removed during cluster provisioning, add the keys to the ssh-agent by using the following command.

    For example:

  6. Set up the deployer.

    For example:

    Use the password for the user on the local system. The contrail-multicloud-deployer deployer Docker container is created.

  7. Log in to the deployer Docker container. Password for the root user is multicloud.
  8. Navigate to the multicloud directory.
  9. Log in to Azure and authenticate your session.
    • Register your device and log in to Azure. Using the az login command displays a secure link to the Azure portal and a code for device authentication.

    • Use a Web browser to open the displayed URL https://microsoft.com/devicelogin.

    • Enter the displayed code in the portal.

    • Enter your Azure account login credentials.

    Upon successful sign-in, your device and session is authenticated and you are logged into Azure.

  10. (Optional) View your subscription details.
  11. Navigate to the one-click-deployer directory.
  12. Run the deploy.sh script to generate the topology and deploy Contrail. The deploy.sh script is available in the https://github.com/Juniper/contrail-multi-cloud repository.
  13. (Optional) After Contrail deployment, if the kube-dns pod is stuck in CreatingContainer or ErrorCreating, ensure that the kube-dns pod is recreated. This might occor required if the container fails during provisioning.

    Check for the kube-dns pod name using the following command.

    Delete kube-dns pod using the following command.

Deleting Contrail Deployment from Azure

To delete Contrail from Azure, perform the following steps.

  1. Navigate to the one-click-deployer directory.
  2. Tear down the objects using the teardown.sh script.
  3. Delete the deployer Docker, keys, and generated files.