Skip to content

Commit

Permalink
Support per-scale-type parameters in ocfp mgmt
Browse files Browse the repository at this point in the history
[Improvements]

* OCFP feature better supports default and custom aws instance type and
  ephemeral disk sizes for create-env (aka proto or mgmt) deployments.

[Breaking Changes]

* Not so much breakage, but this kit does require users to be running
  Genesis v2.8.12 (or better)
  • Loading branch information
dennisjbell committed Dec 15, 2023
1 parent 4064444 commit 3b9edea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docs: https://github.com/genesis-community/bosh-genesis-kit
code: https://github.com/genesis-community/bosh-genesis-kit
version: 2.0.0

genesis_version_min: 2.8.9
genesis_version_min: 2.8.12
use_create_env: allow

certificates:
Expand Down
2 changes: 2 additions & 0 deletions ocfp/aws/mgmt-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
aws_instance_type: t3.medium
ephemeral_disk_size: 10000
1 change: 1 addition & 0 deletions ocfp/aws/mgmt-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--- {}
13 changes: 8 additions & 5 deletions ocfp/aws/mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ meta:
ca: (( vault meta.vault "/ssl/ca:certificate" ))
cert: (( vault meta.vault "/ssl/mbus:certificate" ))
key: (( vault meta.vault "/ssl/mbus:key" ))

mgmt:
# For mgmt (create-env) it's the subnet 0's AZ
az: (( vault meta.ocfp.vault.tf "/bosh/iaas/subnets/ocfp/0:availability_zone" ))
sgs:
- (( vault meta.ocfp.vault.tf "/bosh/iaas/sgs/default:id" ))
- (( vault meta.ocfp.vault.tf "/bosh/iaas/sgs/mgmt:id" ))

scale_defaults: (( load meta.ocfp.scale_defaults_filename ))
scale_defaults_filename: (( concat $GENESIS_KIT_PATH "/ocfp/aws/mgmt-" meta.ocfp.env.scale ".yml" ))

params:
aws_ebs_encryption: true
aws_key_name: (( grab meta.ocfp.bosh.key_name ))
Expand All @@ -31,8 +34,8 @@ params:
bosh_vm_type: (( concat "bosh-" meta.ocfp.env.scale ))
bosh_disk_type: (( concat "bosh-" meta.ocfp.env.scale ))
# Therefore we add these also, until this can be adjusted in the future then drop these:
aws_instance_type: (( concat "bosh-" meta.ocfp.env.scale ))
ephemeral_disk_size: (( concat "bosh-" meta.ocfp.env.scale ))
aws_instance_type: (( grab meta.ocfp.scale_defaults.aws_instance_type || "m5.xlarge" ))
ephemeral_disk_size: (( grab meta.ocfp.scale_defaults.ephemeral_disk_size || "25000" ))

availability_zones:
- (( grab meta.ocfp.bosh.mgmt.az ))
Expand All @@ -41,7 +44,7 @@ bosh-variables:
az: (( grab meta.ocfp.bosh.mgmt.az ))
region: (( grab meta.ocfp.bosh.region ))
subnet_id: (( grab meta.ocfp.bosh.subnet_id ))
internal_cidr: (( grab meta.ocfp.bosh.cidr ))
internal_cidr: (( grab meta.ocfp.bosh.cidr ))
internal_ip: (( grab meta.ocfp.bosh.ip ))
internal_gw: (( grab meta.ocfp.bosh.gateway ))
internal_dns: (( grab meta.ocfp.bosh.dns ))
Expand Down Expand Up @@ -75,7 +78,7 @@ instance_groups:
properties:
aws:
encrypted: (( grab params.aws_ebs_encryption ))

---
- path: /resource_pools/name=vms/cloud_properties?
type: replace
Expand Down

0 comments on commit 3b9edea

Please sign in to comment.