Skip to content

Instantly share code, notes, and snippets.

Avatar

Roberto Carratala rcarrata

View GitHub Profile
View prueba1.sh
mkdir CURLMOLA
@rcarrata
rcarrata / prueba3.sh
Last active Dec 24, 2015
Código para la creacion de un archivo de texto simple
View prueba3.sh
touch quieroungintonic
View prueba4.sh
echo holaqase
echo $1
echo $2
@rcarrata
rcarrata / auto_ocp4.sh
Created Aug 21, 2019
OCP4 Automatic Installer Script
View auto_ocp4.sh
#!/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
}
View workaround_tower_repos_aws.sh
#!/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 Feb 7, 2020
Openshift Container Storage 4 Examples
View ocs4-example
#
# Namespace used for sandboxing
#
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: demo-ocs-workloads
View check_port.py
#!/usr/bin/python
import socket
import time
retry = 2
delay = 1
timeout = 1
ips = {}
@rcarrata
rcarrata / k8s-tower.yaml
Created Jul 16, 2020
Playbook for solve the issue in Tower of pip install openshift / kubernetes
View k8s-tower.yaml
#!/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 Aug 5, 2020
Machineset for create bare metal nodes in AWS
View metal_aws_machineset.sh
#!/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}"