Skip to content

Instantly share code, notes, and snippets.

View dougbtv's full-sized avatar

Doug Smith dougbtv

View GitHub Profile
@dougbtv
dougbtv / README.md
Last active February 14, 2024 18:02
Whereabouts reconciler cron schedule change + file deletion in OCP 4.12.z

Enable the reconciler...

oc edit networks.operator.openshift.io cluster and add the additionalNetworks section like:

  additionalNetworks:
  - name: whereabouts-shim
    namespace: openshift-multus
    rawCNIConfig: |-
      {
@dougbtv
dougbtv / README.md
Created June 24, 2021 15:22
Whereabouts clear IP allocations

Clearing IP allocations manually with Whereabouts

This outlines a process for clearing IP address allocations with Whereabouts manually. This clears all allocations, you could be more surgical about it, however, this is efficient if it's possible.

NOTE I have another procedure somewhere which has fancy bash commands to make this easier, and is fully tested, however, in theory this "should just work" (you've heard that before)

Overview

  1. Stop all pods which use Multus + Whereabouts (if possible)
  2. Clear IP allocations
@dougbtv
dougbtv / README.md
Created August 11, 2021 16:09
Multus: Reference external namespace in openshift

Referring to "global namespaces" using Multus CNI in OpenShift

This demonstrates using a cross-namespace reference in OpenShift to refer to net-attach-defs in the openshift-multus namespace from another namespace.

See the additional pod.yml and net-attach-def.yaml files included in this gist.

Using latest OCP from CI (4.9 master)

@dougbtv
dougbtv / README.md
Last active July 5, 2023 13:45
Whereabouts with additional specified routes

Using Whereabouts + Multus to add an additional route on an additional network interface...

Install an etcd for data storage for Whereabouts.

$ git clone https://github.com/coreos/etcd-operator.git
$ cd etcd-operator/
$ example/rbac/create_role.sh
$ kubectl create -f example/deployment.yaml
$ watch -n1 kubectl get pods -o wide --all-namespaces
@dougbtv
dougbtv / README.md
Last active May 11, 2023 16:31
Istio + Multus CNI: Annotation clobbering, replication and fix

Istio + Multus CNI: Annotation clobbering, replication and fix

This details a reference deployment of Istio w/ Multus CNI to demonstrate a problem where annotations are being clobbered by the Istio webhook. It also provides a patch and workflow for a possible fix.

This article first demonstrates how to reproduce the article, then proposes a patch, and demonstrates a way to build and deploy Istio with the modified code.

NOTE: Ignore the 1.5.1 through the install, I replicate it with latest (Nov 2021), and provide further steps following the rest of the installation.

Suggested system

@dougbtv
dougbtv / oobabooga_api_query.js
Created April 14, 2023 18:09
Node.js script to query oobabooga via API
const axios = require('axios');
// Server URL
const server = "http://192.168.50.201:5000/api/v1/generate";
// Generation parameters
// Reference: https://huggingface.co/docs/transformers/main_classes/text_generation#transformers.GenerationConfig
const data = {
'prompt': 'recommend a cheese please',
"max_new_tokens": 100,
@dougbtv
dougbtv / !result.md
Created April 7, 2017 17:50
ARI monkey demo failboat

So here's my results generally.... Using the below extensions.conf and JS file. It's based entirely on the example monkeys playback demo

I originate the call...

0fa669f1fad8*CLI> channel originate LOCAL/123@inbound application wait 1  
    -- Called 123@inbound
    -- Executing [123@inbound:1] NoOp("Local/123@inbound-00000010;2", "Inbound call") in new stack

    -- Executing [123@inbound:2] Answer("Local/123@inbound-00000010;2", "") in new stack
@dougbtv
dougbtv / inventory-with-gluster.conf
Created August 23, 2017 19:30
sample openshift-ansible with gluster inventory
openshift-master ansible_host=192.168.1.92
openshift-minion-1 ansible_host=192.168.1.238
openshift-minion-2 ansible_host=192.168.1.187
[OSEv3:children]
masters
nodes
etcd
# lb
# nfs
@dougbtv
dougbtv / atomic_host_install.md
Last active January 17, 2023 22:00
OpenShift Origin CentOS Atomic Host Install Recipe

Assuming you've already run the virt-host-setup playbook, you'll first need to remove (or move) the existing CentOS image to download a new one. (Or change the variables to otherwise put it in a new place, but, this is how I did it). I also went and ran the vm-teardown.yml playbook to remove existing hosts.

Go ahead and move the CentOS cloud image...

$ cd /home/images/
$ ls -lh CentOS-7-x86_64-GenericCloud.qcow2 
-rw-r--r--. 1 root root 838M Feb  6 19:35 CentOS-7-x86_64-GenericCloud.qcow2
$ mv CentOS-7-x86_64-GenericCloud.qcow2 not.atomic.CentOS-7-x86_64-GenericCloud.qcow2
@dougbtv
dougbtv / README.md
Last active December 21, 2022 19:42
Multus runtime config (for IP / mac address)

all-in-one-example

---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: centos-runtimeconfig-def
spec:
  config: '{