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

Lua CLI #83

Closed
6 of 7 tasks
thibaultcha opened this issue Mar 19, 2015 · 3 comments
Closed
6 of 7 tasks

Lua CLI #83

thibaultcha opened this issue Mar 19, 2015 · 3 comments
Assignees
Milestone

Comments

@thibaultcha
Copy link
Member

Let's switch our current CLI from a bash script to a Lua script. Here are reasons why and features we can accomplish:

  • By having a Lua binary, we are closer to Kong's source code and can leverage any module (migrations.lua, dao factories...)
  • luarocks install kong would install Kong with our .rockspec, copying the bin into the user's $PATH. This solves our Try to distribute a binary #51 issue by having this desired "simple way" to install Kong.
  • We can separate every CLI command in sub-scripts, which is way more maintainable
  • We can install plugins via a kong install <plugin> command that leverages luarocks. It could download the plugin, verify the signature, prompt questions to the terminal for configuration of the installed plugin (ex: Do you want to enable this freshly installed plugin on your machine? [y/n]:, etc...
  • We can provide native kong start/stop scripts with nicer stdout/stderr outputs.
  • We can migrate from the CLI (including the first migration) instead of wrapping a lua script from bash or migrating once kong is running (in Nginx like currently).
  • We can unit test the CLI with busted
  • A Lua CLI can be easily extended in the future, adding support for "add-user", or cluster-related informations will be much easier.

TODO list:

  • Global kong bin with sub-binaries for each command
  • Convert existing scripts to Lua (start/stop/migrate/rollback/reset/seed/drop)
  • Default config loading system (/etc/kong/kong.yml or {rocks_path}/kong/conf/kong.yml)
  • Convert the Makefile
  • Cleanup tools.utils and cmd.utils now that we have a CLI utils file.
  • Switch first migrations from kong.lua to be bundled in the start command.
  • Configuration validation
@thibaultcha thibaultcha self-assigned this Mar 19, 2015
@thibaultcha thibaultcha added this to the 0.2.0-beta milestone Mar 19, 2015
@subnetmarco
Copy link
Member

Some of the points above are also referencing #21

@thibaultcha
Copy link
Member Author

@thefosk I believe this can be in the next release by tonight ^

This was referenced Mar 24, 2015
@thibaultcha
Copy link
Member Author

#92

bungle added a commit that referenced this issue Nov 3, 2022
### Summary

#### [0.8.15] - 2022-10-27
##### bug fixes
- **pkey:** check private key existence before doing sign ([#83](fffonion/lua-resty-openssl#83)) [eefcd2a](fffonion/lua-resty-openssl@eefcd2a)
bungle added a commit that referenced this issue Nov 3, 2022
### Summary

#### [0.8.15] - 2022-10-27
##### bug fixes
- **pkey:** check private key existence before doing sign ([#83](fffonion/lua-resty-openssl#83)) [eefcd2a](fffonion/lua-resty-openssl@eefcd2a)
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

No branches or pull requests

2 participants