Skip to content

Instantly share code, notes, and snippets.

View luszczynski's full-sized avatar

Gustavo Luszczynski luszczynski

  • Red Hat
  • Brazil
View GitHub Profile
@luszczynski
luszczynski / docker-push-remote-openshift.md
Last active January 3, 2020 02:38
Docker push to Openshift (from external machine)

Docker push to Openshift (from external machine)

Export some vars:

MY_USER=admin
MY_PASS=redhat@123
OCP_MASTER_URL=https://ocp-master.example.com:8443

If you are cluster-admin,

@luszczynski
luszczynski / iRule
Created October 25, 2018 16:42
iRule f5 openshift
www.cliente.com.br/app1
www.cliente.com.br/app2
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/app-a") } {
HTTP::header replace Host "app-a.apps.no.openshift.com.br"
set uri [string map -nocase {"/app-a/" "/"} [HTTP::uri]]
HTTP::uri $uri
pool openshift_infra_nodes
}
@luszczynski
luszczynski / kafka-on-kubernetes-demo.adoc
Created October 17, 2018 17:32 — forked from hodrigohamalho/amq-streams-demo.adoc
Kafka on Kubernetes (Strimzi) Demo Script
@luszczynski
luszczynski / dnsmasq.conf
Created October 16, 2018 00:21
dnsmasq.conf
conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig
listen-address=127.0.0.1
strict-order
domain-needed
local=/example.com/
bind-dynamic
resolv-file=/etc/resolv.conf.upstream
address=/.apps.example.com/192.168.122.5
log-queries
@luszczynski
luszczynski / openshift-pre-req.md
Last active July 29, 2019 23:49
Openshift Prerequisites

Openshift prerequisites

Servers

1 Servidor (Bastion)

  • RHEL 7.6 minimal puro (sem customização);
  • 2 vCPUs;
  • 4 GB de memória;
  • SELinux deve estar habilitado;
@luszczynski
luszczynski / secrets
Created November 1, 2017 11:28
Creating secrets on Openshift CLI
oc new-project test
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git -n test
oc secrets new mysecret trustore=foo.txt -n test
oc secrets link default mysecret -n test
oc volumes dc/ruby-ex -n test
oc volumes dc/ruby-ex --add --mount-path=/tmp/test --secret-name=mysecret --type=secret -n test
@luszczynski
luszczynski / kvm-qcow2-shirink.md
Created November 22, 2016 15:02 — forked from rafaeltuelho/kvm-qcow2-shirink.md
to shrink a QEMU/KVM qcow2 image
sudo qemu-img convert -c -O qcow2 fedora-22-server.qcow2 box.img
apiVersion: v1
kind: BuildConfig
metadata:
name: custom-jenkins-pipeline-build
spec:
source:
git:
uri: https://github.com/luszczynski/custom-jenkins-ose-config.git
type: Git
strategy:
# /etc/named.conf
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
anyuid false [] false MustRunAs RunAsAny RunAsAny RunAsAny 10
hostaccess false [] true MustRunAs MustRunAsRange RunAsAny RunAsAny <none>
hostmount-anyuid false [] true MustRunAs RunAsAny RunAsAny RunAsAny <none>
nonroot false [] false MustRunAs MustRunAsNonRoot RunAsAny RunAsAny <none>
privileged true [] true RunAsAny RunAsAny RunAsAny RunAsAny <none>
restricted true [] false MustRunAs RunAsAny RunAsAny RunAsAny <none>