Skip to content

Instantly share code, notes, and snippets.

View derekjkeller's full-sized avatar
🌭

Derek Keller derekjkeller

🌭
View GitHub Profile
#!/bin/bash
echo -e "\nPreparing the temporary backup directory\n"
umask 0027
export BACKUP_DIR=/var/tmp/backup-$(date +%Y-%m-%d)
mkdir $BACKUP_DIR
chgrp postgres $BACKUP_DIR
chmod 770 $BACKUP_DIR
echo -e "Done\n"
@derekjkeller
derekjkeller / setup_sat_clone.sh
Created November 12, 2020 07:26 — forked from johnpmitsch/setup_sat_clone.sh
setup satellite clone script
#!/bin/bash
subscription-manager register
subscription-manager attach --auto
yum install -y vim git
git clone https://github.com/RedHatSatellite/satellite-clone
cd satellite-clone/
chmod -R 755 helpers/
# Change RHEL version as needed
sed -ie 's/RHEL_MAJOR_VERSION="0"/RHEL_MAJOR_VERSION="7"/g' ./helpers/control_node_setup.sh
./helpers/control_node_setup.sh
@derekjkeller
derekjkeller / satellite_backup_estimate.sh
Created November 12, 2020 07:25 — forked from benformosa/satellite_backup_estimate.sh
Estimate the size of a Red Hat Satellite backup
#!/usr/bin/bash
set -o errexit # -e
set -o pipefail
# Estimate the size of a Red Hat Satellite backup
# Based on https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html/administering_red_hat_satellite/chap-red_hat_satellite-administering_red_hat_satellite-backup_and_disaster_recovery#sect-Red_Hat_Satellite-Administering_Red_Hat_Satellite-Backing_up_Satellite_Server_or_Capsule_Server-Estimating_the_Size_of_a_Backup
# Author: Ben Formosa
# Copyright 2018, Commonwealth of Australia
@derekjkeller
derekjkeller / instructions.md
Created November 12, 2020 07:14 — forked from omaciel/instructions.md
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

Register both Satellite and Capsule systems

Run these commands on both Satellite and Capsule systems to properly register them to CDN and to remove Beaker repositories (only needed for Red Hat QE folks)

export USER_NAME=""
export USER_PASSWORD=""
export POOLID=""
export ADMIN_USER="admin"
@derekjkeller
derekjkeller / 00-readme.md
Created November 12, 2020 07:00 — forked from omaciel/00-readme.md
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
[weli@virt-jboss-01 ~]$ sudo virsh list
 Id    Name                           State
----------------------------------------------------
 1     VM_weli                        running
 4     stliu                          running
 6     jimma                          running
 8     lgao                           running