I’ve been looking to create a local development environment akin to Kong Enterprise 0.35-4 for custom plugin development. The enterprise changelogs indicate that the Kong Community Edition which corresponds to this version of enterprise is Kong 1.0.3. As part of the steps for installing from source, I’m supposed to run the following command:
luarocks install kong 1.0.3
When doing so (even working around the lyaml weirdness that should probably be mentioned in the documentation), I get the following error when luarocks is installing lua_system_constants 0.1.2:
gcc -shared -L -o lua_system_constants.so lua_system_constants.o
gcc: error: lua_system_constants.so: No such file or directory
The error seems to come from the blank -L passed into the linker command. It seems that 0.1.3, a new version of the lua_system_constants published by Marco eight months ago, fixes that by refactoring the build steps for the module to be more standard. Using 0.1.3 would fix the issue, but currently the Kong Community 1.0.3 luarock hard requires lua_system_constants 0.1.2. Is this something we can fix, is there a reasonable workaround, or is there another suitable luarock to install instead of 1.0.3 when developing against enterprise 0.35? Thanks!
I’d like to use Vagrant, but my company’s security policy dictates that I’m not allowed to use vagrant virtual machines on my laptop. This is on top of my company’s setup having me used shared Jenkins build boxes for my CI/CD pipeline, boxes which also can’t use vagrant, meaning I need a local development environment one way or another.
If I’m doing plugin development against Kong, I should probably be developing against roughly the version of Kong Enterprise I’m using (which can be solved by checking out one of the Kong tags) but then, if I do that, I’m going to want to luarocks install that version of Kong, to pick up the appropriate luarock dependencies, right? If I do that with the community version of Kong corresponding to Kong Enterprise 0.35, namely Kong Community 1.0.3, I run in the package issue I describe above.
If I shouldn’t be luarocks installing anything I apologize, but I’ve found that developing plugins and running plugin unit tests doesn’t work quite right without running the luarocks install, but maybe I’m doing something wrong.
@tyree731 if not able to use Vagrant, can you use Docker? or is that also unavailable in your env?
If you can use Docker, then you might want to have a look at Pongo: https://github.com/Kong/kong-pongo It was recently released specifically for plugin development against Enterprise versions of Kong.
Then probably look at Pongo, and follow along the same lines, but without Docker. It’s based on a regular package/image, and then adds the development files (which are in the pongo repo). At least you won’t have to install Kong from source but can use a package