Skip to content

Instantly share code, notes, and snippets.

View csibbitt's full-sized avatar

Chris Sibbitt csibbitt

  • Red Hat, Inc
  • Ottawa, Canada
View GitHub Profile
top - 10:00:00 up 1 day, 8:00, 4 users, load average: 21.07, 21.05, 21.01
Tasks: 529 total, 1 running, 528 sleeping, 0 stopped, 0 zombie
%Cpu0 : 0.3 us, 1.0 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.7 us, 0.0 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.3 us, 0.3 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
* [info] Building...
Sending build context to Docker daemon 1.645MB
Step 1/3 : FROM quay.io/operator-framework/ansible-operator:v0.14.1
---> c84a46d21985
Step 2/3 : COPY watches.yaml ${HOME}/watches.yaml
---> Using cache
---> 70140a66ff3d
Step 3/3 : COPY roles/ ${HOME}/roles/
[csibbitt@laptop smart-gateway ((6bb6df7...)) ]$ dep ensure -v -vendor-only
root project import: /home/csibbitt/cloudops/smart-gateway is not within any GOPATH/src
[csibbitt@laptop smart-gateway ((6bb6df7...)) ]$ pwd
/home/csibbitt/cloudops/smart-gateway
[csibbitt@laptop smart-gateway ((6bb6df7...)) ]$ pwd -P
/home/csibbitt/golang/src/github.com/redhat-service-assurance/smart-gateway
[csibbitt@laptop smart-gateway ((6bb6df7...)) ]$ ls -ld /home/csibbitt/cloudops/smart-gateway
[root@compute-0 /]# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:da:ce:81 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:e9:dc:c4 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:bf:68:66 brd ff:ff:ff:ff:ff:ff
5: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
[test@haa-12 t]$ oc get po -l component=elasticsearch
NAME READY STATUS RESTARTS AGE
elasticsearch-cdm-j1cl1pxs-1-65bfb84d9d-pqn2v 2/2 Running 0 10d
[test@haa-12 t]$ oc get po -l name=service-assurance-operator
NAME READY STATUS RESTARTS AGE
service-assurance-operator-58f48f978d-2tl6c 2/2 Running 0 10d
[test@haa-12 t]$ oc delete csv service-assurance-operator.v0.1.0
clusterserviceversion.operators.coreos.com "service-assurance-operator.v0.1.0" deleted
apiVersion: smartgateway.infra.watch/v2alpha1
kind: SmartGateway
metadata:
name: saf-default-blue-telemetry
namespace: sa-telemetry
spec:
amqp_url: saf-default-blue-interconnect:5672/collectd/telemetry
container_image_path: quay.io/redhat-service-assurance/smart-gateway:latest
debug: "true"
prefetch: 15000
apiVersion: v1
kind: Service
metadata:
labels:
application: saf-default-interconnect
interconnect_cr: saf-default-interconnect
name: saf-default-blue-interconnect
namespace: sa-telemetry
spec:
ports:
#!/bin/bash
done=false
while [ "${done}" = "false" ]; do
unlabeled_pods=$(oc get pod -o json -l application=saf-default-tq-interconnect | jq -r ".items[] as \$p | \$p.metadata.labels | select(has(\"saf-ha-leg\") | not) | \$p.metadata.name")
echo "unlabeled pods: ${unlabeled_pods}"
if [ -z "${unlabeled_pods}" ]; then done=true; break; fi
apiVersion: interconnectedcloud.github.io/v1alpha1
kind: Interconnect
metadata:
name: 'saf-default-tq-interconnect'
namespace: 'sa-telemetry'
spec:
deploymentPlan:
size: 4
role: interior
livenessPort: 8888
apiVersion: smartgateway.infra.watch/v2alpha1
kind: SmartGateway
metadata:
name: saf-default-blue-telemetry
namespace: sa-telemetry
spec:
amqp_url: saf-default-blue-interconnect.sa-telemetry.svc.cluster.local:5672/collectd/telemetry
container_image_path: quay.io/redhat-service-assurance/smart-gateway:latest
debug: "true"
prefetch: 15000