This repository was archived by the owner on Oct 11, 2022. It is now read-only.
forked from gm2552/hungryman
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaccelerator.yaml
More file actions
201 lines (200 loc) · 6.87 KB
/
accelerator.yaml
File metadata and controls
201 lines (200 loc) · 6.87 KB
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
193
194
195
196
197
198
199
200
201
accelerator:
displayName: Hungryman
description: A polygot multi-service demo application of a ReactJS frontend and Spring backend services along with eventing and security (including SSO) optionality.
iconUrl: https://github.com/gm2552/hungryman/raw/main/icons/hungryman.png
tags:
- java
- spring
- sso
- sql
- messaging
- function
- educational
options:
- label: Workload Namespace
description: The namespace where the application services will be deployed.
defaultValue: workloads
name: workloadNamespace
inputType: text
dataType: string
required: true
- label: Service Namespace
description: The namespace where data service instances like RabbitMQ and databases reside (or will reside once created).
defaultValue: service-instances
name: serviceNamespace
inputType: text
dataType: string
required: true
- label: RabbitMQ Cluster Name
description: The name of the RabbitMQ cluster that the application services will connect to.
defaultValue: rmq-hungryman
name: rabbitMQName
inputType: text
dataType: string
required: true
- label: Create RabbitMQ Cluster Definition
description: "If set to true, a RabbitMQ cluster definition yaml file will be created."
defaultValue: true
name: createRabbitMQCluster
inputType: checkbox
dataType: boolean
required: true
- label: Number of RabbitMQ Cluster Nodes
description: The number of nodes that will make up the RabbitMQ number. SHOULD be an odd number.
defaultValue: 1
name: numRabbitMQClusterNodes
inputType: text
dataType: number
required: true
dependsOn:
name: createRabbitMQCluster
- label: Database Type
description: The type of database that services will connenct to.
inputType: select
defaultValue: h2
name: dbType
choices:
- value: mysql
text: MySQL
- value: h2
text: H2 (In Memory DB)
required: true
- label: Database Name
description: The name of the database instance that the application services will connect to.
defaultValue: db-hungryman
name: dbName
inputType: text
dataType: string
required: true
dependsOn:
name: dbType
value: mysql
- label: Create Database Definition
description: "If set to true, a Database instance definition yaml file will be created for the selected database type."
defaultValue: true
name: createDBInstance
inputType: checkbox
dataType: boolean
required: true
dependsOn:
name: dbType
value: mysql
- label: Create Resource Claim Defintion for Services
description: "If set to true, a resource claim definition yaml file for the data services will be created."
defaultValue: true
name: createResourceClaim
inputType: checkbox
dataType: boolean
required: true
- label: Enable Security (Experimental)
description: "If set to true, security will enabled on the application and APIs. You will need to provide additional security configuation in the subsequent sections below."
defaultValue: false
name: enableSecurity
inputType: checkbox
dataType: boolean
required: true
- label: AppSSO Instance Name
description: "The name of the AppSSO instance that the application services will connect to."
defaultValue: appsso-hungryman
name: appSSOName
inputType: text
dataType: string
required: true
dependsOn:
name: enableSecurity
- label: Issuer URI
description: "The full issuer URI of the AppSSO Instance. Generally in the form of 'http://<authserver-host>.<domain name>"
defaultValue: http://authserver.<domainname>
name: appSSOIssuerURI
inputType: text
dataType: string
required: true
dependsOn:
name: enableSecurity
- label: Redirect URI
description: "The redirect UI of the hungryman application after successful authentication. Generally 'http://hungryman.<domain name>/login/oauth2/code/sso"
defaultValue: http://hungryman.<domain name>/login/oauth2/code/sso
name: appSSORedirectURI
inputType: text
dataType: string
required: true
dependsOn:
name: enableSecurity
- label: Create Default Dev Account
description: "If set to true, you can create a default dev account below. This should not be used for production use."
defaultValue: true
name: enableDefaultDevAccount
inputType: checkbox
dataType: boolean
required: true
dependsOn:
name: enableSecurity
- label: Dev Account Username
description: "The username of the dev account"
defaultValue: hungryman
name: devDefaultAccountUsername
inputType: text
dataType: string
required: false
dependsOn:
name: enableDefaultDevAccount
- label: Dev Account BCrypt Password
description: "A BCrypted version of the password. You can use the following online tool to create a bycrypt string: https://www.browserling.com/tools/bcrypt"
defaultValue: "$2a$10$J/EWz6Q8zxRHYCr2UwJewe5hN6uKhbytUuGGC2yHvEJ2zhH.dLvZe"
name: devDefaultAccountPassword
inputType: text
dataType: string
required: false
dependsOn:
name: enableDefaultDevAccount
engine:
merge:
- exclude:
["**/templates/**", "**/icons/**", "**/.git/**", "**/deployment/**"]
- include: ["**/templates/workloads.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/workloads.yaml'
rewriteTo: "'config/developer/workloads.yaml'"
- condition: "#createRabbitMQCluster"
include: ["**/rmqCluster.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/rmqCluster.yaml'
rewriteTo: "'config/service-operator/rmqCluster.yaml'"
- condition: "#createDBInstance && #dbType == 'mysql'"
include: ["**/mysqlInstance.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/mysqlInstance.yaml'
rewriteTo: "'config/service-operator/mysqlInstance.yaml'"
- condition:
"#createResourceClaim"
include: ["**/rmqResourceClaim.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/rmqResourceClaim.yaml'
rewriteTo: "'config/app-operator/rmqResourceClaim.yaml'"
- condition:
"#createResourceClaim && #dbType == 'mysql'"
include: ["**/mysqlResourceClaim.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/mysqlResourceClaim.yaml'
rewriteTo: "'config/app-operator/mysqlResourceClaim.yaml'"
- condition:
"#enableSecurity"
include: ["**/appSSOInstance.yaml", "**/clientRegistrationResourceClaim.yaml"]
chain:
- type: YTT
- type: RewritePath
regex: 'templates/appSSOInstance.yaml'
rewriteTo: "'config/service-operator/appSSOInstance.yaml'"
- type: RewritePath
regex: 'templates/clientRegistrationResourceClaim.yaml'
rewriteTo: "'config/app-operator/clientRegistrationResourceClaim.yaml'"