Skip to content

Instantly share code, notes, and snippets.

View miticojo's full-sized avatar

Giorgio Crivellari miticojo

View GitHub Profile
@miticojo
miticojo / barnabas-persistent.yml
Created September 14, 2018 14:28
Kafka with persistent storage - Template OCP
apiVersion: template.openshift.io/v1
kind: Template
metadata:
annotations:
description: This template installes Apache Zookeeper and Apache Kafka clusters.
For more information about using this template see https://github.com/EnMasseProject/barnabas
iconClass: fa pficon-topology
openshift.io/display-name: Apache Kafka (Persistent storage)
tags: messaging,datastore
template.openshift.io/documentation-url: https://github.com/EnMasseProject/barnabas
@miticojo
miticojo / ignition.yaml
Created August 26, 2018 13:26
Linux Container YAML configuration for K8S with Kubeadm
# From blog post: https://vadosware.io/post/yet-another-cluster-reinstall-back-to-container-linux/
# This config is meant to be consumed by the config transpiler, which will
# generate the corresponding Ignition config. Do not pass this config directly
# to instances of Container Linux.
# NOTE: This configuration is meant to work with Config Transpiler v0.8.0
# The spec is available at (https://github.com/coreos/container-linux-config-transpiler/blob/v0.8.0/doc/configuration.md)
passwd:
users:
@miticojo
miticojo / haproxy-config.template
Last active January 8, 2022 16:56
OCP TCP ROUTER for JENKINS SLAVE
{{/*
haproxy-config.cfg: contains the main config with helper backends that are used to terminate
encryption before finally sending to a host_be which is the backend that is the final
backend for a route and contains all the endpoints for the service
*/}}
{{- define "/var/lib/haproxy/conf/haproxy.config" }}
{{- $workingDir := .WorkingDir }}
{{- $defaultDestinationCA := .DefaultDestinationCA }}
{{- $router_ip_v4_v6_mode := env "ROUTER_IP_V4_V6_MODE" "v4" }}
[root@ocp-master1 ~]# oc get logs hawkular-cassandra-1-wlmsf
the server doesn't have a resource type "logs"
[root@ocp-master1 ~]# oc logs hawkular-cassandra-1-wlmsf
The MAX_HEAP_SIZE envar is not set. Basing the MAX_HEAP_SIZE on the available memory limit for the pod (2000000000).
The memory limit is less than 2GB. Using 1/2 of available memory for the max_heap_size.
The MAX_HEAP_SIZE has been set to 953M
The HEAP_NEWSIZE envar is not set. Setting the HEAP_NEWSIZE to one third the MAX_HEAP_SIZE: 317M
About to generate seeds
Trying to access the Seed list [try #1]
Setting seeds to be ;; connection timed out; no servers could be reached
@miticojo
miticojo / gitlab-scheduled-backup.yml
Created June 4, 2018 05:52
ocp/k8s gitlab backup cronjob
apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
kind: Role
metadata:
creationTimestamp: null
name: pod-reader
rules:
@miticojo
miticojo / main.yml
Last active April 30, 2018 10:41
Ansible loop and dict combine
- hosts: localhost
gather_facts: no
vars:
# structure from https://docs.ansible.com/ansible/2.5/plugins/inventory/yaml.html
inventory:
all: # keys must be unique, i.e. only one 'hosts' per group
hosts:
test1:
test2:
var1: value1
@miticojo
miticojo / ocbackup.sh
Last active May 15, 2018 14:41
OCP backup config
#!/bin/bash
BACKUP_DIR="/root/openshift_backup"
BACKUP_DIR_WITH_DATE=${BACKUP_DIR}_$(date +%Y%m%d%H%M)
### Setup
mkdir -p $BACKUP_DIR_WITH_DATE
echo -n "Backing cluster conf"
mkdir -p $BACKUP_DIR_WITH_DATE/cluster
@miticojo
miticojo / jboss-eap-proto.py
Last active September 25, 2018 15:19
jboss module proto module
#!/usr/bin/python
## API ref EAP 6 https://docs.jboss.org/author/display/WFLY8/Management+API+reference
## API ref EAP 7 https://docs.jboss.org/author/display/WFLY10/Management+API+reference
import sys
import argparse
import requests
from requests.auth import HTTPDigestAuth
import pprint
@miticojo
miticojo / play1.yml
Last active March 13, 2018 21:03
Save variable though runnings
- hosts: localhost
vars:
my_variable_collection:
colore: rosso
occhi: azzurri
segno: ariete
tasks:
@miticojo
miticojo / play-test.yml
Created March 13, 2018 20:53
Ansible pass variable through playbooks running
- hosts: localhost
vars:
colore: rosso
tasks:
- name: setto il colore rosso
set_fact: colore_preferito="{{colore}}"
- hosts: localhost