Skip to content

Instantly share code, notes, and snippets.

View oglok's full-sized avatar

Ricardo Noriega oglok

  • Red Hat
  • Madrid, Spain
  • 06:34 (UTC +02:00)
View GitHub Profile
@oglok
oglok / gist:45945f46e242fd06cc09df1a959dd5f5
Created August 19, 2021 10:45
Federated Learning Library Example
# First we have to use the library to generate data sets. NOTE: it's all based on the default examples.
root@4bf328b1096a:/app# python examples/generate_data.py -n 2 -d nursery -pp 200
Using TensorFlow backend.
Finished! :) Data saved in examples/data/nursery/random
# Once data is generated, we need the config files (YAML) for aggregator and N number of parties
root@4bf328b1096a:/app# python examples/generate_configs.py -n 2 -f id3_dt -d nursery -p examples/data/nursery/random/
Using TensorFlow backend.

Namespace

apiVersion: v1
kind: Namespace
metadata:
  creationTimestamp: null
  name: openshift-cnv
spec: {}
status: {}
SCTP] sctp_bindx SCTP_BINDX_ADD_ADDR socket bound to : 10.128.0.41
[SCTP] Converted ipv4 address 10.130.0.26 to network type
[SCTP] connectx assoc_id 5 in progress..., used 1 addresses
[SCTP] Inserted new descriptor for sd 66 in list, nb elements 1, assoc_id 5
[LIBCONFIG] loader.coding: 2/2 parameters successfully set, (1 to default value)
%global srcname keylime
%define name keylime
%define version 5.0.0
%define unmangled_version 5.0.0
%define release 5
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Open source TPM software for Bootstrapping and Maintaining Trust
@oglok
oglok / replace_actuator.sh
Created March 26, 2019 11:58
Replacing current actuator by our own cluster-api-provider-baremetal
echo "Disabling Cluster Version Operator"
kubectl scale deployment cluster-version-operator -n openshift-cluster-version --replicas=0
echo "Deleting machinesets and machines..."
MACHINESET=$(kubectl get machineset -n openshift-machine-api | grep worker | awk '{print $1}')
kubectl delete machineset $MACHINESET -n openshift-machine-api
MASTER=$(kubectl get machine -n openshift-machine-api | grep master | awk '{print $1}')
kubectl delete machine $MASTER -n openshift-machine-api &
Junos01
-----------------
show configuration
em1 {
unit 0 {
family inet {
address 169.254.0.2/24;
address 193.168.30.150/24;
}
family mpls;
@oglok
oglok / gist:5db8aa325439b5d4317be35b3314bcd0
Last active March 20, 2018 17:10
2 OVS Instances in the same host
ovsdb-tool create /etc/openvswitch/vswitch.db /usr/share/openvswitch/vswitch.ovsschema
ovsdb-tool create /etc/openvswitch/vswitch2.db /usr/share/openvswitch/vswitch.ovsschema
ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema
ovsdb-tool create /etc/openvswitch/vtep2.db /usr/share/openvswitch/vtep.ovsschema
/var/run/openvswitch/ovsdb-server.pid
/var/run/openvswitch/ovsdb-server2.pid
@oglok
oglok / gist:d0e7c4f272d20f09b2192ec545252542
Created March 20, 2018 09:45
OPNFV Apex scenario with patch
---
global_params:
ha_enabled: false
patches:
overcloud:
- change-id: I095258b442fd91c53a0d6c655aead1a3ffe73483
project: openstack/puppet-tripleo
branch: master
deploy_options:
@oglok
oglok / Openvswitch LTS in CentOS 7.md
Created March 12, 2018 15:35 — forked from umardx/Openvswitch LTS in CentOS 7.md
Installation Openvswitch LTS in CentOS 7

The most recent release from the LTS series: http://openvswitch.org/releases/openvswitch-2.5.4.tar.gz

Instructions:

As the root user let’s install some packages:

yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel

Add a new user and switch to that user:

@oglok
oglok / Full restart VTEP Emulator
Last active December 29, 2023 07:02
Full restart VTEP Emulator
rm -rf /var/run/openvswitch
mkdir /var/run/openvswitch
rm -rf /etc/openvswitch
mkdir -p /etc/openvswitch
ovsdb-tool create /etc/openvswitch/vswitch.db /usr/share/openvswitch/vswitch.ovsschema
ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema
ovsdb-server --pidfile --detach --log-file --remote ptcp:6632:192.168.0.13 --remote punix:/var/run/openvswitch/db.sock --remote=db:hardware_vtep,Global,managers /etc/openvswitch/vswitch.db /etc/openvswitch/vtep.db
ovs-vswitchd --log-file --detach --pidfile unix:/var/run/openvswitch/db.sock