Skip to content

Instantly share code, notes, and snippets.

@nuthanc
nuthanc / README.md
Last active January 20, 2021 06:56
Bird VM interface and conf

Contents of bird.conf and interfaces

  • /usr/local/etc/bird/bird.conf
  • /etc/network/interfaces
@nuthanc
nuthanc / config
Last active June 14, 2021 06:02
Jenkins SanityScheduler previous condition for k8s #sanityscheduler
#For k8s sanity
if [ "${BRANCH}" \> "1910" ] && [[ $TAG =~ ubi ]]; then
echo "ID=${ID}" > $WORKSPACE/${BUILD_NUMBER}_BLR_${DISTRO}_k8s_multi_interface_ha_sanity_ansible.properties
echo "BRANCH=${BRANCH}" >> $WORKSPACE/${BUILD_NUMBER}_BLR_${DISTRO}_k8s_multi_interface_ha_sanity_ansible.properties
echo "AVAILABLE_TESTBEDS=testbed_k8s_multi_intf_ha_sanity_setup.py" >> $WORKSPACE/${BUILD_NUMBER}_BLR_${DISTRO}_k8s_multi_interface_ha_sanity_ansible.properties
fi
#For k8s virtual sanity
#if [ "${BRANCH}" \> "1910" ] && [[ $TAG =~ ubi ]]; then
if [ "${BRANCH}" \> "2008" ] && [[ $TAG =~ ubi ]] && [[ ! "${BRANCH}" =~ "master" ]]; then
@nuthanc
nuthanc / coredns_issue.txt
Created November 4, 2020 13:59
Coredns issue solved #Yuvaraja
if ip_fabric_forwarding is enabled, route “10.64.0.0 192.168.27.1 255.240.0.0 UG 0 0 0 vhost0” is needed which was missing. [Added manually. Now setup is fine]
Here 192.168.27.1 is the Router ip
@nuthanc
nuthanc / config
Created November 4, 2020 10:38
kube config file #danil #n18-setup
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURVVENDQWptZ0F3SUJBZ0lVTTBmWG05RVpwR2hQam81TStBQnMrTHlScS9jd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0dERVdNQlFHQTFVRUF3d05NVGt5TGpFMk9DNHlOeTR5TURBZUZ3MHlNREV3TWpneE1EVTRNVE5hRncwegpNREV3TWpZeE1EVTRNVE5hTUJneEZqQVVCZ05WQkFNTURURTVNaTR4TmpndU1qY3VNakF3Z2dFaU1BMEdDU3FHClNJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUNiUEZsQ3pCOTcwRC96THBLKzQ2MjZrY2hUNndPSkJvRjAKbHE0Ylh0bzlCeUlCRTlIQzlKVCt5SWF0U0NIYjlRaG9yTFkvZENELzV4aHUra2VaUUdCc04yU2x0Sy94bytkTQpCNzdHRFQxaTYyUmpCVGswLzAwT3pxeTRyRUlYOFRndWloeUxzNjhidGM3R1dQNWFJelNaUGdDZEZLRU9NZlE4Cm92OGkyVU9JVXc5UUlsaDJPVU5FWU42Z2NSbGNCb0g5VlNScVQ5a3I1c1N2NHBwZjJmT1FRN3FTbDRYUDg1clEKRjNRQVRScHNZT0VpRXUzY21qZnRyelV5ZWFGaUpRbVVPU2pjWDd5QkgrRERETmtobmtUbHkvSWJGTjYrM3ZTWQoySXdCNXdBUVFhM01zS2JyVzVLdmY0eEZFbGhmOUlwNkNuWmpJZHQ3RGh5a2VnRWhCc2wzQWdNQkFBR2pnWkl3CmdZOHdIUVlEVlIwT0JCWUVGTjlYUjgvd2V3aE5JS3dJeC9WWDFaNlBkVzJFTUZNR0ExVWRJd1JNTUVxQUZOOVgKUjgvd2V3aE5JS3dJeC9WWDFaNlBkVzJFb1J5a0dqQVlNUll3RkFZ
@nuthanc
nuthanc / command_servers.yaml
Last active October 21, 2020 06:57
Contrail command R1909.30.7 build failure files #deployment
command_servers:
server1:
ip:
connection: ssh
ssh_user: root
ssh_pass: c0ntrail123
sudo_pass: c0ntrail123
ntpserver: 10.204.217.158
registry_insecure: true
container_registry: bng-artifactory.juniper.net/contrail-nightly
@nuthanc
nuthanc / bind.txt
Created October 6, 2020 06:47
juju add to different space #spaces #juju #binding
juju add-machine --constraints tags=compute-o7k --constraints spaces=data
@nuthanc
nuthanc / hub_failure.txt
Created September 30, 2020 06:05
1912.L3.77 hub.juniper failure
Fully qualified test name: scripts.k8s_scripts.test_policy.TestNetworkPolicy.test_egress_rules_label_edit
test_egress_rules_label_edit
Test case with class: TestNetworkPolicy.test_egress_rules_label_edit[k8s_sanity,once_again,rerun,run_again]
Location of test case: /contrail-test/scripts/k8s_scripts/test_policy.py
Fully qualified test name: scripts.k8s_scripts.test_policy.TestNetworkPolicy.test_ingress_rules_label_edit
test_ingress_rules_label_edit
Test case with class: TestNetworkPolicy.test_ingress_rules_label_edit[k8s_sanity,once_again,rerun,run_again]
Location of test case: /contrail-test/scripts/k8s_scripts/test_policy.py
@nuthanc
nuthanc / cluster_reimage.sh
Created September 28, 2020 14:31
Reimage and status files
server-manager reimage --cluster_id k8s_nodeg12_ha_setup centos-7.8
sleep 5m
sshpass -p 'c0ntrail123' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o "ServerAliveInterval 2" -l root nodeg12 reboot
sshpass -p 'c0ntrail123' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o "ServerAliveInterval 2" -l root nodeg31 reboot
sshpass -p 'c0ntrail123' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o "ServerAliveInterval 2" -l root nodec19 reboot
sshpass -p 'c0ntrail123' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o "ServerAliveInterval 2" -l root nodec21 reboot
sshpass -p 'c0ntrail123' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o "ServerAliveInterval 2" -l root nodec23 reboot
@nuthanc
nuthanc / clean.py
Created September 28, 2020 06:19
Python file for removing unwanted files
from subprocess import check_output
import os
output = check_output("cd /tmp && ls -lhrt", shell=True, universal_newlines=True).split("\n")
for out in output:
if 'Sep 28' not in out:
print(out.split(" ")[-1])
un = out.split(" ")[-1]
print(f"rm -rf {un}")
#new_out = check_output(f"rm -rf {un}", shell=True, universal_newlines=True)
@nuthanc
nuthanc / error.txt
Last active October 7, 2020 06:01
k8s error #docker-compose
2020-09-14 15:28:25,996 p=52 u=root | fatal: [10.204.218.100]: FAILED! => {"changed": false, "cmd": ["/usr/bin/pip2", "install", "docker-compose==1.24.1"], "msg": "stdout: Collecting docker-compose==1.24.1\n Downloading docker_compose-1.24.1-py2.py3-none-any.whl (134 kB)\nCollecting docker[ssh]<4.0,>=3.7.0\n Downloading docker-3.7.3-py2.py3-none-any.whl (134 kB)\nCollecting websocket-client<1.0,>=0.32.0\n Downloading websocket_client-0.57.0-py2.py3-none-any.whl (200 kB)\nCollecting PyYAML<4.3,>=3.10\n Downloading PyYAML-3.13.tar.gz (270 kB)\nCollecting dockerpty<0.5,>=0.4.1\n Downloading dockerpty-0.4.1.tar.gz (13 kB)\nCollecting docopt<0.7,>=0.6.1\n Downloading docopt-0.6.2.tar.gz (25 kB)\nCollecting jsonschema<3,>=2.5.1\n Downloading jsonschema-2.6.0-py2.py3-none-any.whl (39 kB)\nCollecting texttable<0.10,>=0.9.0\n Downloading texttable-0.9.1.tar.gz (11 kB)\nRequirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < \"3.5\" in /usr/lib/python2.7/site-packages (from docker-co