Connect Azure subscription

To link your own existing Azure subscription, you must create a Service Principal in the Azure Portal. This “Service Principal” is a “key” with which oneclick™ gets access to the resources created in Azure. The data read out via the “Service Principal” can then be entered in oneclick™.

Get data from Azure subscription

  1. Open the Azure Portal and log in with your Azure credentials.
  2. Click on (in the bar at the top right) to open the Azure CLI (command interface).
  3. If you open the Azure Cloud Shell (Azure CLI) for the first time, please select Bash.
  4. Confirm that a storage is being created. This storage is required for a temporary virtual machine. This machine will be deprovisioned when you stop using the Azure Cloud Shell.

    As soon as this installation has been completed, you have access to your command interface (Azure CLI).

  5. Enter the following command in the command line to get a subscription ID:
    az account show --query id --output tsv
    As output you get an ID that looks like this: xxx1x111-2×22-333x-x44-5x5x5x5xx5xx
  6. Copy your Subscription ID, type the following into your command line and append your Subscription ID to the end:
    az ad sp create-for-rbac --years 2 --role Contributor --scopes /subscriptions/xxx1x111-2x22-333x-x44-5x5x5x5xx5xx
  7. A Service Principal with a validity of 2 years is created. After two years, you need a new “Service Principal”. You get an output that looks like this:
    Creating a role assignment under the scope of “/subscriptions/xxx1x111-2x22-333x-x44-5x5x5x5xx5xx”
      Retrying role assignment creation: 1/36
    {
      “appId”: “8f9e408c-e827-4e12-9de1-9d6670af2e08”,
      “displayName”: “azure-cli-2019-11-25-10-39-06”,
      “name”: “http://azure-cli-2019-11-25-10-39-06”,
      “password”: “6fe2c156-8b7d-4f83-97b9-1b2f05e19d4d”,
      “tenant”: “26cc4f43-97b9-4ffc-9cd9-171826cc471a”
    }

    After two years, you need a new “Service Principal”.

  8. Now, you have all the parameters to create the license in oneclick™.

 

Enter data in the oneclick™ Admin

  1. In the oneclick™ Admin, click on Connections in the Resources tab.
  2. Click on the + Icon to connect your cloud subscription in oneclick™.
  3. Select the Cloud Resources tile and click on the required cloud provider.
  4. Give the connection a name of your choice.
    1. If you select “About Azure CLI”, copy the entire output you received in step 5 and paste it into the text box.
    2. If you select “via credentials” copy the particular data you received in step 5 into the respective fields:
      • Enter the content under “tenant” in the field “Tenant-ID”.
      • Enter the content behind “/subscriptions/” in the “Subscription ID” field.
      • Enter the content under “appId” in the “Client ID” field.
      • Enter the content under “password” in the “Client-Secret” field.
  5. To enable oneclick™ to provision virtual machines via the Cloud Resource Manager, the following command must also be executed in the azure portal on the command line:
    az provider register -n microsoft.network && az provider register -n microsoft.compute && az provider register -n microsoft.resources
    You can close the azure portal now.
  6. Click Save in oneclick™ . Your Azure subscription is now linked and existing resources are read out.
    You will only be charged when using virtual machines.
  7. You can now create virtual maschines.