Skip to content

Instantly share code, notes, and snippets.

View oglok's full-sized avatar

Ricardo Noriega De Soto oglok

  • Red Hat
  • Madrid, Spain
View GitHub Profile
FROM quay.io/centos-bootc/fedora-bootc:eln
COPY rpmbuild/RPMS/x86_64/flightctl-agent-0.0.1-1.el9.x86_64.rpm /tmp/
COPY flightctl_rsa.pub /usr/etc-system/root.keys
RUN touch /etc/ssh/sshd_config.d/30-auth-system.conf; \
mkdir -p /usr/etc-system/; \
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf; \
chmod 0600 /usr/etc-system/root.keys
VOLUME /var/roothome
@oglok
oglok / gist:41f8d78e907f2458c2725b1a83e62b93
Last active January 4, 2023 17:52
Upgrade/Rollback testbed
QUAY_USER=oglok
cd microshift
./scripts/image-builder/configure.sh
# Remove the call to cleanup script from build.sh
./scripts/image-builder/build.sh -pull_secret_file /etc/crio/openshift-pull-secret -ostree_server_name 192.168.122.1:8080
@oglok
oglok / test-route-validation.sh
Created July 26, 2022 09:52 — forked from Miciah/test-route-validation.sh
Shell script to test the OpenShift Route API validation with an OpenShift cluster
#!/bin/bash
set -uo pipefail
expect_pass() {
rc=$?
if [[ $rc != 0 ]]
then
tput setaf 1
echo "expected success: $*, got exit code $rc"
@oglok
oglok / gist:5251e61106c9958e8cbc5effa3b2baf6
Created May 4, 2022 16:18
MicroShift with Containerd
First of all remove CRIO (if installed) and install Containerd:
sudo dnf remove crio
sudo dnf install containerd
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
sudo systemctl restart containerd
sudo systemctl status containerd
Install CNI plugins:
@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;