Skip to content
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

Support Terraform deployment files #111

Merged
merged 4 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
5 changes: 4 additions & 1 deletion versions/1/_dev/deploy/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ spec:
type: folder
name: docker
$ref: "./docker/spec.yml"
required: true # to be adjusted when we add other deployment models
- description: Folder containing deployment files for a Terraform-based service deployment
type: folder
name: tf
$ref: "./tf/spec.yml"
- description: Configuration file describing variations available for deployment
type: file
name: "variants.yml"
Expand Down
7 changes: 7 additions & 0 deletions versions/1/_dev/deploy/tf/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spec:
additionalContents: false
contents:
- description: Terraform infrastructure definition
pattern: '^*.tf$'
type: file
required: true
3 changes: 3 additions & 0 deletions versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@
- description: Enforce README.md file
type: enhancement
link: https://github.com/elastic/package-spec/pull/116
- description: Support Terraform deployment files. Enable "deploy" definitions for data stream
type: enhancement
link: https://github.com/elastic/package-spec/pull/111
7 changes: 6 additions & 1 deletion versions/1/data_stream/_dev/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ spec:
type: folder
name: test
required: false
$ref: "./test/spec.yml"
$ref: "./test/spec.yml"
- description: Folder containing configuration related to deploying the package's integration service(s)
type: folder
name: deploy
required: false
$ref: "./../../_dev/deploy/spec.yml" # Use "deploy" spec for package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what we want? It implies that there can be data stream level deployment definitions for Docker Compose-based deployments as well, not just Terraform-based deployments. Having such consistency is really nice but I want to make sure it's something that's actually going to be supported by elastic-package as well. Otherwise the spec is a bit misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I modified the elastic-package here: elastic/elastic-package#228 .

As you noticed, It means that we will support deploy definitions on the data stream level. Actually we may leverage from this change, as currently developers build a single Docker image for multiple data streams. See: https://github.com/elastic/integrations/tree/master/packages/zeek/_dev/deploy/docker

If you prefer to support tf only, I can adjust the spec.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, I hadn't studied elastic/elastic-package#228 in depth before, sorry! Given what you have there, what you have here is good as-is. Thanks!