#-----------------------------------------------------------------------------------
# This is a FlashGrid Cluster configuration file template for use with AWS Outposts.
#-----------------------------------------------------------------------------------

# In this section set attributes for each cluster node.
# 'name': host name
# 'role': do not modify
# 'az': availability zone that the Outpost is attached to or where the quorum node is located.
# 'ins_type': EC2 instance size.
# 'ip': VPC private IP address that will be assigned to the EC2 instance
# 'sg': Security Group ID. All inbound and outbound traffic between the cluster nodes must be allowed.
# 'outpost_arn': ARN of the Outpost where the EC2 instance will be located.

[nodes]
instances = [
    {'name': 'rac1', 'role': 'database', 'az': 'a', 'ins_type': 'm5.8xlarge', 'ip': '10.0.1.51', 'sg': 'sg-11111111111111111', 'outpost_arn': 'arn:aws:outposts:us-west-2:123456789012:outpost/op-1111111111111111'},
    {'name': 'rac2', 'role': 'database', 'az': 'b', 'ins_type': 'm5.8xlarge', 'ip': '10.0.2.52', 'sg': 'sg-22222222222222222', 'outpost_arn': 'arn:aws:outposts:us-west-2:012345678901:outpost/op-22222222222222222'},
    {'name': 'racq', 'role': 'quorum', 'az': 'c', 'ins_type': 'c6i.large', 'ip': '10.0.3.53'},
 ]

#--------------------------------------------------------------------------------------------
# Do not modify parameters below this line. They are configurable through FlashGrid Launcher.
#--------------------------------------------------------------------------------------------

[web]
title = 'Oracle RAC on AWS Outposts: 2 database nodes, multi-AZ, quorum in region'
validate_step_active = no
show_ip = True

[common]
cluster_type = 'aws' # 'aws', 'tfaws', 'azure', 'tfazure', 'tfgoogle', or 'generic'
addons = ['skycluster', 'skycluster-on-aws']
version = '26.3'

[aws]
aws_region = 'us-east-1'
vpc_subnet_id_map = {'a': 'subnet-aaaaaaaa', 'b': 'subnet-bbbbbbbb', 'c': 'subnet-cccccccc'}
sg_list = ['sg-']
marketplace_ami = 'Oracle Linux 9'
allocate_public_ip = False
ssh_key = 'ssh-key-pair-name'
pg_name = None

[network]
cluster_name = 'myrac'
domain = 'mycompany.mydomain'

[nodes]
custom_storage_profile = False
storage_profiles = {
      "database":
              [
               {'device': 'fgvg/u01', 'vol_size': 100, 'vol_type': 'lvm', 'fs_mount_point': '/u01'},    # Local volume for software install. Do not modify or remove.
               {'device': 'fgvg/gridtmp', 'vol_size': 5,  'vol_type': 'lvm', 'dg_name': 'GRIDtmp'},    # Temp disk for GRID DG. Do not modify. Must use fgvg VG for auto removal.
               {'device': 'xvdba', 'vol_size': 5, 'dg_name': 'GRID'},                # Perm disk for GRID DG. Do not modify.
               {'device': 'xvdbb', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbc', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbd', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbe', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbf', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbg', 'vol_size': 2000, 'iops': 16000, 'mbps': 1000, 'dg_name': 'DATA', 'web_show': True},
               {'device': 'xvdbh', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
               {'device': 'xvdbi', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
               {'device': 'xvdbj', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
               {'device': 'xvdbk', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
               {'device': 'xvdbl', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
               {'device': 'xvdbm', 'vol_size': 2000, 'iops': 3000, 'mbps': 750, 'dg_name': 'FRA', 'web_show': True},
              ],
    "quorum":
              [
               {'device': 'xvdbz', 'vol_size': 1, 'dg_name': 'GRIDtmp'},   # Temp quorum disk for GRID DG. Do not modify.
               {'device': 'xvdba', 'vol_size': 1, 'dg_name': 'GRID'},      # Permanent quorum disk for GRID DG. Do not modify.
               {'device': 'xvdbb', 'vol_size': 1, 'dg_name': 'DATA'},
               {'device': 'xvdbc', 'vol_size': 1, 'dg_name': 'FRA'},
              ],
 }


[oracle]
disk_groups = [{'name': 'DATA'}, {'name': 'FRA'}]
redundancy = 'NORMAL'
griddg_redundancy = 'NORMAL'

# In case of a cluster deployment across multiple Outposts, Local Gateway and Service Link connections will have reduced MTU size. MTU size for all CLAN interfaces must be reduced accordingly:
#  * for database nodes MTU=1450, which corresponds to MTU=1500 via Local Gateway
#  * for quorum nodes in region MTU=1250, which corresponds to MTU=1300 via Service Link (wtih single Outpost deployment, quorum node should be on the same Outpost)

[clan]
roles = {
          'database': {'interface': 'eth0',
                       'root_bw': 'override',
                       'txq': 'override',
                       'upload_cfg': True,
                       'direct': {'max_bw': '40%', 'min_bw': '5%', 'prio': 2},
                       'direct_iscsi': {'max_bw': '70%', 'min_bw': '15%', 'prio': 1},
                       'vifs': {'fg-priv': {'mtu': 1450, 'max_bw': '70%', 'min_bw': '15%', 'peers': ['database', 'db-only']},
                       'fg-pub': {'mtu': 1450, 'max_bw': '15%', 'min_bw': '5%', 'peers': ['database', 'db-only', 'storage', 'quorum', 'client']},
                       'fg-storage': {'mtu': 1450, 'max_bw': '15%', 'min_bw': '5%', 'peers': ['database', 'db-only', 'storage', 'quorum']}}},

          'quorum': {'interface': 'eth0',
                     'root_bw': 'override',
                     'txq': 'override',
                     'upload_cfg': True,
                     'direct': {'max_bw': '70%', 'min_bw': '3%', 'prio': 2},
                     'direct_iscsi': {'max_bw': '90%', 'min_bw': '10%', 'prio': 1},
                     'vifs': {'fg-pub': {'mtu': 1250, 'max_bw': '70%', 'min_bw': '3%', 'peers': ['database', 'db-only', 'storage', 'quorum']},
                     'fg-storage': {'mtu': 1250, 'max_bw': '70%', 'min_bw': '4%', 'peers': ['database', 'db-only']}}}
 }
