Skip to content

Add test package with docker service deployers using terraform too #2670

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

Merged
merged 6 commits into from
Jun 24, 2025

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Jun 19, 2025

Relates #1302

Add a new test package as example to run terraform using the Docker Compose Service deployer.

Using that test package as a base, the documentation about system testing has been updated to explain this scenario.

As a note, it has been added in the docker compose service deployer a new placeholder to use TEST_RUN_ID created internally by elastic-package as environment variable in the docker-compose.

@mrodm mrodm self-assigned this Jun 19, 2025
@mrodm mrodm changed the title Example several service deployers Add test package with docker service deployers using terraform too Jun 19, 2025
@mrodm mrodm force-pushed the example-several-service-deployers branch from 0727bee to 7155d5c Compare June 20, 2025 10:21
@mrodm mrodm marked this pull request as ready for review June 20, 2025 12:58
@mrodm mrodm requested a review from a team June 20, 2025 12:58
Comment on lines 27 to 32
# Example to use credentials
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
- AWS_PROFILE=${AWS_PROFILE}
- AWS_REGION=${AWS_REGION:-us-east-1}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we add these environment variables as example here too?
I haven't tested if that works, but probably it works.

If it is required to create resources in AWS, probably they should use the terraform deployer. WDYT ? To remove it from the example.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we can remove them by now, and added later if requested.

@@ -69,7 +69,7 @@ or the data stream's level:

`<service deployer>` - a name of the supported service deployer:
* `docker` - Docker Compose
* `agent` - Custom `elastic-agent` with Docker Compose
* `agent` - (Deprecated) Custom `elastic-agent` with Docker Compose
Copy link
Member

Choose a reason for hiding this comment

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

We could remove support for agent deployer based on some package spec version, maybe 3.5. Do you know if we have an open issue for the removal of this deployer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK there is no issue for that.
Just created a new one #2679

Comment on lines 27 to 32
# Example to use credentials
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
- AWS_PROFILE=${AWS_PROFILE}
- AWS_REGION=${AWS_REGION:-us-east-1}
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we can remove them by now, and added later if requested.

@@ -110,6 +110,63 @@ volumes:
mysqldata:
```

#### Run terraform along with the Docker Compose service deployer
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can explain that this is an example of running a custom provisioner, and not something with special support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 191b9c4

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, some rephrasing proposed.

Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm merged commit 698b2ba into elastic:main Jun 24, 2025
3 checks passed
@mrodm mrodm deleted the example-several-service-deployers branch June 24, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants