generated from cloud-gov/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a custom csb image with a (near) empty brokerpak #1
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zscaler.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use our hardened cloud-service-broker base image. | ||
ARG base_image | ||
|
||
# Builder: Build brokerpaks for use with cloud service broker. | ||
FROM ${base_image} AS build | ||
WORKDIR /app | ||
ADD ./brokerpaks ./brokerpaks | ||
|
||
ENV BUILD_ENV=development | ||
|
||
# For local builds only, add the ZScaler CA certificate to the trust store so Docker | ||
# can make HTTPS connections. `csb pak build` needs to do this to download binaries. | ||
# Find your ZScaler cert with $(brew --prefix)/etc/ca-certificates/cert.pem. | ||
# From https://help.zscaler.com/zia/adding-custom-certificate-application-specific-trust-store | ||
ADD zscaler.crt /tmp/zscaler.crt | ||
# Only copy Use BUILD_ENV variable within the container to copy the CA certificate into the certificate directory and update | ||
RUN if [ "$BUILD_ENV" = "production" ] ; then echo "production env"; else echo \ | ||
"non-production env: $BUILD_ENV"; CERT_DIR=$(openssl version -d | cut -f2 -d \")/certs ; \ | ||
cp /tmp/zscaler.crt $CERT_DIR ; update-ca-certificates ; \ | ||
fi | ||
|
||
RUN /app/csb pak build brokerpaks/empty | ||
|
||
FROM ${base_image} | ||
|
||
# Copy brokerpaks to final image | ||
COPY --from=build /app/empty-1.0.0.brokerpak /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# Github templates | ||
# Cloud Service Broker | ||
|
||
This repo contains Github templates (pull request, issue, etc) for the cloud-gov organization. | ||
This repo contains configuration, including brokerpaks, for the cloud.gov deployment of the [Cloud Service Broker](https://github.com/cloudfoundry/cloud-service-broker). | ||
|
||
## Related projects | ||
|
||
- https://github.com/GSA-TTS/datagov-brokerpak-smtp | ||
- https://github.com/GSA/ttsnotify-brokerpak-sms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
version: 1 | ||
name: example-service | ||
id: ca14ec08-04db-47d5-bc87-1d1d3f688037 | ||
description: a longer service description | ||
display_name: Example Service | ||
image_url: https://example.com/icon.jpg | ||
documentation_url: https://example.com | ||
provider_display_name: "" | ||
support_url: https://example.com/support.html | ||
tags: [gcp, example, service] | ||
plans: | ||
- name: example-email-plan | ||
id: 392417e9-8e96-4073-b238-a1b711db40f5 | ||
description: Builds emails for example.com. | ||
display_name: example.com email builder | ||
bullets: | ||
- information point 1 | ||
- information point 2 | ||
- some caveat here | ||
properties: | ||
domain: example.com | ||
password_special_chars: '@/ \"?' | ||
provision: | ||
plan_inputs: | ||
- required: true | ||
field_name: domain | ||
type: string | ||
details: The domain name | ||
user_inputs: | ||
- required: true | ||
field_name: username | ||
type: string | ||
details: The username to create | ||
computed_inputs: [] | ||
template: |4- | ||
variable domain {type = string} | ||
variable username {type = string} | ||
output email {value = "${var.username}@${var.domain}"} | ||
|
||
template_ref: "" | ||
outputs: | ||
- required: true | ||
field_name: email | ||
type: string | ||
details: The combined email address | ||
templates: {} | ||
template_refs: {} | ||
import_inputs: [] | ||
import_parameter_mappings: [] | ||
import_parameters_to_delete: [] | ||
import_parameters_to_add: [] | ||
bind: | ||
plan_inputs: | ||
- required: true | ||
field_name: password_special_chars | ||
type: string | ||
details: Supply your own list of special characters to use for string generation. | ||
user_inputs: [] | ||
computed_inputs: | ||
- name: domain | ||
default: ${request.plan_properties["domain"]} | ||
overwrite: true | ||
type: "" | ||
- name: address | ||
default: ${instance.details["email"]} | ||
overwrite: true | ||
type: "" | ||
template: |4- | ||
variable domain {type = string} | ||
variable address {type = string} | ||
variable password_special_chars {type = string} | ||
|
||
resource "random_string" "password" { | ||
length = 16 | ||
special = true | ||
override_special = var.password_special_chars | ||
} | ||
|
||
output uri {value = "smtp://${var.address}:${random_string.password.result}@smtp.${var.domain}"} | ||
|
||
template_ref: "" | ||
outputs: | ||
- required: true | ||
field_name: uri | ||
type: string | ||
details: The uri to use to connect to this service | ||
templates: {} | ||
template_refs: {} | ||
import_inputs: [] | ||
import_parameter_mappings: [] | ||
import_parameters_to_delete: [] | ||
import_parameters_to_add: [] | ||
examples: | ||
- name: Example | ||
description: Examples are used for documenting your service AND as integration tests. | ||
plan_id: 392417e9-8e96-4073-b238-a1b711db40f5 | ||
provision_params: | ||
username: my-account | ||
bind_params: {} | ||
plan_updateable: false | ||
requiredenvvars: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
packversion: 1 | ||
name: empty | ||
version: "0.0.1" | ||
metadata: | ||
author: James Hochadel | ||
platforms: | ||
- os: linux | ||
arch: amd64 | ||
terraform_binaries: | ||
- name: terraform | ||
version: 1.7.5 | ||
source: https://github.com/hashicorp/terraform/archive/v1.7.5.zip | ||
service_definitions: | ||
- empty.yml | ||
parameters: [] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to permanently leave this brokerpak in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this is a test one to try to get the broker deploying. Real paks soon to come!