Skip to content

Instantly share code, notes, and snippets.

View hellt's full-sized avatar
🦍
grinding

Roman Dodin hellt

🦍
grinding
View GitHub Profile
❯ make
../makefile-install.include:32: warning: overriding recipe for target `docker-pre-build'
../makefile.include:18: warning: ignoring old recipe for target `docker-pre-build'
Makefile:22: warning: overriding recipe for target `docker-build-image-copy'
../makefile.include:21: warning: ignoring old recipe for target `docker-build-image-copy'
for IMAGE in vmx-bundle-20.2R1.10.tgz; do \
echo "Making $IMAGE"; \
make IMAGE=$IMAGE docker-build; \
done
Making vmx-bundle-20.2R1.10.tgz
@hellt
hellt / config.yaml
Created January 25, 2021 20:13
goreleaser issue
project_name: containerlab
release:
github:
owner: srl-wim
name: container-lab
name_template: '{{.Tag}}'
milestones:
- repo:
owner: srl-wim
name: container-lab
@hellt
hellt / docker-centos-install.sh
Last active March 5, 2021 13:01
docker installation on centos
#!/bin/bash
set -e
sudo yum -y remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
@hellt
hellt / gist:d2b9f99a2fcfeeb7752d9fe187fbff86
Last active July 6, 2021 14:54
Always-ON SR Linux private key
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEA1BQO2Mi1gavtp+ghIyN+vm7yh/2mFt0aNiuwDP3ThB1IN6LLPVxV
nwGDQMw8+8UVYxZZlmdDibk85ECh8uEFQLT7gvw4ZkOxlTuHN0ET7Td2NBi+1HhihOPN3+
M/T1IxZs4gJ9Nh8CeCz/5XgUkao4Kg4LCn+yV51Yie7B1xFg9PCm1gsbNa/9+vtXOyoCpk
kzhnT8nLYRucIF36pOb80iEyBhQJfPFjpat4EkhssQy1U77xXcHui+9uN1DTTcAs056Yb/
GpQNhdvy/AwBRxvaZPR1fjXkRwEZZgE0DNUWriBM26yBCs0UGhBr2VrBCVtDPOEOfAmavF
b4grfMRRvaigPMWXtnFUc8M8fn8fUFiYxZwvNi7/0tbjeGZpx2FDPcLzGHCSf0mj5vApwk
HASsf3cxazjXlG8pB+AN5JbjhwWBa/kFKuZO2w2DmvCrv8Um4UOQ2M48c+PnIFvyOJRw87
9GhJL1WFgPXHccCBDbZpfKaPT8uF5uZz4R31nvlhAAAFiOqV2sDqldrAAAAAB3NzaC1yc2
FROM ubuntu:20.04
RUN apt update && apt -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
@hellt
hellt / clab.py
Created December 8, 2021 20:22
Royal TSX containerlab integration
import subprocess
import json
# connect to the remote VM and list all running labs in JSON format
s = subprocess.Popen("ssh {user}@{host} {cmd}".format(user="root", host="12.32.123.3", cmd='clab inspect --all --format json'), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
all_containers = json.loads(s[0])
baseConfig = json.dumps({
"Objects": [
{
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kindnet
rules:
- apiGroups:
- ""
resources:
- nodes
@hellt
hellt / checkpoint_cloudguard.yaml
Created July 10, 2022 16:12
checkpoint_cloudguard scrapli platform
---
default:
driver-type: "network"
privilege-levels:
configuration:
name: "configuration"
pattern: '(?im)^[\w.\-@/:]{1,63}>\s*$'
previous-priv: ""
deescalate: ""
escalate: ""
configure {
router "Base" {
static-routes {
route 192.168.200.200/32 route-type unicast {
next-hop "192.168.0.1" {
admin-state enable
}
}
}
}
@hellt
hellt / netem.sh
Created August 17, 2023 08:40
Using pumba/netem to set link impairments for container links
#!/usr/bin/env bash
# Copyright 2023 Nokia
# Licensed under the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
# this is an example of a bash script that can be used to introduce network impairments
set -o errexit
set -o pipefail