Skip to content

Instantly share code, notes, and snippets.

@jclaret
jclaret / Gists.md
Created June 7, 2024 14:17 — forked from BoQsc/Gists.md
How to search my own Gists

Install the operator using the Manual approval strategy

cat <<EOF| oc apply -f -
apiVersion: v1
kind: Namespace
metadata:
  name: amq
---
apiVersion: operators.coreos.com/v1alpha1
@jclaret
jclaret / ocp4-day2-readme
Created April 20, 2023 10:43 — forked from ikurni/ocp4-day2-readme
OCP4 Day 2
Openshift Day 2 guidance :
-----------------------------------------------------------------------------------------------
Configure Openshift ingress operator to use node label “infra: true” and run router pods only in infra node
Edit openshift-ingress config :
# oc edit ingresscontrollers.operator.openshift.io/default -n openshift-ingress-operator
In the spec: section add below comment :
---
nodePlacement:
nodeSelector:
matchLabels:
@jclaret
jclaret / Self-Signed SSL with SAN.md
Created March 31, 2023 12:21 — forked from KeithYeh/Self-Signed SSL with SAN.md
Create self-signed SSL certificate with SubjectAltName(SAN)

How to create a self-signed SSL Certificate with SubjectAltName(SAN)

After Chrome 58, self-signed certificate without SAN is not valid anymore.

Step 1: Generate a Private Key

openssl genrsa -des3 -out example.com.key 2048

Step 2: Generate a CSR (Certificate Signing Request)

@jclaret
jclaret / lfs258.md
Last active September 6, 2020 17:25

Install Kubernetes

Master node

$ apt-get update && apt-get upgrade -y

$ apt-get install -y vim

$ apt-get install -y docker.io ; systemctl enable docker.service

@jclaret
jclaret / Satellite
Last active December 2, 2021 15:56
# Satellite
## Tasks Status
sudo su - postgres -c "psql -d foreman -c 'select label,count(label),state,result from foreman_tasks_tasks where state <> '\''stopped'\'' group by label,state,result ORDER BY label;'"
## Foreman-rake commands - https://access.redhat.com/solutions/1754193
### Cancel Tasks
> foreman-rake console
irb(main):001:0> ForemanTasks::Task.find("799bc5fb-2d4c-4d0d-9d7d-4e42e9a8ace8").destroy
### Synchronize a repository from CDN
# OCP 4 Installation
RHV: https://medium.com/@daein/ocp4-3-installation-on-rhv-4-3-with-bare-metal-method-653186c6de63
Static IP: https://medium.com/@zhimin.wen/static-ip-for-ocp4-d2e4c1da5de
https://access.redhat.com/solutions/4799921[Adding worker nodes to the OCP 4 UPI cluster existing 24+ hours]
subscription-manager register
subscription-manager attach --auto
subscription-manager repos --enable rhel-7-server-extras-rpms --enable rhel-7-server-ansible-2.9-rpms
podman search rhel
podman pull rhel
podman images
podman run ubi7/ubi:7.7 echo "Hello!"
podman run -d rhscl/httpd-24-rhel7:2.4-36.8
curl http://10.88.0.68:8080
podman run -it ubi7/ubi:7.7 /bin/bash
podman run -e GREET=Hello -e NAME=RedHat rhel7:7.5 printenv GREET NAME
podman run --name mysql-custom -e MYSQL_USER=redhat -e MYSQL_PASSWORD=r3dh4t -d rhmap47/mysql:5.5
@jclaret
jclaret / OpenShift in Action
Last active March 18, 2020 19:35
OpenShift in Action
oc login -u dev -p dev https://ocp-1.192.168.122.100.nip.io:8443
oc login -u system:admin
oc new-project image-uploader --display-name='Image Uploader Project'
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git