Skip to content

Instantly share code, notes, and snippets.

View rcarrata's full-sized avatar
🛠️

Roberto Carratalá rcarrata

🛠️
View GitHub Profile
@rcarrata
rcarrata / prueba1.sh
Last active December 24, 2015 00:19
testlist
mkdir CURLMOLA
echo "Hola mundo"
@rcarrata
rcarrata / prueba3.sh
Last active December 24, 2015 02:29
Código para la creacion de un archivo de texto simple
touch quieroungintonic
echo holaqase
echo $1
echo $2
@rcarrata
rcarrata / auto_ocp4.sh
Created August 21, 2019 21:45
OCP4 Automatic Installer Script
#!/bin/bash
# Small Script for install IPI OCP4 automatically
set -e
set -o pipefail
usage() {
echo "Usage: $0 [ -a aws_secret_key_id ] [ -s aws_secret_access_key ] [ -o ocp_version ] [ -r aws_region ]" 1>&2
}
#!/bin/bash
## Workaround for fix the bug
## https://github.com/ansible/workshops/pull/498/files
sudo yum-config-manager --disable rhui-REGION-rhel-server-extras
sudo yum-config-manager --disable rhui-REGION-rhel-server-rhscl
sed -i.bak 's/rhui-REGION-rhel-server-extras/rhel-7-server-rhui-extras-rpms/g' roles/repos_el/vars/RedHat-7.yml
sed -i.bak 's/rhui-REGION-rhel-server-rhscl/rhel-server-rhui-rhscl-7-rpms/g' roles/repos_el/vars/RedHat-7.yml
@rcarrata
rcarrata / ocs4-example
Last active February 7, 2022 07:51
Openshift Container Storage 4 Examples
#
# Namespace used for sandboxing
#
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: demo-ocs-workloads
#!/usr/bin/python
import socket
import time
retry = 2
delay = 1
timeout = 1
ips = {}
@rcarrata
rcarrata / k8s-tower.yaml
Created July 16, 2020 14:48
Playbook for solve the issue in Tower of pip install openshift / kubernetes
#!/usr/bin/env ansible-playbook
# Installs the company specific virtual environments for Python properly
# into the Tower environment following the Ansible Tower environment notes:
# URL: https://docs.ansible.com/ansible-tower/3.3.4/html/upgrade-migration-guide/virtualenv.html
#
# NOTE: Requires the EPEL repository to install the python2-pip package.
#
# Usage:
# $ sudo ./setup_venvs.yml -i inventory.sand_swn01.ini
#
@rcarrata
rcarrata / metal_aws_machineset.sh
Created August 5, 2020 18:26
Machineset for create bare metal nodes in AWS
#!/usr/bin/env bash
export REGION="eu-west-1"
export AZS="${REGION}a ${REGION}b ${REGION}c"
export FLAVOR="m5.metal"
MACHINESET_PREFIX=$(oc get machineset -n openshift-machine-api -o json| jq '.items[0].metadata.labels."machine.openshift.io/cluster-api-cluster"' | tr -d '""')
for AZ in ${AZS}; do
export NAME="${MACHINESET_PREFIX}-metal-${AZ}"