-
Notifications
You must be signed in to change notification settings - Fork 458
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
Add GCP package #459
Add GCP package #459
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
I like that you converted as much as possible to Ingest Node. The Google pub/sub service has an emulator. Perhaps the emulator can be loaded with our json logs and then the e2e tests pull from the emulator's topics. The reason the logfile input exists in these GCP data streams is to allow for testing. By including it in the UI I think we make the usage less clear. We might be able to remove it since there is an alternative means of testing via the emulator. However some different services (like s3+sqs) don't have a good emulation option so logfile is still needed IMO. It might be useful to have a way for an input to be available only for testing. |
I will give it a try, and I opened an issue elastic/package-spec#97 for what you are mentioning. |
We have to wait for the changes in elastic/beats#23215 to be able to use the emulator here |
140e13c
to
6d792ba
Compare
jenkins, run tests Now that |
@marc-gr This needs an update to change |
packages/gcp/data_stream/firewall/agent/stream/gcp-pubsub.yml.hbs
Outdated
Show resolved
Hide resolved
For the logfile input, you may want to set Edit: nevermind, I see that you've dropped the input altogether. |
cccb5e9
to
512d905
Compare
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.
@marc-gr I see that you pushed a lot of Go code here, not sure if this is the expected way to go. In general it would be better to depend on DSLs/manifests/configs.
If you need to create some resources on GCP, you can try to use the Terraform service deployer: https://github.com/elastic/elastic-package/blob/master/docs/howto/system_testing.md#terraform-service-deployer
Here is the appliance for AWS: https://github.com/elastic/integrations/tree/master/packages/aws/data_stream/ec2_metrics/_dev/deploy/tf
8786417
to
59bdf04
Compare
Finally we enhanced |
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.
Finally we enhanced akroh/stream to support GCP pubsub as an output, so we moved the go code there and just using docker here 👍
Thanks for the information. Could you please share details behind this decision? I'm wondering if it's because of the fact that TF service deployer is not feasible for your use cases.
Another thought: do you plan to move akroh/stream
under elastic
org? I know it's Andrew's repository, but I believe in general we should depend on company's ownership.
I think it would be valuable to have a test like this too. It would serve as an integration test against the real service and could catch different types of issues than the emulator based testing with static logs. If the TF setup configures the actual services to write logs that's even better since it would let us catch when log formats changes. And lastly it could serve as a pseudo reference for describing the configuration steps necessary to setup GCP to use the package.
I agree. I wasn't sure whether it was going to be useful at first so I opted for a personal repo where I could more independently setup CI. I'll work on getting this moved over and have Jenkins setup. |
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.
LGTM. Nice work with all the testing improvements to allow the emulator to be used.
- --addr=gcppubsub-emulator:8681 | ||
- -p=gcppubsub | ||
- --gcppubsub-clear=true | ||
- --gcppubsub-project=audit |
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.
fyi: You can also pass any option via env vars:
environment:
- STREAM_GCPPUBSUB_CLEAR=true
- STREAM_GCPPUBSUB_PROJECT=audit
* Audit data stream * Firewall dataset * Add vpcflow dataset * Manifests, dashboards and system tests * Remove log input * Add gcp emulator for system testing * Rename system config files * Add changelog * Move all processors to ingest * Add fake credentials * Use go client to publish test messages * Rename system tests service * Change custom docker container for akroh/stream * Use stream v0.3.0 for system tests * Hide advanced settings * Remove unnecessary config from deploy
What does this PR do?
Adds GCP package
Checklist
Screenshots