There are three prerequisites for the Azure Cloud connection with Couchbase Cloud.
Before starting this process, make sure you have the following:
Go to the Azure portal and login with a user account that has the Global Administrator role.
On the Home dashboard, click Subscriptions.
The properties for your subscription will display.
In the “Filter by name” text box, type “Microsoft.ContainerService”, this will filter the list to just that service.
Click on “Microsoft.ContainerService” in the Provider list, then click “Register” to register the service.
NOTE: If you are using Azure Cloud Shell or the Azure CLI is already installed, this step can be skipped.
Copy, paste and run the following code in a terminal shell:
brew update && brew install azure-cli
Invoke-WebRequest -Uri <https://aka.ms/installazurecliwindows> -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
For more information on the Azure CLI or to install on other OS’s, go the Azure CLI page here.
Once the CLI is installed, you can log in to Azure.
At the command prompt, type
az login and press the Enter key.
Your browser window will open and you will be prompted to login to Azure. You must use an account that has the Global Administrator role for your Azure tenant.
Once you are authenticated, the terminal window displays a message as shown:
The Couchbase Cloud app needs to be registered as an Enterprise Application (service principal) in your Azure tenant.
The Couchbase Azure App ID is: 8e365e8c-03f4-4f5e-ae3f-b432805a56e5
At the command prompt, copy, paste and run the following command:
az ad sp create --id 8e365e8c-03f4-4f5e-ae3f-b432805a56e5
You should see information about the Couchbase Cloud Enterprise App on the terminal window as shown:
NOTE: An error message
Insufficient privileges to complete the operation. at this point indicates that your Azure login lacks the Global Administrator role. You must try again with the appropriate role.
Once the Couchbase Cloud Enterprise Application is registered, you must grant Admin Consent for the application. This enables the registration of an Application in the Azure Tenant at the time of connecting Couchbase Cloud with Azure. The Application in the Tenant allows Couchbase Cloud to provision infrastructure within the Tenant level.
Log in to the Azure Portal as a user who has the Global Administrator role.
In the portal, select Enterprise Applications , in the left side navigation select “All Applications”.
All Enterprise Applications will be listed.
The “Couchbase Cloud” Enterprise Application will be listed.
Click “Permissions” in the left side navigation.
Lastly, you must grant the “Owner” privilege to the Azure user account that will be creating the connection to Azure in Couchbase Cloud (this assumes that you will be using a different Azure user account to create a connection in Couchbase Cloud.)
Login to your Azure Cloud Portal as an existing administrator of the subscription that will be used with Couchbase Cloud.
The properties for your subscription are displayed.
The Add Role Assignment fly-out displays.
You should see the user listed as an Owner.
Use this account when adding an Azure cloud to Couchbase Cloud.
Here are some additional notes on this process:
Couchbase Cloud Enterprise Application has the following roles assigned to it
The Application, created from the Couchbase Cloud Enterprise Application, has the following roles assigned to it:
The Application is created at the moment when you connect your Azure cloud to Couchbase Cloud.
If the Couchbase Cloud Enterprise Application is later deleted, no new Cloud connections can be created to your Azure Cloud; existing connections will still function so long as the Application within each Tenant has also not been deleted.
Well done! Now you are ready to go through the Getting Started with Couchbase Cloud Free Trial] tutorial and deploy a cloud on your Azure account!