Link Microsoft Azure Cloud Services to Docker Cloud预计阅读时间: 4 分钟
You can link your Microsoft Azure Cloud Services account so that Docker Cloud can provision and manage swarms on your behalf.
For this, you will need an SSH key and your Azure subscription ID to authenticate Docker to your service provider. Also, you need to enable your Azure subscription on behalf of Docker Cloud.
Create or locate the SSH key you want to use
When you are ready to create and deploy swarms, you must have an SSH key to authenticate Docker Cloud to your Azure account. See the topic Set up SSH keys to learn how to check for existing keys or set up a new one, and copy the public key.
Find your Azure subscription ID
You will also need your Azure Cloud Services subscription ID to provide to Docker Cloud. There are a few ways to navigate to it on Azure.
You can click a resource from the Dashboard and find the subscription ID under “Essentials” on the resulting display. Alternatively, from the left menu, go to Billing -> Subscriptions -> Subscription ID or simply click Subscriptions, then click a subscription in the list to drill down.
When you are ready to add your subscription ID to Docker Cloud, copy it from your Azure Dashboard.
Add your Azure account credentials to Docker Cloud
Go to Docker Cloud to connect the account.
In Docker Cloud, click the account menu at the upper right and select Cloud settings.
In the Service Providers section, click the plug icon next to Microsoft Azure.
Tip: If you are a member of an Azure Organization, your admninistrator must first link to Docker Cloud as described in Link an Azure Organization as Global Admin.
Provide your subscription ID and click Save.
This grants Docker Cloud access to your Microsoft Azure account, and links the two accounts. Your Azure login credentials will automatically populate to Docker Cloud under Service Providers -> Microsoft Azure.
Enable your Azure subscription for Docker Cloud
Tip: If your Azure subscription is not enabled first, the swarm deployment will fail. The error will show up on your Azure portal -> resource groups -> ResourceGroupForYourSwarm -> deployments.
Go to the Microsoft Azure Marketplace and search for Docker, or specifically Docker for Azure CE.
Select Docker for Azure CE and click the option on the lower right to deploy programmatically.
Verify that your subscription is enabled.
Go to Dashboard -> Subscriptions to view details on your current subscriptions. Docker for Azure CE should be listed as enabled Programmatic deployment.
You are now ready to deploy a swarm!
Link an Azure Organization as Global Admin
For members of Azure Organizations, your gobal administrator first needs to link their account and grant permissions to Docker Cloud for the organization as a whole. Then, you can link your individual user account to Docker Cloud with your subscription ID.
The Global Admin steps are as follows:
Go to Microsoft Azure, find your Subscription ID for Global Admin rights (Azure -> Billing -> Subscriptions -> Subscriptions ID), and copy the ID.
On Docker Cloud, go to Cloud Settings -> Service Providers.
Click Global Admin, paste your Global Admin Subscription ID from Azure into the field, and click Save.
Azure Organization members can now link their user accounts to Docker Cloud per the individual user instructions above.
Where to go next
Ready to create swarms on Azure? See Create a new swarm on Microsoft Azure in Docker Cloud.
You’ll need an SSH key to provide to Docker Cloud during the swarm create process. If you haven’t done so yet, check out how to Set up SSH keys.
You can get an overivew of topics on swarms in Docker Cloud.Azure, Cloud, link