The Azure Redis Cache Plugin integrates RightScale Self-Service with the basic functionality of the Azure Redis Cache service.
- 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. - Azure Service Principal (AKA Azure Active Directory Application) with the appropriate permissions to manage resources in the target subscription
- The following RightScale Credentials
AZURE_APPLICATION_ID
AZURE_APPLICATION_KEY
- 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_mysql_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_mysql_plugin.rb
file located in this repository
The Azure Redis Cache Plugin has been packaged as plugins/rs_azure_redis
. In order to use this plugin you must import this plugin into a CAT.
import "plugins/rs_azure_redis"
For more information on using packages, please refer to the RightScale online documentation. Importing a Package
Azure Redis Cache 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.
- cache
- firewall_rule
- patch_schedule
#Creates a Redis Cache
parameter "subscription_id" do
like $rs_azure_redis.subscription_id
end
resource "cache1", type: "rs_azure_redis.cache" do
name join(["cache1-", last(split(@@deployment.href, "/"))])
resource_group "test_resource_group"
location "North Central US"
properties do {
"sku": {
"name": "Premium",
"family": "P",
"capacity": 1
},
"enableNonSslPort": true,
"shardCount": 1,
"redisConfiguration": {
"maxclients": "7500",
"maxmemory-reserved": "200",
"maxfragmentationmemory-reserved": "300",
"maxmemory-delta": "200"
}
} end
tags do {
"ElasticCache" => "1"
} end
end
resource "firewall_rule", type: "rs_azure_redis.firewall_rule" do
name "sample_firewall_rule"
resource_group "test_resource_group"
server_name @cache1.name
properties do {
"startIP" => "192.168.1.1",
"endIP" => "192.168.1.254"
} end
end
resource "patch_schedule", type: "rs_azure_redis.patch_schedule" do
resource_group "test_resource_group"
server_name @cache1.name
properties do {
"scheduleEntries": [
{
"dayOfWeek": "Monday",
"startHourUtc": 12,
"maintenanceWindow": "PT6H"
},
{
"dayOfWeek": "Tuesday",
"startHourUtc": 12
}
]
} end
end
Field Name | Required? | Description |
---|---|---|
name | Yes | The name of the Redis server. |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
properties | Yes | Hash of Redis Cache properties (https://docs.microsoft.com/en-us/rest/api/redis/redis) |
Action | API Implementation | Support Level |
---|---|---|
create&update | Create Or Update | Supported |
destroy | Delete | Supported |
get | Get | Supported |
import | Import | Untested |
export | Export | Untested |
reboot | forceReboot | Untested |
listkeys | listKeys | Untested |
regeneratekey | RegenerateKey | Untested |
- "id"
- "name"
- "type"
- "location"
- "kind"
- "properties"
- "state"
- "provisioningState"
- "provisioningState"
- "redisVersion"
- "primaryKey"
- "secondaryKey"
- "sku"
- "enableNonSslPort"
- "redisConfiguration"
- "hostName"
- "port"
- "sslPort"
Field Name | Required? | Description |
---|---|---|
name | Yes | The name of the Redis Server FW Rule. |
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
server_name | Yes | Server to create the fw rule on |
properties | Yes | Hash of FirewallRule properties (https://docs.microsoft.com/en-us/rest/api/redis/firewallrules) |
Action | API Implementation | Support Level |
---|---|---|
create&update | Create Or Update | Supported |
destroy | Delete | Supported |
get | Get | Supported |
- "id"
- "name"
- "type"
- "startIP"
- "endIP"
Field Name | Required? | Description |
---|---|---|
resource_group | Yes | Name of resource group in which to launch the Deployment |
location | Yes | Datacenter to launch in |
server_name | Yes | Server to create the patch schedule on |
properties | Yes | Hash of Patch Schedule properties (https://docs.microsoft.com/en-us/rest/api/redis/patchschedules) |
Action | API Implementation | Support Level |
---|---|---|
create&update | Create Or Update | Supported |
destroy | Delete | Supported |
get | Get | Supported |
- "id"
- "name"
- "type"
- "properties"
- "scheduleEntries"
- The Azure Redis Cache Plugin makes no attempt to support non-Azure resources. (i.e. Allow the passing the RightScale or other resources as arguments to a Redis Cache resource.)
Full list of possible actions can be found on the Azure Redis Cache API Documentation
Please review redis_test_cat.rb for a basic example implementation.
The Azure Redis Cache Plugin source code is subject to the MIT license, see the LICENSE file.