java/com/google/cloud/deploymentmanager/autogen/autogen.proto (213 lines of code) (raw):
// 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;
}