Skip to content

Instantly share code, notes, and snippets.

View sridhargaddam's full-sized avatar

Sridhar Gaddam sridhargaddam

  • Red Hat
  • Bangalore
View GitHub Profile
@sridhargaddam
sridhargaddam / enable-forwarding
Last active August 9, 2023 06:35
enable-forwarding
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: enable-forwarding
namespace: submariner-operator
spec:
selector:
matchLabels:
app: enable-forwarding
@sridhargaddam
sridhargaddam / deployNexdAgent
Created July 6, 2023 17:16
Commands to deploy a nexodus agent as router in an OCP cluster.
oc create namespace nexodus
oc project nexodus
oc create serviceaccount -n nexodus nexodus
oc adm policy add-scc-to-user -z nexodus privileged
cat <<EOF | oc apply -f -
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
@sridhargaddam
sridhargaddam / disable-offload-vxlan-iface.yaml
Created June 13, 2023 18:23
Disable offload on vxlan interfaces for BM nodes
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disable-offload
namespace: submariner-operator
spec:
selector:
matchLabels:
app: disable-offload
@sridhargaddam
sridhargaddam / disable-offload-vxlan-ifaces.yaml
Created May 17, 2023 13:26
Spawn a DaemonSet pod to disable tx/rx offload on vxlan interfaces
# @sridhargaddam
# this script spawns a daemonSet pod in a k8s cluster to disable tx/rx offloading
# on vx-submariner interface created by Submariner route-agents
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disable-offload
namespace: submariner-operator
spec:
@sridhargaddam
sridhargaddam / disable-offload-vx-submariner.yaml
Last active May 10, 2023 13:09
Spawn a DaemonSet pod to disable tx/rx offload on vx-submariner interface
# @sridhargaddam
# this script spawns a daemonSet pod in a k8s cluster to disable tx/rx offloading
# on vx-submariner interface created by Submariner route-agents
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disable-offload
namespace: submariner-operator
spec:
@sridhargaddam
sridhargaddam / spawnvnf.sh
Created November 21, 2018 17:31
Script to automate spawning of VNF instance
#!/bin/bash
# This is a sample script that automates the creation of necessary neutron resources
# and spawning of a VNF as shown in proposal-1.
# Usage:
# To simply create the necessary Neutron resources run the following command
# ./spawnvnf.sh
# To create resources and also to Spawn the VNF, run the command
# ./spawnvnf.sh vnf
# For cleanup, run the command
@sridhargaddam
sridhargaddam / monitor.py
Created July 20, 2018 11:49
monitor.py file for monitoring the ODL cluster shard leader
#!/usr/bin/python
"""
Cluster Monitor Tool
Author: Phillip Shea
Updated: 2016-Mar-07
This tool provides real-time visualization of the cluster member roles for all
shards in either the config or operational datastore.
A file named 'cluster.json' contaning a list of the IP addresses and port numbers
@sridhargaddam
sridhargaddam / Devstack for Stable Queens
Last active March 7, 2018 05:40
DevStack Config for Stable Queens Branch
[[local|localrc]]
# put the log files in a dir different than the source so they can be manipulated independently
SCREEN_LOGDIR=$DEST/logs/screen
LOGFILE=$DEST/logs/stack.sh.log
LOG_COLOR=True
# flip OFFLINE and RECLONE to lock (RECLONE=no) or update the source.
OFFLINE=True
RECLONE=no
HOST_IP=192.10.10.248
# disable everything so we can explicitly enable only what we need
@sridhargaddam
sridhargaddam / L3VPN config
Last active February 16, 2018 04:40
EVPNWithODL VPN Configuration
2.1: Define L3VPN instance and associate it with OpenStack admin tenant
------------------------------------------------------------------------
export ODL_URL='http://192.168.121.109:8181/restconf'
export CT_JSON="Content-Type: application/json"
TENANT_UUID=$(openstack project show admin -f value -c id | \
sed 's/\(........\)\(....\)\(....\)\(....\)\(.*\)/\1-\2-\3-\4-\5/')
cat << EOF > ./evpn-full.json
{
@sridhargaddam
sridhargaddam / CumulusConfig
Created February 15, 2018 09:20
CumulusConfig-EVPNWithODL
File /etc/network/interfaces
-----------------------------
# Loopback interface
auto lo
iface lo inet loopback
address 2.2.2.2/32
# The primary network interface
auto eth0