Skip to content

Instantly share code, notes, and snippets.

View soukron's full-sized avatar

Sergio Garcia Martinez soukron

View GitHub Profile
@gonter
gonter / rpm-inv.sh
Created November 16, 2011 14:07
create a RPM inventory list in CSV format
#!/bin/sh
# prepare a CSV of currently installed RPM packages
echo "NAME;VERSION;RELEASE"
rpm -qa --queryformat "%{NAME};%{VERSION};%{RELEASE}\n" | sort -t\; -k 1
@omaciel
omaciel / proxy.sh
Last active August 29, 2015 14:04
Configure Satellite to connect to a proxy
# Block non-proxy traffic from your katello server
# The following environment variables must be set:
# SQUID: the FQDN for your proxy
# PROXY_USERNAME: username for squid
# PROXY_PASSWORD: password for your squid username
export ETH=$(ping -c 1 $(hostname) | grep 'icmp_seq' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}')
export PROXY=$(ping -c 1 $SQUID | grep 'icmp_seq' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}')
@jlsherrill
jlsherrill / ListenOnCandlepin.md
Last active February 28, 2019 15:24
clearing ListenOnCandlepin Events

Shut down foreman-tasks:

  service foreman-tasks stop

Open the rails console:

foreman-rake console
@karmab
karmab / README.md
Last active February 6, 2019 11:13
create federated files from input yaml

this is a simple tool called federer.py which, for a given yaml file:

  • splits its multiple documents
  • create the corresponding federated and placement files
  • indicate which types will be required
  • a script to actually deploys

The tool has also won 20 grand slams

@romgapuz
romgapuz / pickle2json.py
Created May 18, 2020 07:26
Tool for converting Pickle to JSON using this simple Python Command Line program
"""
Pickle2JSON is a simple Python Command Line program for converting Pickle file to JSON file.
Arguments: Only one (1) argument is expected which is the pickle file.
Usage: python pickle2json.py myfile.pkl
Output: The output is a JSON file bearing the same filename containing the JSON document of the converted Pickle file.
"""
# import libraries
import pickle
## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52

This gist provides some additional information referenced in the Ask an OpenShift Admin livestream on January 12th, 2022.

Updating OpenShift Clusters

Triggering an update to the cluster is done the same way, whether you're doing an update between z-streams (e.g. 4.9.8 -> 4.9.13) or an upgrade between y-releases (e.g. 4.8.z -> 4.9.z). There are three primary options:

  1. Use the webconsole This is pretty straightforward, browse to the Administration panel, then click the update button. If you're upgrading between y-releases, you may need to change the release stream.

  2. Use the CLI