Skip to content

Instantly share code, notes, and snippets.

View Thakurvaibhav's full-sized avatar
✌️
Fight On!

Vaibhav Thakur Thakurvaibhav

✌️
Fight On!
View GitHub Profile
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.http_connection_manager
domain: apis
descriptors:
- key: generic_key
value: global
rate_limit:
unit: second
requests_per_unit: 60
- key: generic_key
value: local
rate_limit:
@Thakurvaibhav
Thakurvaibhav / pipeline.json
Created February 12, 2019 09:04
Spinnaker pipeline
{
"appConfig": {},
"expectedArtifacts": [],
"keepWaitingPipelines": false,
"lastModifiedBy": "thakur.vaibhav23@gmail.com",
"limitConcurrent": false,
"parameterConfig": [],
"stages": [
{
"account": "k8-staging-1",
@Thakurvaibhav
Thakurvaibhav / nginx.yaml
Last active February 4, 2024 15:35
Demo Nginx Deployment and Service Manifest
apiVersion: v1
kind: Namespace
metadata:
name: nginx
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: nginx
name: nginx-deployment
@Thakurvaibhav
Thakurvaibhav / trigger.properties
Created February 12, 2019 07:56
Properties file for trigger from Jenkins to Spinnaker
TAG=1.7-SNAPSHOT
ACTION=DEPLOY
@Thakurvaibhav
Thakurvaibhav / Jenkins-job-execute-shell.sh
Last active February 24, 2023 10:57
Updating the nginx conf to depict current app version
#!/bin/bash
#Author: Vaibhav Thakur
#Checking whether commit was in master of not.
if_master=`echo $payload | jq '.ref' | grep master`
if [ $? -eq 1 ]; then
echo "Pipeline should not be triggered"
exit 2
fi
@Thakurvaibhav
Thakurvaibhav / sample-ecs-deploy.json
Created November 6, 2018 07:31
Sample deploy.json file used in https://www.linkedin.com/pulse/learners-guide-deploying-docker-ecs-using-gitlab-ci-vaibhav-thakur/ . family and containerDefinitions.name are also generated when you create first ecs deployment from the console.
{
"containerDefinitions": [
{
"memory": 600,
"portMappings": [
{
"hostPort": 0,
"containerPort": 3000,
"protocol": "tcp"
},
{
"containerDefinitions": [
{
"memory": 600,
"portMappings": [
{
"hostPort": 0,
"containerPort": 3000,
"protocol": "tcp"
},
{
"containerDefinitions": [
{
"memory": 600,
"portMappings": [
{
"hostPort": 0,
"containerPort": 3000,
"protocol": "tcp"
},
#All the environment variables are defined under Settings > CI/CD > Secret Variables section
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
stages:
- build_dev