-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathautogen.proto
226 lines (213 loc) · 8.8 KB
/
autogen.proto
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Defines inputs and outputs for the autogen library.
// For now these protos are not intended for storage or for use in a public API.
syntax = "proto3";
package cloud.deploymentmanager.autogen;
import "java/com/google/cloud/deploymentmanager/autogen/deployment_package_autogen_spec.proto";
import "java/com/google/cloud/deploymentmanager/autogen/marketing_info.proto";
option java_multiple_files = true;
option java_package = "com.google.cloud.deploymentmanager.autogen.proto";
option java_outer_classname = "AutogenProtos";
// Input for generating a deployment package.
//
// (== yamlExample
// # BEGIN Legacy field, required but will be removed in the future
// partnerId: my-partner-id
// solutionId: example-autogen-solution
// # END Legacy field, required but will be removed in the future
// solutionInfo:
// name: Autogen Solution Example
// packagedSoftwareGroups:
// - type: SOFTWARE_GROUP_OS
// components:
// - name: Ubuntu
// version: 16.04 LTS
// - components:
// - name: Apache
// version: 2.4.23
// spec:
// version: 1.0
// deploymentTool: TERRAFORM
// # multiVm option is also available
// singleVm:
// images:
// # if more than one image is provided, the user will be able to select which one they want
// - project: your-project-id-that-the-image-belongs-to
// name: name-of-your-image
// label: Label to show in the selection dropdown
// machineType:
// # Check http://cloud.google.com/compute/docs/machine-types for all available types
// defaultMachineType:
// gceMachineType: e2-standard-4
// # Minimum CPU and memory constraints for the machine type to run your solution properly
// minimum:
// cpu: 2
// ramGb: 4
// bootDisk:
// # Describes the default and minimum disk size (GB) that user should have to run your solution properly
// diskSize:
// defaultSizeGb: 30
// minSizeGb: 20
// diskType:
// # For more information about disk types: http://cloud.google.com/compute/docs/reference/latest/diskTypes
// # Some types: pd-standard, local-ssd, pd-ssd
// defaultType: pd-standard
// # Defaults to Boot Disk
// displayLabel: My Boot Disk
// # Additional SSDs to be attached to you VM
// localSsds:
// count: 2
// # Adds the option for the use to set IP forwarding when deploying this solution
// # More info: http://cloud.google.com/compute/docs/networking#eventualconsistency
// ipForwarding:
// defaultOff: true
// # List of firewall rules for this solution. If not specified, allowedSource will be set to PUBLIC by default
// # More details in deployment_package_autogen_spec.proto
// firewallRules:
// - protocol: TCP
// # Can be a range of ports, in the format 32768-40000
// port: 80
// # Rules to specify how to generate passwords
// passwords:
// # This password identifier that
// - metadataKey: my-password-1
// length: 8
// allowSpecialChars: true
// username: solutionuser
// # Label to describe the purpose of this password (will default to Admin in case only one password is provided)
// displayLabel: Admin
// gceStartupScript:
// bashScriptContent: echo SUCCESS > /var/log/startup-log.txt
// # Post deployment information that will be displayed to the user to actions upon
// postDeploy:
// # List of suggested action items for users, after deployment is successful
// actionItems:
// - heading: Log on now
// description: "Start using your application by accessing the following URL: https://www.google.com"
// snippet: $ some code snippets can go here, to show some examples
// - heading: Another label
// description: Another description
// showIf:
// # We make this action only show in the post deployment page if a boolean expression is satisfied
// # In this example, only if an input field (see deployInput sections below) in the DM config UI is selected
// booleanDeployInputField:
// name: booleanField1
// # In the post deployment page we can show a table to expose some more details about the deployed solution
// infoRows:
// - label: Property 1
// value: Value for property 1
// - label: Property 2
// # We can specify values from custom deploy input fields present in this spec
// valueFromDeployInputField: additionalEmail
// # Field describing the accelerators that can be attached to this VM. For now, only one acceleratorSpec is allowed
// accelerators:
// # List of available GPUs (user can only pick one type). This list is required. Types: https://cloud.google.com/compute/docs/gpus/
// # Check the ids of the GPUs through GCP API: https://cloud.google.com/compute/docs/reference/latest/acceleratorTypes
// - types:
// - nvidia-tesla-k80
// - nvidia-tesla-p100
// defaultType: nvidia-tesla-p100
// # Only values of 0, 1, 2, 4, and 8 are supported.
// defaultCount: 2
// # Here we can specify extra input fields to be passed to the deployment manager
// deployInput:
// sections:
// # The place int he Deployment Manager config that this section will appear. More details in deployment_package_autogen_spec.proto
// - placement: MAIN
// name: idOfThisSection
// title: Title that will appear on top of this section
// description: This will appear below the title
// tooltip: Tooltip for this section
// # List of input fields that this section has
// fields:
// - required: true
// name: adminEmail
// title: Enter your e-mail here
// description: Some description to go below the title
// tooltip: Tooltipe for this input field
// emailBox: {}
// - required: false
// name: additionalEmail
// title: Additional email address
// emailBox: {}
// - required:
// name: booleanField1
// title: Boolean checkbox used to tell whether our actionItem above should be displayed or not
// booleanCheckbox: {}
// ==)
message DeploymentPackageInput {
reserved 9;
// The partner ID. Required.
string partner_id = 1;
// The solution ID. Required.
string solution_id = 2;
// Partner marketing info. Optional.
PartnerMarketingInfo partner_info = 3;
// Solution marketing info. Optional.
SolutionMarketingInfo solution_info = 4;
// Autogen spec. Required.
DeploymentPackageAutogenSpec spec = 5;
// Image to use as the logo. Optional.
Image logo = 6;
// Image to use as the icon. Optional.
Image icon = 7;
// Image to use as the architecture diagram. Optional.
Image architecture_diagram = 8;
}
// Describes an image to be generated into the deployment package, or
// a reference to one.
message Image {
// Provides the raw bytes and type of the image.
message RawImage {
enum ContentType {
CONTENT_TYPE_UNSPECIFIED = 0;
PNG = 1;
JPEG = 2;
}
// Content type of the image bytes. Required.
ContentType content_type = 1;
// Raw binary bytes of the image. Required.
bytes content = 2;
}
// The image bytes are supplied directly.
RawImage raw = 1;
string description = 2;
}
// Used as an input for batch generating many deployment packages as once.
// See AutogenCli.
message BatchInput {
repeated DeploymentPackageInput solutions = 1;
}
// Used as an output of batch generating many deployment packages as once.
// See AutogenCli.
message BatchOutput {
message SolutionOutput {
string partner_id = 1;
string solution_id = 2;
SolutionPackage package = 3;
}
repeated SolutionOutput solutions = 1;
}
message SolutionPackage {
// Represents a file entry in the [SolutionPackage][].
message File {
// The relative path of the file within the [SolutionPackage][].
string path = 1;
// The contents of the file. Binary data gets encoded with Base64.
string content = 2;
}
// The full set of files within the [SolutionPackage][].
repeated File files = 1;
}