Skip to content

Instantly share code, notes, and snippets.

View aweiteka's full-sized avatar

Aaron Weitekamp aweiteka

  • Red Hat
  • Boston, MA
View GitHub Profile
@aweiteka
aweiteka / install_ipa_server.sh
Last active December 14, 2015 01:39
Install IPA server
#!/bin/bash
# Setup IPA server for QE
# TODO: setup replica server for redundancy
# https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6-Beta/html-single/Identity_Management_Guide/index.html#Setting_up_IPA_Replicas
# TODO: setup Windows AD cross-domain trust
parse_args() {
# Process cmdline arguments
@aweiteka
aweiteka / smtp_config.sh
Created March 21, 2013 20:16
basic mail server (MTA) to receive email from test infrastructure
#!/usr/bin/env bash
# setup inbound mail server for mail processing
# will forward mail for delivery
subscription-manager register --username=******@redhat.com --password=************** --autosubscribe
yum update -y
yum install -y postfix mutt
postconf -e "inet_interfaces = all"
postconf -e "mynetworks_style = class"
@aweiteka
aweiteka / gist:6244550
Last active December 21, 2015 03:48
RHEVM additional setup for CFME
# Additional RHEVM config need for cap&util data collection
# per https://access.redhat.com/site/articles/411683
yum install -y rhevm-reports
echo "yes" | rhevm-dwh-setup
# FIXME: multi-prompt approach not working... need expect? :(
rhevm-reports-setup << EOT
yes "\n"
redhat "\n"
@aweiteka
aweiteka / packstack_network_config
Last active December 21, 2015 21:39
openstack network commands
#!/usr/bin/env bash
# commands to run after packstack install with quantum ovs plugin
# see docs: https://access.redhat.com/site/documentation/en-US/Red_Hat_OpenStack/3/html-single/Getting_Started_Guide/index.html#sect-Working_with_Quantum_Networking
ovs-vsctl show
quantum net-create ext-net --router:external True --provider:network_type vlan --provider:physical_network physnet1 --provider:segmentation_id 140
quantum net-list
# 'ext-net' provider name from previous step. range must not include gateway but cider range must include gateway
@aweiteka
aweiteka / install-ose.sh
Created January 9, 2014 17:09
Wrapper script to install a distributed OpenShift Enterprise environment with 3 brokers and multiple node hosts.
#!/usr/bin/env bash
# install distributed OSE 2.0
# assumes subscribed RHEL OS, FQDN
# external DNS setup
usage() {
echo "Usage: ./`basename $0` <host_name> <broker|node|broker_replica>"
echo "Argument(s) missing: <host_name> such as 'broker1'"
echo " second arg is <host_role>, one of broker, node or broker_replica"
@aweiteka
aweiteka / enter_container.sh
Created July 17, 2014 16:01
drop into running docker container shell using nsenter
#!/usr/bin/env bash
# drop into running docker container shell
if [ -z "$1" ]; then
echo "USAGE: ./`basename $0` <container_id>"
exit 1
fi
PID=$(docker inspect --format '{{ .State.Pid }}' $1)
@aweiteka
aweiteka / signing_and_provenance.md
Last active July 29, 2019 18:11
Docker Image Signing and Provenance

Docker Image Signing and Provenance

Provenance (from the French provenir meaning "to come from"): the origin or source of something

Overview

We need a better way of distributing docker images securely. This includes:

  • data integrity
  • issuer trust and verification
  • supporting distributed access to assemble an image
  • attestation of the image assembly (commands/instructions to build it)
@aweiteka
aweiteka / pulp_containers_demo.md
Last active March 28, 2024 16:22
Pulp in docker containers demo script

Running Pulp server in containers

In this screencast I demonstrate running Pulp as a set of Docker containers. Pulp is a repository management platform that now supports Docker images via a plugin. Porting the Pulp services to containers made sense given its service-oriented architecture.

Documentation

This screencast will be following the quickstart guide found on pulpproject.org. http://wwww.pulpproject.org https://github.com/aweiteka/pulp/blob/docker_quickstart/docs/sphinx/user-guide/docker-quickstart.rst

@aweiteka
aweiteka / pulp-registry-demo.md
Created August 12, 2014 21:34
Using pulp as docker registry demo script

How to use pulp as a docker registry

In this screencast I demonstrate using Pulp as a Docker registry. Pulp is a repository management platform that now supports Docker images via a plugin. Pulp provides several enterprise-oriented features that are not a part of the docker-registry such as separate administrative interface, role-based access control, syncing content across and organization and event-based notification to support continuous integration workflows.

You need to have access to a pulp server to complete this demonstration yourself. See my other screencast for installing the pulp server.

Documentation

This screencast will be following the quickstart guide found on pulpproject.org. http://wwww.pulpproject.org

@aweiteka
aweiteka / crane-on-pulp.sh
Last active August 29, 2015 14:06
Running Crane as a docker container on Pulp server
#!/bin/bash
# Runs crane container on pulp server
# Container runs on port 5000 since port 80 is used by pulp host apache
# serves docker content on port 80 so docker client doesn't choke on unsigned ssl cert
# Unsigned cert error: x509: certificate signed by unknown authority
# Note: pulp_docker default redirect-url is https://<hostname>/pulp/docker/<image>
# This assumes http://<hostname>/pulp/docker/<image>
cat >/etc/pulp/vhosts80/docker.conf <<EOF