cloud-cd
This module abstracts the process of continuous delivery on multiple clouds.
Resources
pkgcloud
: This module uses pkgcloud for creating and managing resources on different clouds.
Known Issues
This package currently uses CatalystCode/pkgcloud directly to enable azure ARM. Once the pull request is merged, the relevant dependency should also be updated.
Currently supports Windows Server 2012 and up for running remote commands (using SSH).
Usage
- Create a service principal
- Create a resource group in azure (i.e. "resources-rg")
- Create the following config (edit to match your account's info):
// This is an example of the values you need to insert (it will not work as is)// Make sure to update all values with your relevant datavar config = azure: connection: provider: 'azure-v2' subscriptionId: "e9be1fc6-cb43-4830-99f9-0251055fecec" resourceGroup: "resources-rg" servicePrincipal: clientId: "2285862c-d875-45f2-a53a-57d7a5b76606" secret: "FIUH34R98HSsdfHF9438swoieFNcij3SffsSf45nJFl=" domain: "06f306c4-bc72-4ad4-99ac-a6b5f4b56cc9" server: name: 'vm-name' flavor: 'Standard_D1' username: 'cloudcdusr' password: 'Cloudcdusr!!' storageOSDiskName: "osdisk" storageDataDiskNames: "datadisk1" osType: 'Linux' imagePublisher: "Canonical" imageOffer: "UbuntuServer" imageSku: "16.04.0-LTS" imageVersion: "latest"
- Execute the following command:
var cloudCD = ; var getVMClient = configazureconnection;getVMClient; var createVMClient = configazureconnection;createVMClient; var remoteExecuteClient = configazureconnection;// Windows remote execute samplevar ps_script = path;remoteExecuteClient; // Linux remote execute samplevar ssh_script = path;remoteExecuteClient; var destroyVMClient = configazureconnection;destroyVMClient;
Lisence
MIT