Skip to content

Commit

Permalink
Azurize template, bump version and change project name to ‘redis’
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Harris authored and Dan Harris committed Jun 18, 2018
1 parent a891366 commit 98429c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 95 deletions.
4 changes: 2 additions & 2 deletions project.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = redis-cluster
version = 1.1.2
name = redis
version = 1.1.3


[spec proxy]
Expand Down
110 changes: 17 additions & 93 deletions templates/redis-cluster.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ Order = 10
Description = "Specify the credentials required for access to the node. The Keypair Path specifies the path on local machines for cyclecloud CLI access."
Order = 20

[[[parameter awsKeypair]]]
Label = AWS Keypair
Description = The keypair to connect with
ParameterType = AWS.Keypair
DefaultValue = cyclecloud
Conditions.Required := CloudProvider === "AWS"
Conditions.Excluded := CloudProvider !== "AWS"

[[[parameter keypairLocation]]]
Label = Keypair Path
Description = The path to the keypair
Expand Down Expand Up @@ -70,7 +62,7 @@ Description = Specify the scheduling software, and base OS installed on all node

[[[parameter ProjectVersion]]]
Label = Project Version
DefaultValue = 1.1.2
DefaultValue = 1.1.3
Description = Select the Redis project spec version
Hidden = true

Expand Down Expand Up @@ -101,63 +93,18 @@ Description = Specify the scheduling software, and base OS installed on all node
Description = The machine type for the optional proxy host
ParameterType = Cloud.MachineType
[[[[record Config.ProviderDefaults]]]]
AWS = m3.large
Azure = Standard_A2_v2
GCP = n1-standard-4


[[[parameter ServerMachineType]]]
Label = Server
Description = The machine type for the Redis servers
ParameterType = Cloud.MachineType
[[[[record Config.ProviderDefaults]]]]
AWS = m3.large
Azure = Standard_DS4_v2
GCP = n1-standard-4

[[parameter EnableTerminationProtection]]
Label = Term Protection
DefaultValue = false
Widget.Plugin = pico.form.BooleanCheckBox
Widget.Label = Enable Termination Protection?

[[parameter ServerGcpTagList]]
Label = Tag List
ParameterType = StringList
Conditions.Excluded := CloudProvider !== "GCP"

[[parameter RedisAccessArn]]
Label = IAM Profile
DefaultValue := undefined
Conditions.Excluded := CloudProvider !== "AWS"


[parameters Networking]
Order = 50

[[parameters AWS]]
Order = 20
Conditions.Excluded := CloudProvider !== "AWS"
Description = "Optional use of VPC components. Without specifying a subnet or security group the hosts will be started in the default region, VPC and security group."

[[[parameter AwsProxySubnetId]]]
Label = Proxy Subnet
ParameterType = AWS.Subnet
Description = The subnet ID to use when in a VPC environment
Conditions.Excluded := CloudProvider !== "AWS"

[[[parameter AwsSubnetId]]]
Label = VPC Subnets
ParameterType = AWS.Subnet
AutoSelect = true
Description = The subnet ID to use when in a VPC environment.
Conditions.Excluded := CloudProvider !== "AWS"

[[[parameter RedisSecurityGroups]]]
Label = Security Group(s)
Description = "The security group ID(s) to use. Can be comma-separated list for multiple security groups. eg: sg-a0000001, sg-a0000002."
ParameterType = AWS.SecurityGroupList

[[parameters Azure Virtual Network Configuration]]
Order = 40
Conditions.Excluded := CloudProvider !== "Azure"
Expand All @@ -169,23 +116,18 @@ Order = 50
Conditions.Required := CloudProvider === "Azure"
Conditions.Excluded := CloudProvider !== "Azure"

[[parameters Google Compute Network Configuration]]
Order = 40
Description = No custom configuration required.
Conditions.Excluded := CloudProvider !== "GCP"

[[[parameter UsePublicNetwork]]]
Label = Public Networking
DefaultValue = true
ParameterType = Boolean
Config.Label = Allow access from the Internet
[[[parameter UsePublicNetwork]]]
Label = Public Networking
DefaultValue = true
ParameterType = Boolean
Config.Label = Allow access from the Internet

[[[parameter ExecuteNodesPublic]]]
Label = Public Execute
DefaultValue = false
ParameterType = Boolean
Config.Label = Make the Redis servers accessible from the Internet
Conditions.Excluded := UsePublicNetwork isnt true
[[[parameter ExecuteNodesPublic]]]
Label = Public Execute
DefaultValue = false
ParameterType = Boolean
Config.Label = Make the Redis servers accessible from the Internet
Conditions.Excluded := UsePublicNetwork isnt true


[cluster RedisCluster]
Expand All @@ -197,40 +139,25 @@ IconUrl = static/cloud/cluster/ui/ClusterIcon/redis-icon.png
Autoscale = false

[[node defaults]]
TerminationProtection = $EnableTerminationProtection
ImageName = $ImageName
UsePublicNetwork = $UsePublicNetwork

# Chef and Locker Config
Credentials = $Credentials

# EC2
AWS.InstanceProfileArn=$RedisAccessArn
KeyPair = $AwsKeypair
KeyPairLocation = $KeypairLocation
SecurityGroups = $RedisSecurityGroups

SubnetId = ${IfThenElse(CloudProvider==="Azure", AzureSubnetId, AwsSubnetId)}

# Azure
SubnetId = $AzureSubnetId
Region = $Region

[[[cluster-init redis-cluster:default:$ProjectVersion]]]
# Cycle Examples Repository
Locker = cyclecloud
[[[cluster-init cyclecloud/redis-cluster:default:$ProjectVersion]]]

[[node proxy]]
IsReturnProxy = true
MachineType = $ProxyMachineType
SubnetId = ${IfThenElse(CloudProvider==="Azure", AzureSubnetId, AwsProxySubnetId)}
SubnetId = $AzureSubnetId

[[[configuration]]]
run_list = recipe[cganglia::server]
cyclecloud.discoverable = true

[[[cluster-init redis-cluster:proxy:$ProjectVersion]]]
# Cycle Examples Repository
Locker = cyclecloud
[[[cluster-init cyclecloud/redis-cluster:proxy:$ProjectVersion]]]

# Configure Azure external input endpoints (for example SSH)
[[[input-endpoint SSH]]]
Expand All @@ -246,8 +173,6 @@ IconUrl = static/cloud/cluster/ui/ClusterIcon/redis-icon.png
MachineType = $ServerMachineType
InitialCount = $RedisClusterSize

TagList = $ServerGcpTagList

[[[network-interface]]]
AssociatePublicIpAddress = $ExecuteNodesPublic

Expand All @@ -257,8 +182,7 @@ IconUrl = static/cloud/cluster/ui/ClusterIcon/redis-icon.png
cyclecloud.discoverable = true
redis.cluster_size = $RedisClusterSize

[[[cluster-init redis-cluster:server:$ProjectVersion]]]
Locker = cyclecloud
[[[cluster-init cyclecloud/redis-cluster:server:$ProjectVersion]]]

# Configure Azure external input endpoints (for example SSH)
[[[input-endpoint SSH]]]
Expand Down

0 comments on commit 98429c0

Please sign in to comment.