This is an example of Envoy TCP Proxy from localhost:10000 to www.google.com:80.
See also https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/listeners/tcp_proxy.
To run a proxy:
% docker run --rm getenvoy/envoy:stable --version| Based on this guide | |
| https://stackoverflow.com/questions/23259843/how-to-route-traffic-reverse-proxy-with-haproxy-based-on-request-body | |
| frontend http-in | |
| bind *:80 | |
| option http-buffer-request | |
| acl redirect_pingpong req.body -m reg [insert your regular expression here] | |
| use_backend pingpong_backend if redirect_pingpong | |
| default_backend web_bk |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This is an example of Envoy TCP Proxy from localhost:10000 to www.google.com:80.
See also https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/listeners/tcp_proxy.
To run a proxy:
% docker run --rm getenvoy/envoy:stable --version| $ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data |
| stages: | |
| - build | |
| - push | |
| - cleanup | |
| build: | |
| stage: build | |
| variables: | |
| REGISTRY_SERVER: foo.bar | |
| IMAGE_NAME: vrutkovs-public/openshift-ansible-testing |
| @Component | |
| public class LogFilter extends OncePerRequestFilter { | |
| private static Logger LOG = LoggerFactory.getLogger(LogFilter.class); | |
| @Override | |
| protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) | |
| throws ServletException, IOException { | |
| LOG.info(request.getRequestURI()); // log the request path. | |
| } |
This gist describes the configuration required for Spring reactive WebClient to make a call to an OAuth2 protected resource through OAuth2.0 Client Credentials Grant Type Flow.
Assumption is that the Authorization Server supports OpenId Connect 1.0 specifications.
| #!/usr/bin/env python | |
| import gitlab | |
| from jira import JIRA | |
| import urllib3 | |
| ## Disable urllib3 ssl checks warnings | |
| urllib3.disable_warnings( urllib3.exceptions.InsecureRequestWarning ) | |
| ## GitLab config |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}