-
Notifications
You must be signed in to change notification settings - Fork 823
Easy to use Cortex: Single binary, single process #1262
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
Conversation
7225c6a
to
4fd62d2
Compare
3d1daa6
to
fd10a6b
Compare
) | ||
|
||
// Client is what the ruler and altermanger needs from a config store to process rules. | ||
type Client interface { |
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.
This interface looks to be missing a GetTemplates
method for alert template files, which were added in PR #1237.
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.
Hi @khaines - I don't understand - I don't see a GetTemplates
method in that PR (or anywhere in the codebase). What am I missing?
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.
Yeah, I think we're good - GetAlerts returns a ConfigsResponse which contains the templates, like before.
b1c43ae
to
b5bb25a
Compare
52be491
to
3c0c054
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.
LGTM, but tbh, this is a biiig refactoring and it's easy to miss things.
It should only be accepted after thorough testing.
Add a new module-loading system that declaritvely states which module depends on which, and then initialises them in the correct order. This also allows for a single-process mode where all the different modules run in the same process. Also: - Remove the migrations copying, and we just have a single docker image now. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
… type. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
…ddes consistently. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
…process. This is built into the docer image to make the getting started guide a bit simplier. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
- Don't forget to register chunk encoding flags. - Table manager still needs server. - Don't require auth on gRPC query frontend Process method. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
85b0ce8
to
415e456
Compare
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Questions form the slack channel:
Yes, command line flags will continue to work and take precedence.
Target was chosen for its similarity to make - is run this module and all its dependancies. I'm not particularly wedded to it though
As the code stands "no", although there is nothing to stop us doing that in the future.
Yes & yes |
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.
Some initial points
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This flag has also disappeared: |
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Also, alertmanager depends on server. Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
|
subrouter.PathPrefix("/api/v1").Handler(middleware.AuthenticateUser.Wrap(promRouter)) | ||
subrouter.Path("/read").Handler(middleware.AuthenticateUser.Wrap(querier.RemoteReadHandler(queryable))) | ||
subrouter.Path("/validate_expr").Handler(middleware.AuthenticateUser.Wrap(http.HandlerFunc(dist.ValidateExprHandler))) | ||
subrouter.Path("/user_stats").Handler(middleware.AuthenticateUser.Wrap(http.HandlerFunc(dist.UserStatsHandler))) |
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.
This path seems to have been dropped
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.
Good catch!
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.
Unfortunately you added it back on distributor not querier, and on a different path.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
It moved accidentally to distributor in the single-binary change #1262 Signed-off-by: Bryan Boreham <bryan@weave.works>
Fixes #1136
Build a single binary Cortex which can be told to start as an ingester, distributor, querier etc. Declare the various dependancies between modules and use code to start and stop them in the right order. Support the loading of config from a YAML file, and ship a config that allows you to start as a single process.
This replaces all the previous binaries and
lite
, and avoids the problem of having two (or more) copies of the init code that can get out of sync.The follow flags have been removed:
-ingester.max-concurrent-streams
: use-server.grpc-max-concurrent-streams
-query-frontend.max-recv-message-size-bytes
: use-server.grpc-max-recv-msg-size-bytes
-memcached.*
on the the frontend: use-frontend.memcached.*
And you need to add the following flag when running as a set of microservices:
-target={distributor,ingester,querier,query-frontend,table-manager}
TODO: