-
Notifications
You must be signed in to change notification settings - Fork 0
/
massdriver.yaml
192 lines (188 loc) · 6.08 KB
/
massdriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
schema: draft-07
name: gcp-cloud-sql-mysql
description: "GCP Cloud SQL MySQL Database"
source_url: github.com/massdriver-cloud/gcp-cloud-sql-mysql
access: public
type: bundle
# uncomment when the CLI supports it
# type: infrastructure
# tags:
# - database
# cloud:
# - GCP
params:
examples:
- __name: Development
instance_configuration:
disk_size: 20
disk_type: PD_HDD
tier: db-g1-small
database_configuration:
high_availability: false
deletion_protection: false
required:
- engine_version
- username
- instance_configuration
- database_configuration
- transaction_log_retention_days
- deletion_protection
properties:
engine_version:
type: string
title: MySQL Major Version
description: The major version of MySQL to use for your database. GCP manages minor version upgrades.
default: MYSQL_8_0
oneOf:
- title: 8.x
const: MYSQL_8_0
- title: "5.7"
const: MYSQL_5_7
username:
title: Username
description: Primary DB username.
type: string
default: root
minLength: 1
maxLength: 63
instance_configuration:
type: object
title: Instance Configuration
description: "Instance type, disk size, configure properties for your primary instance."
required:
- disk_size
- disk_type
- tier
properties:
disk_size:
type: integer
title: Disk Size
description: The size of the primary database instance in GB.
minimum: 20
maximum: 3054
disk_type:
type: string
title: Disk Type
description: Solid State has better performance for mixtures of reads and writes. Use Hard Disks for continuous read workloads or for cheaper storage.
default: PD_SSD
oneOf:
- title: Solid State
const: PD_SSD
- title: Hard Disk
const: PD_HDD
tier:
type: string
title: Instance Type
description: The type of compute used for the master instance.
# TODO: make db instances and instances in general UI widgets
oneOf:
- title: 'Shared-core: 1 vCPU 600MB Memory'
const: db-f1-micro
- title: 'Shared-core: 1 vCPU 1.7GB Memory'
const: db-g1-small
- title: 'General: 1 vCPU 3.8GB Memory'
const: db-n1-standard-1
- title: 'General: 2 vCPUs 3.8GB Memory'
const: db-n1-standard-2
- title: 'General: 4 vCPUs 15GB Memory'
const: db-n1-standard-4
- title: 'General: 8 vCPUs 40GB Memory'
const: db-n1-standard-8
- title: 'General: 16 vCPUs 61GB Memory'
const: db-n1-standard-16
- title: 'General: 32 vCPUs 122GB Memory'
const: db-n1-standard-32
- title: 'General: 64 vCPUs 245GB Memory'
const: db-n1-standard-64
- title: 'General: 96 vCPUs 368GB Memory'
const: db-n1-standard-96
- title: 'High Memory: 2 vCPUs 13GB Memory'
const: db-n1-highmem-2
- title: 'High Memory: 4 vCPUs 26GB Memory'
const: db-n1-highmem-4
- title: 'High Memory: 8 vCPUs 53GB Memory'
const: db-n1-highmem-8
- title: 'High Memory: 16 vCPUs 106GB Memory'
const: db-n1-highmem-16
- title: 'High Memory: 32 vCPUs 212GB Memory'
const: db-n1-highmem-32
- title: 'High Memory: 64 vCPUs 425GB Memory'
const: db-n1-highmem-64
- title: 'High Memory: 96 vCPUs 638GB Memory'
const: db-n1-highmem-96
database_configuration:
type: object
title: Database Configuration
description: "High availability, backups, other database settings can be configured here."
required:
- high_availability_enabled
- retained_backup_count
- query_insights_enabled
properties:
high_availability_enabled:
type: boolean
title: Enable High Availability
description: If set to true, GCP will manage a hot standby primary node for you. It will automatically fail over to the hot stanby in the event of a zonal or node failure drastically minimizing downtime.
default: true
retained_backup_count:
type: integer
title: Max Backups To Keep
description: The number of backups to keep. If another backup is made, the oldest one is deleted.
minimum: 0
maximum: 20
default: 0
query_insights_enabled:
type: boolean
title: Query Insights Enabled
description: Enables query insights for your instance
default: false
transaction_log_retention_days:
type: integer
title: Transaction Log Retention Days
description: The number of days to keep the transaction logs before deleting them.
default: 5
minimum: 1
maximum: 7
deletion_protection:
title: Deletion Protection
description: If the DB instance should have deletion protection enabled.
type: boolean
default: true
connections:
required:
- gcp_authentication
- gcp_subnetwork
properties:
gcp_authentication:
$ref: massdriver/gcp-service-account
gcp_subnetwork:
$ref: massdriver/gcp-subnetwork
artifacts:
required:
- authentication
properties:
authentication:
$ref: massdriver/mysql-authentication
# schema-ui.json
# List of form customizations for params-schema
ui:
ui:order:
- engine_version
- username
- instance_configuration
- database_configuration
- transaction_log_retention_days
- deletion_protection # Need to keep this so people CAN delete (turn it off, then delete)
- "*"
instance_configuration:
ui:order:
- disk_size
- disk_type
- tier
- "*"
database_configuration:
ui:order:
- high_availability_enabled
- retained_backup_count
- query_insights_enabled
- "*"