Skip to content

Instantly share code, notes, and snippets.

@jonathanelbailey
jonathanelbailey / create_ovirt_iso
Last active April 17, 2017 02:22
a script to create a custom ovirt node next iso image that uses an online kickstart file.
#! /bin/bash set -e
# to run this script:
# curl -s https://gist.githubusercontent.com/jonathanelbailey/cc5f118c6750c6976305c98aec43a2f7/raw/ \
# | sudo bash /dev/stdin
# Create the working and mount directories
mkdir -p /tmp/work/bootiso
# Download the ISO artifact from the ovirt jenkins link.
curl \
@jonathanelbailey
jonathanelbailey / iso_image_edit.psm1
Last active December 20, 2023 19:28
a powershell module that allows for the modification of ISO images.
# this function grabs the iso image from the user supplied http location.
function get-isoimage{
[CmdletBinding()]
param(
$uri,
$workingfolder
)
begin{
$file_name = $uri -replace "http://[\s\S]+\/([\s\S]+\.iso)$",'$1'
$out_file = Join-Path $workingfolder -ChildPath $file_name
@jonathanelbailey
jonathanelbailey / nas_nfs_server_bootstrap
Last active October 28, 2019 09:43
a bootstrap script that configures the NFS server for storage domain management with Ovirt.
#! /bin/bash
set -e
# to run this script:
# curl -s https://gist.githubusercontent.com/jonathanelbailey/1274ad29a8cdcc9a74d9a994571afdf0/raw/ \
# | sudo bash /dev/stdin
# comment out previous rpcmountdopts key.
sed -i '/RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4/a # RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4' \
/etc/default/nfs-kernel-server
# append new key with manage-gids option removed.
@jonathanelbailey
jonathanelbailey / ovirt_node-ks.cfg
Last active June 26, 2020 14:46
kickstart file for configuring an ovirt-node installation
#version=DEVEL
# to run this script enter the following:
# linux ks=https://gist.githubusercontent.com/jonathanelbailey/b2ba868d39491f4e6a7497010b0f6b18/raw/
# System authorization information
auth --enableshadow --passalgo=sha512
# SELinux configuration
selinux --permissive
# action=setup
[environment:default]
OVESETUP_DIALOG/confirmSettings=bool:True
OVESETUP_CONFIG/applicationMode=str:both
OVESETUP_CONFIG/remoteEngineSetupStyle=none:None
OVESETUP_CONFIG/sanWipeAfterDelete=bool:False
OVESETUP_CONFIG/storageIsLocal=bool:False
OVESETUP_CONFIG/firewallManager=str:firewalld
OVESETUP_CONFIG/remoteEngineHostRootPassword=none:None
OVESETUP_CONFIG/firewallChangesReview=none:None
@jonathanelbailey
jonathanelbailey / entrypoint.sh
Last active March 12, 2017 21:19
entrypoint script for ovirt-engine to avoid reinstalling the service.
#!/bin/bash
set -e
# start ovirt-engine without installing the service again.
su -m -s /bin/python ovirt /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py start
@jonathanelbailey
jonathanelbailey / ovirt_sdk_bootstrap
Last active March 15, 2017 00:36
a script that installs all dependencies required to install an ovirt host.
#! /bin/bash
# to run this script, use the following command:
# curl -s \
# https://gist.githubusercontent.com/jonathanelbailey/0bc55ade9aafe6191e92a12c5c65fc87/raw \
# | sudo bash /dev/stdin
yum -y install python-setuptools epel-release gcc libxslt-devel \
libxml++-devel libxml2-devel python-devel
yum -y install python-pip python-wheel python-lxml
pip install ovirt-engine-sdk-python
@jonathanelbailey
jonathanelbailey / ovirt_engine_bootstrap
Last active October 8, 2017 03:17
a parameterized script that spins up an ovirt-engine environment.
#! /bin/bash set -e
# run this script using the following command:
# curl -s \
# https://gist.githubusercontent.com/jonathanelbailey/784e54452723e5294f456ce46f907cf7/raw/ \
# | sudo bash /dev/stdin --postgres-password param1 --ovirt-password param2
# getopt is used to create long params for the script.
params=`getopt -o dp:o: --long debug,postgres-password:,ovirt-password: -n 'ovirt_engine_bootstrap' -- "$@"`
# unrecognized params terminate the script.
@jonathanelbailey
jonathanelbailey / magic-ks.cfg
Created March 2, 2017 05:18
a kickstart file for installing minimal centos 7 on a baremetal machine.
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Automate install
autostep
# Use graphical install
#graphical
# Run the Setup Agent on first boot
@jonathanelbailey
jonathanelbailey / baremetal_centos_bootstrap
Last active April 14, 2017 12:41
a simple bootstrap script to bootstrap a baremetal centos machine.
#! /bin/bash
# to run, use the following command:
# curl -s \
# https://gist.githubusercontent.com/jonathanelbailey/b1aeb43bc59c0330c0b9bfa9a26565eb/raw/ \
# | sudo bash /dev/stdin
# perform initial package update
echo "updating packages..."
yum -y update