The Azure Compute Plugin integrates RightScale Self-Service with the basic functionality of the Azure Compute
This plugin uses credentials for connecting to the cloud -- in order to apply this plugin you must have a credential registered in the system that is compatible with this plugin. If there are no credentials listed when you apply the plugin, please contact your cloud admin and ask them to register a credential that is compatible with this plugin. The information below should be consulted when creating the credential.
- A general understanding CAT development and definitions
- Refer to the guide documentation for details SS Guides
- The
admin
,ss_designer
&ss_end_user
roles, in a RightScale account with SelfService enabled.admin
is needed to retrieved the RightScale Credential values identified below. - The following packages are also required (See the Installation section for details):
- Be sure your RightScale account has Self-Service enabled
- Connect AzureRM Cloud credentials to your RightScale account (if not already completed)
- Follow steps to Create an Azure Active Directory Application
- Grant the Azure AD Application access to the necessary subscription(s)
- Retrieve the Application ID & Authentication Key
- Create RightScale Credentials with values that match the Application ID (Credential name:
AZURE_APPLICATION_ID
) & Authentication Key (Credential name:AZURE_APPLICATION_KEY
) - Retrieve your Tenant ID
- Update
azure_compute_plugin.rb
Plugin with your Tenant ID.- Replace "TENANT_ID" in
token_url "https://login.microsoftonline.com/TENANT_ID/oauth2/token"
with your Tenant ID
- Replace "TENANT_ID" in
- Navigate to the appropriate Self-Service portal
- For more details on using the portal review the SS User Interface Guide
- In the Design section, use the
Upload CAT
interface to complete the following:- Upload each of packages listed in the Requirements Section
- Upload the
azure_compute_plugin.rb
file located in this repository
The Azure Compute Plugin has been packaged as plugins/rs_azure_compute
. In order to use this plugin you must import this plugin into a CAT.
import "plugins/rs_azure_compute"
For more information on using packages, please refer to the RightScale online documentation. Importing a Package
Azure Compute resources can now be created by specifying a resource declaration with the desired fields. See the Supported Actions section for a full list of supported actions. The resulting resource can be manipulated just like the native RightScale resources in RCL and CAT. See the Examples Section for more examples and complete CAT's.
- availability_set
- virtualmachine
- extensions
parameter "subscription_id" do
like $rs_azure_compute.subscription_id
end
permission "read_credentials" do
actions "rs_cm.show_sensitive","rs_cm.index_sensitive"
resources "rs_cm.credentials"
end
resource "my_availability_set", type: "rs_azure_compute.availability_set" do
name @@deployment.name
resource_group "rs-default-central-us"
location "Central US"
sku do {
"name" => "Aligned"
} end
properties do {
"platformUpdateDomainCount" => 5,
"platformFaultDomainCount" => 3
} end
end
Field Name | Required? | Description |
---|---|---|
name | Yes | The name of the availability_set |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
sku.name | Yes | Specifies whether the availability set is managed or not. Possible values are: Aligned or Classic. An Aligned availability set is managed, Classic is not. |
properties | No | Hash of availability_set properties(https://docs.microsoft.com/en-us/rest/api/compute/availabilitysets/availabilitysets-create) |
Action | API Implementation | Support Level |
---|---|---|
create&update | Create Or Update | Supported |
destroy | Delete | Supported |
get | Get | Supported |
- id
- name
- type
- location
- sku
- properties
Field Name | Required? | Description |
---|---|---|
name | Yes | Specifies name of vm |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
Action | API Implementation | Support Level |
---|---|---|
get | Get | Supported |
update | Update | Supported |
vmSizes | vmSizes | Supported |
list | List | Supported |
list_all | List All | Supported |
stop | Deallocate | Supported |
start | Start | Supported |
instance_view | Instance View | Supported |
- id
- name
- type
- location
- properties
- tags
Field Name | Required? | Description |
---|---|---|
name | Yes | Specifies name of vm |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
virtualMachineName | Yes | Name of virtual machine to add extension to |
properties | Yes | Hash of extension options |
protectedSettings | Yes | Private configuration for the Extension that is encrypted. For example,pass a database password to the script. NOTE: This value is not returned on the GET. |
Action | API Implementation | Support Level |
---|---|---|
get | Get | Supported |
create | Put | Supported |
delete | Delete | Supported |
- id
- name
- type
- location
- properties
Field Name | Required? | Description |
---|---|---|
name | Yes | Specifies name of vm scale set |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
properties | Yes | Hash of extension options |
sku | Yes | The virtual machine scale set sku. |
plan | No | Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. |
Action | API Implementation | Support Level |
---|---|---|
get | Get | Supported |
create | Put | Supported |
delete | Delete | Supported |
- id
- identity
- location
- name
- type
- plan
- properties
- sku
- zones
- tags
- properties
- The Azure Compute Plugin makes no attempt to support non-Azure resources. (i.e. Allow the passing the RightScale or other resources as arguments to an LB resource.)
Full list of possible actions can be found on the Azure Compute API Documentation
Please review compute_test_cat.rb for a basic example implementation.
The Azure Compute Plugin source code is subject to the MIT license, see the LICENSE file.