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

[feature] CLI reload #114

Merged
merged 4 commits into from
Apr 7, 2015
Merged

[feature] CLI reload #114

merged 4 commits into from
Apr 7, 2015

Conversation

thibaultcha
Copy link
Member

New commands:

  • $ kong reload
  • $ kong quit

This implements kong reload #113, a wrapper around nginx reload to gracefully restart Kong without downtime. kong reload will reload the Kong config (and thus, the contained nginx config).

This change made us switch to signals to control nginx. We can now have kong quit, for a more graceful shutdown than stop.

⚠️ Kong still needs access to the desired kong.yml because it is this file which contains the nginx instance's working directory. So each command takes an optional --config argument.

Usage with /etc/kong/kong.yml or the Luarocks one:

  • kong start
  • kong reload

Or with a custom configuration file:

  • kong start -c kong_DEVELOPMENT.yml
  • kong reload -c kong_DEVELOPMENT.yml

It is a wrapper around `nginx reload`. Because it now makes sense, we
interact with the `nginx` executable via signals, in signals.lua.

We can later support `quit` for a graceful shutdown and probably remove
`restart`.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 73.97% when pulling c20d771 on feature/cli-reload into ffa273e on master.

subnetmarco added a commit that referenced this pull request Apr 7, 2015
@subnetmarco subnetmarco merged commit 1627634 into master Apr 7, 2015
@subnetmarco subnetmarco deleted the feature/cli-reload branch April 7, 2015 00:31
ctranxuan pushed a commit to streamdataio/kong that referenced this pull request Aug 25, 2015
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