You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Andrew Loesch
afloesch
Lover of all things software, car, and motorcycle related.
I had a hard time finding a decent example on how to use the lua nginx module to get environment variables and
pass them to the location block for the proxy settings, so wanted to share the solution that worked for me.
AWS provides a basic example for making signed requests to managed Elasticsearch clusters, but the example doesn't cover how to deal with EC2 instance profiles, which will require passing the session token.
Here's a simple example, which also handles authenticating when using an instance profile instead of a generated user level access key and secret, leverages the elastic bulk upload API to add multiple records at the same time, and threads the request so it can be made in a non-blocking fashion.
Testing Jenkins flows on your local machine, or running Jenkins in production in a docker container can be a little tricky with a docker-in-docker scenario. You could install Jenkins to avoid any docker-in-docker issues, but then you have Jenkins on your machine, and the local environment is likely going to be a fairly different from the actual production build servers, which can lead to annoying and time-consuming issues to debug.
Build environment differences are precisely why there is a strong argument to be made to run build processes strictly in docker containers. If we follow the philosophy that every build step or action should run in a docker container, even the Jenkins server itself, then we get massive benefits from things like, total control over the build environment, easily modify the build environment without the possibility of adversely effecting other jobs, explicit and strongly controlled tool versions,