-
Notifications
You must be signed in to change notification settings - Fork 116
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 serverless provider #1374
Add serverless provider #1374
Conversation
601eec1
to
d0f9a9b
Compare
fleet server endpoint is built based on the elasticsearch endpoint fix creation
/test |
💚 Build Succeeded
History
cc @mrodm |
Raise an error in case elasticsearch project is created, since it does not have fleet service.
var observedServices = []string{"elasticsearch", elasticAgentService, fleetServerService, "kibana", "package-registry"} | ||
|
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.
Now dump and status would be getting the services directly from the docker daemon. Not all these services are available when serverless provider is used.
These containers are obtained from here:
https://github.com/elastic/elastic-package/pull/1374/files#diff-b4efb1ac558d15d3077525cb9be59dce12ee723a4749253e9ca7cc860419f1f8R401-R462
Added descriptions for new profile configuirations added
buildkite test this |
1 similar comment
buildkite test this |
/test |
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.
Great job here 🚀
internal/serverless/client.go
Outdated
if host == "" { | ||
return nil, fmt.Errorf("unable to obtain value from %s environment variable", hostEnvName) | ||
logger.Debugf("Using default host URL: %s", defaultHostURL) |
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.
Nit. Maybe we can print in any case what endpoint is used.
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.
Moved this logger.Debug after creating the client with all the options.
I also ensured that environment variables (EC_HOST
) has preference over the configuration set in the profile (e.g. ~/.elastic-package/profiles/serverless/config.yml
)
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
host := os.Getenv(elasticCloudEndpointEnv) | ||
if host != "" { | ||
c.host = host | ||
} |
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.
If there is an environment variable defined it would have preference over the configuration set in the profile.
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! 🌻
buildkite test this |
💚 Build Succeeded
History
cc @mrodm |
This PR adds a new provider to create Serverless projects.
It requires to set these two environment variables :
Notes:
Tested with the following packages from integrations repository:
How to test