Skip to content

Instantly share code, notes, and snippets.

View ralvares's full-sized avatar
🏠
Working from home

Rodrigo Alvares ralvares

🏠
Working from home
  • RedHat
  • Dubai - AE
View GitHub Profile
@ralvares
ralvares / Openshift 4.3 on VMware using govc
Last active December 12, 2020 00:20
Openshift 4.3 on VMware using govc
#############################################################
# Run this script from the same location of the ign files #
#############################################################
########################## Installing govc #################################################
# mkdir $HOME/bin
# cd $HOME/bin
# wget https:////github.com/vmware/govmomi/releases/download/v0.22.1/govc_linux_amd64.gz
# gunzip govc_linux_amd64.gz && mv govc_linux_amd64 govc && chmod +x govc
@ralvares
ralvares / Automating OCP on VMWARE without DHCP using ipxe
Last active January 21, 2020 15:02
Using ipxe media to install rhcos without DHCP Server.
PS: This method works just with BIOS
#Install packages#
sudo yum install git xz-devel -y
sudo yum groupinstall "Development tools" -y
#Download ipxe
git clone https://github.com/ipxe/ipxe/
cd ipxe/src
@ralvares
ralvares / check_dns.sh
Last active June 4, 2020 17:44
Check OCP4 DNS
#!/bin/bash
IFS=","
CLUSTER_NAME=ocp
DOMAINNAME=example.com
BOOTSTRAP=192.168.150.30
MASTERS=192.168.150.30,192.168.150.31,192.168.150.32
WORKERS=192.168.150.40,192.168.150.41,192.168.150.42
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
oc patch configs.imageregistry.operator.openshift.io/cluster --type merge --patch '{"spec":{"managementState": "Managed"}}'
cat > nfs.yaml << EOF
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-registry-storage
spec:
#Create an Container Image with centos8 qcow2
oc new-build --name centos8 --build-arg image_url=https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2 https://github.com/openshift-examples/cnv-container-disk-build.git
#Create Openshift Template
cat > apache-template.yaml << EOF
# Source: dist/templates/centos8-server-tiny.yaml
apiVersion: template.openshift.io/v1
kind: Template
@ralvares
ralvares / dotnet31.txt
Last active July 7, 2020 07:27
dotnet-cicd
oc new-app jenkins-ephemeral
or
oc new-app jenkins-persistent
Create a file dotnet-jenkins-slave.yaml with the below content:
kind: ConfigMap
apiVersion: v1
metadata:
name: jenkins-agent-dotnet31
@ralvares
ralvares / vmware-install-config.yaml
Last active September 6, 2021 08:18
install-config.yaml
apiVersion: v1
baseDomain: example.com
proxy:
httpProxy: http://<username>:<pswd>@<ip>:<port>
httpsProxy: http://<username>:<pswd>@<ip>:<port>
noProxy: example.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
@ralvares
ralvares / DO425.md
Created September 24, 2020 11:56 — forked from luckylittle/DO425.md
Red Hat DO425 Notes

Red Hat Security: Securing Containers & OpenShift (DO425)

Last update: Tue Jan 14 23:15:49 UTC 2020 by @luckylittle


Objectives

  1. Understand, identify, and work with containerization features
  2. Deploy a preconfigured application and identify crucial features such as namespaces, SELinux labels, and cgroups
@ralvares
ralvares / Repository Steps - Disconnected
Created October 5, 2020 10:59
Repository Steps - Disconnected
## Install and Configure Image Registry Server
### List the devices and pick the correct one ( If you wanna have a disk dedicated to this )
parted /dev/sdb --script mklabel gpt
parted /dev/sdb --script -- mkpart primary 0% 100%
partprobe pvcreate /dev/sdb1
vgcreate registry /dev/sdb1
lvcreate -l 100%FREE -n storage registry
mkfs.xfs /dev/registry/storage
kind: ConfigMap
apiVersion: v1
metadata:
name: proxy-env
namespace: quay-enterprise
data:
http_proxy: 'http://admin:admin@192.168.122.1:8888'
https_proxy: 'http://admin:admin@192.168.122.1:8888'
no_proxy: 'ralvares.local,172.30.0.0/16,192.168.0.0/16,10.0.0.0/8,localhost,127.0.0.1'
---