Have you noticed an unexpected unallocation of Shards happening at a duration of 1 hour resulting in Cluster state switching from Green > Yellow > Red > Yellow > Green?. During this transition, ES becomes unreachable and the API calls start responding with non 200 code.
As we all know that the caching is a process that everyone uses using different topologies like caching at application node, geographical caching, even some organizations set up a completely dedicated cluster of nodes only for caching.
In this blog, we will discuss setting up Geographical caching using Cloudflare’s Content delivery network and Cloudflare’s workers.
Recently, we explored Preserving the Source IP address on AWS Classic Loadbalancer and Istio’s envoy using the proxy protocol in our first Part. Continuing to the second part of this series, we will look at How can we apply IP whitelisting on the Kubernetes microservices!
There are some microservices behind an internet-facing loadbalancer that we want to have limited access to, based on source IP address. This will prevent our microservices from unauthorized access.
Preserving Source IP address is an important factor in a live environment because the IP address is one of the things which enables you to do some advanced stuff like:
Security: Security is an important factor which we cannot ignore. With the Source IP you can white list the access to the applications which are behind the internet-facing load balancer.
A shell initialization file is a shell script that runs automatically each time the shell executes. The initialization file sets up the “work environment” and “customizes” the shell environment for the user. The main agenda of Shell initialization files are to persist common shell configuration, such as Continue reading “Shell initialization files”
- Privately Hosted Jenkins
- Google developer console
Setup 1: Setup Ngrok
ngrok http 8080
Step 2: Setup Google Developer Console
Step 3: Setup Jenkins
One of the most basic requirement of CI implementation using Jenkins is to automatically trigger a Jenkins job post every commit. As you are already aware there are two ways in which a Jenkins job can be triggered in an automated fashion is:
- Pull | PollSCM
- Push | Webhook
It is a no-brainer that a Push-based trigger is the most efficient way of triggering a Jenkins job else you would be unnecessarily hogging your resources. One of the hurdles in implementing a push-based trigger is that your VCS & Jenkins server should be in the same network or in simple terms they can talk to each other.
In a typical CI setup, there is a SAAS VCS i.e GitHub/GitLab and a privately hosted Jenkins server, which make a Push-based triggering of Jenkins job impossible. Till a few days back I was under the same impression until I found this awesome blog that talks about how you can integrate a Webhook with your private Jenkins server.
In this blog, I’ll be trying to explain how I implemented the Webhook relay. Most importantly the reference blog was about integration of WebhookRelay with GitHub, with GitLab still there were some unexplored areas and I faced some challenges while doing the integration. This motivated me to write a blog so that people will have a ready reference on how to integrate GitLab with Webhook Relay.
Step 1: Download WebHook Relay Agent on the local system
curl -sSL https://storage.googleapis.com/webhookrelay/downloads/relay-linux-amd64 > relay && chmod +wx relay && sudo mv relay /usr/local/bin
Note: Webhook Relay and Webhook Relay agent are different. Webhook Relay is running on public IP which triggers by GitLab and Webhook Relay Agent is a service which gets trigger by Webhook relay.
Step 2: Create a Webhook Relay Account
Step 3: Setting up the Webhook Relay Agent.
relay login -k token-key -s token-secret
Step 4: Create GItLab Repository
We will keep our repository a public one to keep things simple and understandable. Let’s say our Gitlab repository’s name is WebhookProject.
Step 5: Install GitLab and GitLab Hook Plugin.
Step 6: Create Jenkins Job
Step 7: Connecting GitLab Repository, Webhook Relay, and Webhook Relay Agent
The final and most important step is to Connect the Overall flow.
Start forwarding Webhooks to Jenkins
Open terminal and type command:
relay forward --bucket gitlab-jenkins http://localhost:8080/project/webhook-gitlab-test
The most critical part of the workflow is the link generated by the Webhook Relay Agent. Copy this link and paste Gitlab repository(webhookProject) → Settings → Integrations
Gitlab Repository → Settings → Integrations → webhook → Edit
Webhook Relay UI page → Relay Logs.
So now you know how to do WebHook integration between your VCS & Jenkins even when they are not directly reachable to each other.
Can you integrate a GitHub Webhook with Privately hosted Jenkins? Yes
Cheers Till Next Time!!!!