.. _cluster-config: cluster-config.yml ============================= This is the current template that is used to place cluster-config.yml into each cluster directory by ``k9 create project``. Some values will be pre-filed, but users are free to edit any value in cluster-config.yml before running ``k9 create cluster``. :: clusterName: '{{clusterName}}' baseDomain: '{{clusterName}}.{{rootDomain}}' validationDomain: '{{rootDomain}}' cidrPrefix: '10.10' isCicd: {{isCicd}} eksVersion: 1.21 workerGroups: - workerGroupName: 'workerGroup1' instanceType: 't3.large' amiType: 'AL2_x86_64' desiredCount: 2 minCount: 1 maxCount: 4 databases: - dBClusterId: '{{clusterName}}-rds-db' engineType: 'postgres' engineVersion: '11.12' isProduction: {{isPrd}} default: true General ------- All values are to be given as strings unless otherwise stated. ``clusterName`` : the name of the cluster. Must only contain alphanumeric characters and hyphens ('-'). Suggested names: - prd - np - cicd - test ``baseDomain`` : baseDomain for the standard logging and monitoring apps to use. Must begin with clusterName. This will be used for the following urls: - kibana.baseDomain - grafana.baseDomain - prometheus.baseDomain If you run ``k9 create cicd`` then these urls will be used: - jenkins.baseDomain - sonar.baseDomain ``validationDomain`` : the domain used to send the certificate approval email. Must be a super-domain of ``baseDomain``. ``cidrPrefix`` : The cidr prefix to use in the cluster's vpc. Must be two numbers separated by a period. Ex: - ``10.10`` - ``10.0`` - ``100.68`` ``isCicd`` : Boolean. If true, the cluster worker nodes are given the CloudFrontFullAccess and AmazonEC2ContainerRegistryFullAccess policies. ``eksVersion`` : Optional. The version to use for the EKS cluster. If not specified defaults to ``1.21``. workerGroups ------------ List of worker groups to create for the cluster. See the `AWS nodegroup documentation `_ on ``AWS::EKS::Nodegroup`` for more information if needed. ``workerGroupName`` : name of this EKS Nodegroup. Must be unique. ``instanceType`` : AWS instanceType for the workers. ``amiType`` : AWS AMI type. Allowed values: * ``AL2_ARM_64`` * ``AL2_x86_64`` * ``AL2_x86_64_GPU`` * ``BOTTLEROCKET_ARM_64`` * ``BOTTLEROCKET_x86_64`` ``desiredCount`` : (Integer) The current number of nodes that the managed node group should maintain. ``minCount`` : (Integer) The minimum number of nodes that the managed node group can scale in to. ``maxSize`` : (Integer. Minimum: 1) The maximum number of nodes that the managed node group can scale out to. databases --------- List of database instances to create for the cluster. See the `AWS documentation `_ on ``AWS::RDS::DBInstance`` for more information if needed. ``dBClusterId`` - the DBInstanceIdentifier. Must be unique. ``template`` - **unused** ``engineType`` - The database engine. See `AWS engine docs `_ for all options ``engineVersion`` - The version for your selected engineType. See `AWS docs `_ for all options ``isProduction`` - (Boolean) Use the production grade DBInstance values, or a cheaper one for testing. * Production :: DBInstanceClass: db.m5.large AllocatedStorage: 128 MultiAZ: true * Non-Production :: DBInstanceClass: db.t3.micro AllocatedStorage: 16 ``default`` - (Boolean) Should only be included on one database in the list. All databases will be tagged with a TagName: ``default`` and a boolean value ``True`` or ``False``. The database instance with the ``default`` tag set to ``True`` will be used by k9's create_app_database() function when deploying applications. Examples -------- Simple example :: clusterName: 'np' baseDomain: 'np.k9-app.example.com' validationDomain: 'example.com' cidrPrefix: '10.10' workerGroups: - workerGroupName: 'workerGroup1' instanceType: 't3.medium' amiType: 'AL2_x86_64' desiredCount: 2 minCount: 1 maxCount: 4 databases: - dBClusterId: 'np-rds-db' engineType: 'postgres' engineVersion: '11.12' isProduction: false default: true Multiple Worker Groups and Databases :: clusterName: 'prd' baseDomain: 'prd.k9-example.example.com' validationDomain: 'example.com' cidrPrefix: '10.10' workerGroups: - workerGroupName: 'workerGroup1' instanceType: 't3.medium' amiType: 'AL2_x86_64' desiredCount: 2 minCount: 1 maxCount: 4 - workerGroupName: 'workerGroup2' instanceType: 't3.small' amiType: 'AL2_x86_64' desiredCount: 2 minCount: 1 maxCount: 4 databases: - dBClusterId: 'prd-test-rds-db' engineType: 'postgres' engineVersion: '11.12' isProduction: false - dBClusterId: 'prd-test-rds-db2' engineType: 'postgres' engineVersion: '11.12' isProduction: true default: true