Skip to content

Instantly share code, notes, and snippets.

View omaciel's full-sized avatar
🎯
Learning

Og Maciel omaciel

🎯
Learning
View GitHub Profile
@omaciel
omaciel / instructions.md
Created November 21, 2014 20:45
Configuring Docker as Compute Resource for Satellite 6
  • Enable the "Extras" Red Hat channel so you can install Docker ...
#subscription-manager repos --enable rhel-7-server-extras-rpms
  • ... and install it
# yum install -y docker
@omaciel
omaciel / install_foretello.sh
Last active August 29, 2015 14:10
Install Foretello nightly on EC2
#!/usr/bin/env sh
# Install fortello on to an Amazon EC2 instance. Make sure to set the variables
# in the head of this script.
set -o errexit -o nounset
# Default user for EC2 images is "ec2-user", so switch to "root"
sudo su -
# By default the EC2 instance's hostname matches its internal hostname. The
@omaciel
omaciel / lesson4.pp
Created November 11, 2014 19:03
Lesson 4
# Puppet for Hackers course module by James
# Copyright (C) 2013-2014+ James Shubin
# Written by James Shubin <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@omaciel
omaciel / commands.md
Created November 8, 2014 16:00
Clean up Ginger
[root@ginger ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 803   qe-sat6iso-rhel65              running
 804   qe-sat6iso-rhel7               running
 919   rhel7abrt                      running
 1132  atomic-host4                   running
 1237  28315344                       running
 1295  33298768                       running
@omaciel
omaciel / mocked.py
Created October 9, 2014 18:56
Playing with Mock
import mock
class Car(object):
def shift_down(self):
print "Down"
def shift_up(self):
print "Up"
@omaciel
omaciel / 00-readme.md
Last active January 20, 2025 14:04
Create Host Collection and Activation Keys, associating them as well as adding all available subscriptions to the Activation Key for a scenario where you have enabled and synchronized RHEL 5/6/7 i386, x86_64, ppc64 and s390x repositories.

Instructions

Please update 01-credentials.sh to include your credentials, and run these scripts in the order shown below:

  • 01-credentials.sh
  • 02-os-versions.sh
  • 03-initial-configuration.sh
  • 04-enable-content.sh
  • 05-content-views.sh
@omaciel
omaciel / .gitconfig
Last active August 29, 2015 14:05
My personal .gitconfig
[user]
name = Og B. Maciel
email = <email goes here>
[color]
ui = true
status = auto
diff = auto
branch = auto
interactive = auto
@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}')
@omaciel
omaciel / import_on_demand.py
Created July 30, 2014 17:45
Python: Import on Demand
def render(engine_id, template, **kwargs):
engines = {
"jinja2": "jinja2",
"mako": "make.template",
}
try:
module = engines[engine_id]
engine = __import__(
module, globals(), locals(), ['Template'], -1)
except (KeyError, ImportError) as err:
@omaciel
omaciel / gist:3d0bd0a5dc15211007a5
Created May 27, 2014 14:43
Locally running UI tests from Robottelo using Sauce Labs

Step 1

Sauce Connect is a secure tunneling app which allows you to execute tests securely when testing behind firewalls via a secure connection between Sauce Labs’ client cloud and your environment.

Download the version of Sauce Connect that corresponds to your guest's platform. For some reason Sauce Connect v4 never worked for me, so I use Sauce Connect v3 instead.

Step 2

After unpacking Sauce Connect, cd to its directory and start it up using your SauceLabs credentials: