This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version=RHEL7 | |
# System authorization information | |
auth --enableshadow --passalgo=sha512 --enablefingerprint | |
# Install OS instead of upgrade | |
install | |
# Reboot after installation | |
shutdown | |
# Use network installation - choose your mirror | |
url --url='http://mirror.isoc.org.il/pub/centos/7/os/x86_64/' | |
# Use text mode install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURDIR=$HOME/virtual | |
PREFIX=${1:-""} | |
IMGS=/home/imgs/ | |
KS_PATH=$CURDIR/multinode.ks | |
URL="http://mirror.isoc.org.il/pub/centos/7/os/x86_64/" | |
# Install dependencies | |
# sudo yum install -y virt-install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REGISTRY_PORT=5000 | |
CACHE_DIR=$HOME/docker_cache | |
mkdir -p $CACHE_DIR | |
chmod a+rwX $CACHE_DIR | |
yum install docker -y | |
cat <<EOF >$CACHE_DIR/config.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random, time | |
def get_data(): | |
d = { | |
'branch': random.choice(["master"]*3 + ["pike", "ocata"]), | |
'cloud': random.choice(["rdo-cloud", "rh1", "infra1", "infra2"]), | |
'pipeline': random.choice(["check"]*2 + ["periodic", "gate"]), | |
'toci_jobtype': random.choice(['ovb-ha-oooq']*2 + ['multinode-2ctlr-featureset032', 'multinode-1ctlr-featureset016']), | |
'job_duration': random.randrange(7200, 10800), | |
'logs_size': random.randrange(10, 27), | |
'testenv_prepare': random.randrange(300, 700), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install -y https://kojipkgs.fedoraproject.org//packages/fpaste/0.3.7.4/1.fc21/noarch/fpaste-0.3.7.4-1.fc21.noarch.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks: | |
- name: Dump all vars | |
action: template src=templates/dumpall.j2 dest=/tmp/ansible.all | |
dumpall.j2: | |
Module Variables ("vars"): | |
-------------------------------- | |
{{ vars | to_nice_json }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for l in $(cat ~/jenkins_plugins.csv); | |
do | |
plugin=$(echo $l | cut -d";" -f1); | |
version=$(echo $l | cut -d";" -f2); | |
echo "Installing $plugin with version $version"; | |
arg="<install plugin=\"${plugin}@${version}\" />"; | |
cmd="curl -XPOST http://localhost:8080/pluginManager/installNecessaryPlugins -d ""'$arg'"; | |
$cmd; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for server in $(grep controller /etc/hosts | grep 192.0. | awk {'print $3'}); do ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -ttt heat-admin@$server "for service in \$(sudo systemctl list-units | grep openstack-heat | awk {'print \$1'}); do echo Restarting \$service; sudo systemctl restart \$service; done"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# History between sessions | |
shopt -s histappend | |
HISTSIZE=10000 | |
HISTFILESIZE=$HISTSIZE | |
HISTCONTROL=ignorespace:ignoredups | |
HISTTTIMEFORMAT="%F %T" | |
export HISTFILESIZE HISTSIZE HISTCONTROL HISTTIMEFORMAT | |
[ -r /home/sshnaidm/.byobu/prompt ] && . /home/sshnaidm/.byobu/prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function get_my_ip (){ | |
myint=$(ip r | grep default | grep -Eo "dev .*" | sed "s/dev //g" | tr -d " ") | |
echo $(ip a | grep "${myint}:" -A7 | grep "inet " | head -1 | awk {'print $2'} | cut -d"/" -f1) | |
} | |
function sendipmail () { | |
newip=$1 | |
nc smtp.redhat.com 25 <<EOF |