diff --git a/kong-0.11.2-0.rockspec b/kong-0.11.2-0.rockspec index ce6d24fc487..fb41e78294f 100644 --- a/kong-0.11.2-0.rockspec +++ b/kong-0.11.2-0.rockspec @@ -62,7 +62,6 @@ build = { ["kong.cmd.check"] = "kong/cmd/check.lua", ["kong.cmd.reload"] = "kong/cmd/reload.lua", ["kong.cmd.restart"] = "kong/cmd/restart.lua", - ["kong.cmd.compile"] = "kong/cmd/compile.lua", ["kong.cmd.prepare"] = "kong/cmd/prepare.lua", ["kong.cmd.migrations"] = "kong/cmd/migrations.lua", ["kong.cmd.health"] = "kong/cmd/health.lua", diff --git a/kong.conf.default b/kong.conf.default index 0f828da9d84..604a7c41865 100644 --- a/kong.conf.default +++ b/kong.conf.default @@ -4,7 +4,7 @@ # # The commented-out settings shown in this file represent the default values. # -# This file is read when `kong start` or `kong compile` are used. Kong +# This file is read when `kong start` or `kong prepare` are used. Kong # generates the Nginx configuration with the settings specified in this file. # # All environment variables prefixed with `KONG_` and capitalized will override diff --git a/kong/cmd/compile.lua b/kong/cmd/compile.lua deleted file mode 100644 index 9504a9e1e7b..00000000000 --- a/kong/cmd/compile.lua +++ /dev/null @@ -1,42 +0,0 @@ -local prefix_handler = require "kong.cmd.utils.prefix_handler" -local conf_loader = require "kong.conf_loader" -local log = require "kong.cmd.utils.log" - -local function execute(args) - log.warn("'kong compile' is deprecated, use 'kong prepare' instead") - - local conf = assert(conf_loader(args.conf)) - local kong_nginx_conf = assert(prefix_handler.compile_kong_conf(conf)) - print(kong_nginx_conf) -end - -local lapp = [[ -Usage: kong compile [OPTIONS] - -[DEPRECATED] This command is deprecated. Use 'kong prepare' instead. - -Compile the Nginx configuration file containing Kong's servers -contexts from a given Kong configuration file. - -Example usage: - kong compile -c kong.conf > /usr/local/openresty/nginx-kong.conf - - This file can then be included in an OpenResty configuration: - - http { - # ... - include 'nginx-kong.conf'; - } - -Note: - Third-party services such as Serf need to be properly configured - and started for Kong to be fully compatible while embedded. - -Options: - -c,--conf (optional string) configuration file -]] - -return { - lapp = lapp, - execute = execute -} diff --git a/kong/cmd/init.lua b/kong/cmd/init.lua index f2b0e4240bd..b20c7e43d47 100644 --- a/kong/cmd/init.lua +++ b/kong/cmd/init.lua @@ -19,7 +19,6 @@ local cmds = { reload = true, health = true, check = true, - compile = true, prepare = true, migrations = true, version = true, diff --git a/spec/02-integration/02-cmd/03-compile_spec.lua b/spec/02-integration/02-cmd/03-compile_spec.lua deleted file mode 100644 index 9154c758f16..00000000000 --- a/spec/02-integration/02-cmd/03-compile_spec.lua +++ /dev/null @@ -1,20 +0,0 @@ -local helpers = require "spec.helpers" - -describe("kong compile", function() - it("compiles a Kong NGINX config", function() - local _, _, stdout = assert(helpers.kong_exec "compile") - assert.matches("init_by_lua_block", stdout) - assert.matches("init_worker_by_lua_block", stdout) - assert.matches("server_name kong", stdout) - assert.matches("server_name kong_admin", stdout) - assert.matches("listen 0.0.0.0:8000", stdout, nil, true) - assert.matches("listen 127.0.0.1:8001", stdout, nil, true) - assert.matches("listen 0.0.0.0:8443 ssl", stdout, nil, true) - end) - it("accepts a custom Kong conf", function() - local _, _, stdout = assert(helpers.kong_exec("compile --conf " .. helpers.test_conf_path)) - assert.matches("listen 0.0.0.0:9000", stdout, nil, true) - assert.matches("listen 127.0.0.1:9001", stdout, nil, true) - assert.matches("listen 0.0.0.0:9443 ssl", stdout, nil, true) - end) -end) diff --git a/spec/02-integration/02-cmd/04-reload_spec.lua b/spec/02-integration/02-cmd/03-reload_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/04-reload_spec.lua rename to spec/02-integration/02-cmd/03-reload_spec.lua diff --git a/spec/02-integration/02-cmd/05-version_spec.lua b/spec/02-integration/02-cmd/04-version_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/05-version_spec.lua rename to spec/02-integration/02-cmd/04-version_spec.lua diff --git a/spec/02-integration/02-cmd/06-check_spec.lua b/spec/02-integration/02-cmd/05-check_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/06-check_spec.lua rename to spec/02-integration/02-cmd/05-check_spec.lua diff --git a/spec/02-integration/02-cmd/07-restart_spec.lua b/spec/02-integration/02-cmd/06-restart_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/07-restart_spec.lua rename to spec/02-integration/02-cmd/06-restart_spec.lua diff --git a/spec/02-integration/02-cmd/08-health_spec.lua b/spec/02-integration/02-cmd/07-health_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/08-health_spec.lua rename to spec/02-integration/02-cmd/07-health_spec.lua diff --git a/spec/02-integration/02-cmd/09-quit_spec.lua b/spec/02-integration/02-cmd/08-quit_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/09-quit_spec.lua rename to spec/02-integration/02-cmd/08-quit_spec.lua diff --git a/spec/02-integration/02-cmd/10-prepare_spec.lua b/spec/02-integration/02-cmd/09-prepare_spec.lua similarity index 100% rename from spec/02-integration/02-cmd/10-prepare_spec.lua rename to spec/02-integration/02-cmd/09-prepare_spec.lua