main.yml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ---
  2. openshift_metering_install: true
  3. openshift_metering_operator_image: ''
  4. openshift_metering_config: null
  5. # Configures AWS Access credentials on all pods which use it for communicating
  6. # with S3.
  7. openshift_metering_aws_access_key_id: ""
  8. openshift_metering_aws_secret_access_key: ""
  9. # RDS Database for custom Hive Metastore DB options
  10. openshift_metering_hive_metastore_db_use_rds: false
  11. # If openshift_metering_hive_metastore_db_rds_create is true, creates an RDS
  12. # database for Hive Metastore metadata.
  13. openshift_metering_hive_metastore_db_rds_create: "{{ openshift_metering_hive_metastore_db_use_rds }}"
  14. # If openshift_metering_hive_metastore_db_rds_delete is true, delete the RDS
  15. # database specified by openshift_metering_hive_metastore_db_rds_instance_name.
  16. openshift_metering_hive_metastore_db_rds_delete: false
  17. openshift_metering_hive_metastore_db_rds_instance_name: 'metering-hive-metastore'
  18. openshift_metering_hive_metastore_db_rds_instance_db_name: 'metering_hive_metastore'
  19. openshift_metering_hive_metastore_db_rds_instance_db_engine: 'MySQL'
  20. openshift_metering_hive_metastore_db_rds_instance_size: 10
  21. openshift_metering_hive_metastore_db_rds_instance_type: 'db.m1.small'
  22. openshift_metering_hive_metastore_db_rds_instance_username: 'hive'
  23. openshift_metering_hive_metastore_db_rds_instance_password: null
  24. openshift_metering_hive_metastore_db_rds_instance_publicly_accessible: false
  25. openshift_metering_hive_metastore_db_rds_instance_wait: true
  26. openshift_metering_hive_metastore_db_rds_instance_wait_timeout: 600
  27. openshift_metering_hive_metastore_db_rds_subnet_group: null
  28. openshift_metering_hive_metastore_db_rds_vpc_security_groups: null
  29. openshift_metering_hive_metastore_db_rds_apply_immediately: true
  30. # If openshift_metering_hive_metastore_db_use_rds is true, then this variable
  31. # will set the default of the other hvie_metastore_db values to use the RDS
  32. # database specified. Otherwise Hive Metastore will use a embedded derby
  33. # database in a volume.
  34. openshift_metering_hive_metastore_db_deployment_type: "{{ openshift_metering_hive_metastore_db_use_rds | ternary('rds', 'derby_local') }}"
  35. # Custom Hive Metastore DB options
  36. openshift_metering_hive_metastore_db_use_custom: "{{ l_openshift_metering_hive_metastore_db_dict[openshift_metering_hive_metastore_db_deployment_type].use_custom }}"
  37. openshift_metering_hive_metastore_db_engine: "{{ l_openshift_metering_hive_metastore_db_dict[openshift_metering_hive_metastore_db_deployment_type].engine }}"
  38. openshift_metering_hive_metastore_db_driver: "{{ l_openshift_metering_hive_metastore_db_dict[openshift_metering_hive_metastore_db_deployment_type].driver }}"
  39. openshift_metering_hive_metastore_db_url: "{{ l_openshift_metering_hive_metastore_db_url_dict[openshift_metering_hive_metastore_db_deployment_type].url }}"
  40. openshift_metering_hive_metastore_db_username: "{{ l_openshift_metering_hive_metastore_db_dict[openshift_metering_hive_metastore_db_deployment_type].username }}"
  41. openshift_metering_hive_metastore_db_password: "{{ l_openshift_metering_hive_metastore_db_dict[openshift_metering_hive_metastore_db_deployment_type].password }}"
  42. # S3 default storage options. If openshift_metering_default_storage_use_s3 is
  43. # true, then the openshift_metering_default_storage_* variables will be set to
  44. # use the S3 specified S3 bucket.
  45. openshift_metering_default_storage_use_s3: false
  46. # If openshift_metering_s3_bucket_create is true, creates an S3 bucket to store
  47. # metering data in.
  48. openshift_metering_s3_bucket_create: "{{ openshift_metering_default_storage_use_s3 }}"
  49. # If openshift_metering_s3_bucket_delete is true, delete the bucket specified
  50. # by openshift_metering_s3_storage_bucket_name.
  51. openshift_metering_s3_bucket_delete: false
  52. openshift_metering_s3_storage_bucket_name: openshift-metering-storage
  53. openshift_metering_s3_storage_bucket_path: metering-data
  54. # If openshift_metering_default_storage_use_s3 is set, the default storage
  55. # variables will be set to use the S3 bucket defined by the
  56. # openshift_metering_s3_* variables. Otherwise use HDFS with no customizations
  57. # to the default_storage variables.
  58. openshift_metering_default_storage_deployment_type: "{{ openshift_metering_default_storage_use_s3 | ternary('s3', 'hdfs') }}"
  59. # If openshift_metering_hdfs_enabled is true, HDFS will be installed. Otherwise
  60. # HDFS will be disabled and no HDFS pods will be created.
  61. # When set to false, then openshift_metering_default_storage_* options or
  62. # openshift_mtering_s3_storage_* options should be specified.
  63. openshift_metering_hdfs_enabled: "{{ l_openshift_metering_default_storage_dict[openshift_metering_default_storage_deployment_type].hdfs_enabled }}"
  64. # Custom Default Storage location options
  65. openshift_metering_default_storage_use_custom: "{{ l_openshift_metering_default_storage_dict[openshift_metering_default_storage_deployment_type].use_custom }}"
  66. openshift_metering_default_storage_name: "{{ l_openshift_metering_default_storage_dict[openshift_metering_default_storage_deployment_type].name }}"
  67. openshift_metering_default_storage_type: "{{ l_openshift_metering_default_storage_dict[openshift_metering_default_storage_deployment_type].type }}"
  68. openshift_metering_default_storage_config: "{{ l_openshift_metering_default_storage_dict[openshift_metering_default_storage_deployment_type].config }}"
  69. # Below are just dicts for mapping how variable values should be set by default
  70. # according to other variables values. Users should not modify any of these
  71. # values
  72. # a map of db engine to JDBC driver
  73. l_db_engine_to_driver:
  74. mysql: 'com.mysql.jdbc.Driver'
  75. postgres: 'org.postgresql.Driver'
  76. # Mapping of metastore_db values depending on if the deployment uses derby or
  77. # RDS
  78. l_openshift_metering_hive_metastore_db_dict:
  79. derby_local:
  80. use_custom: false
  81. driver: null
  82. username: null
  83. password: null
  84. rds:
  85. use_custom: true
  86. engine: "{{ openshift_metering_hive_metastore_db_rds_instance_db_engine | lower }}"
  87. driver: "{{ l_db_engine_to_driver[(openshift_metering_hive_metastore_db_rds_instance_db_engine | lower)] }}"
  88. username: "{{ openshift_metering_hive_metastore_db_rds_instance_username }}"
  89. password: "{{ openshift_metering_hive_metastore_db_rds_instance_password }}"
  90. # We use a separate dict here to avoid undefined variable access since this
  91. # depends on openshift_metering_hive_metastore_db_facts which is a registered
  92. # var from the rds install task
  93. l_openshift_metering_hive_metastore_db_url_dict:
  94. derby_local:
  95. url: null
  96. rds:
  97. url: "jdbc:{{ openshift_metering_hive_metastore_db_facts.instance.engine }}://{{ openshift_metering_hive_metastore_db_facts.instance.endpoint }}:{{ openshift_metering_hive_metastore_db_facts.instance.port }}/{{ openshift_metering_hive_metastore_db_facts.instance.db_name }}"
  98. # Mapping of default_storage values depending on if using HDFS or S3.
  99. l_openshift_metering_default_storage_dict:
  100. hdfs:
  101. hdfs_enabled: true
  102. use_custom: false
  103. name: ""
  104. type: ""
  105. config: null
  106. s3:
  107. hdfs_enabled: false
  108. use_custom: true
  109. name: "{{ openshift_metering_s3_storage_bucket_name }}"
  110. type: "hive"
  111. config:
  112. hive:
  113. tableProperties:
  114. location: "s3a://{{ openshift_metering_s3_storage_bucket_name }}/{{ openshift_metering_s3_storage_bucket_path | default('') }}"