Skip to content

Instantly share code, notes, and snippets.

View odyssey4me's full-sized avatar

Jesse Pretorius odyssey4me

  • Red Hat
  • United Kingdom
View GitHub Profile
@odyssey4me
odyssey4me / devpi.sh
Last active April 22, 2021 15:37
Exploring various pypi repo/cache options
# http://doc.devpi.net/latest/
# Basic host package set
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban
# Install packages
apt-get install -y python-pip gcc git-core libssl-dev libffi-dev python-pyasn1 python-openssl python-ndg-httpsclient gzip python-dev lsb-release python-virtualenv
pip install devpi-server devpi-web devpi-client
@odyssey4me
odyssey4me / test.yml
Last active August 25, 2017 15:52
ansible async job with retries - unfortunately using async with retries doesn't work
---
- hosts: localhost
gather_facts: false
tasks:
- name: Test single async task
shell: "sleep 2; false"
register: _async_test1
async: 1800
poll: 0
@odyssey4me
odyssey4me / openstack-auth-playbook.yml
Created July 18, 2017 12:31
Configure openrc/clouds.yaml on any host
---
- name: Configure OpenStack authentication information
hosts: openstack_clients
gather_facts: no
roles:
- role: "openstack_openrc"
openrc_cinder_endpoint_type: publicURL
openrc_nova_endpoint_type: publicURL
openrc_os_endpoint_type: publicURL
openrc_clouds_yml_interface: public
@odyssey4me
odyssey4me / ansible.cfg
Last active March 27, 2019 20:48
Ansible/OpenStack configuration
# In ~/.ansible.cfg
[defaults]
inventory = ~/.ansible/inventory
retry_files_enabled = False
#stdout_callback = yaml
bin_ansible_callbacks = True
[inventory]
enable_plugins = ini, openstack
cache_connection = /tmp/ansible_fact_cache
@odyssey4me
odyssey4me / 0-setup.sh
Last active April 14, 2021 03:36
Poor man's frozen apt mirror - it still needs work to do an auto clean based on files not referenced
apt-get update
apt-get purge -y nano
apt-get install -y vim tmux fail2ban nginx apt-mirror lxc
# change nginx config:
# /etc/nginx/sites-enabled/default
systemctl restart nginx
# change apt-mirror config:
# /etc/apt/mirror.list
@odyssey4me
odyssey4me / prep.sh
Last active September 21, 2017 14:47
Build/customise RAX Public Cloud Images
apt-get update
apt-get purge -y nano
apt-get install -y git vim tmux fail2ban build-essential libffi-dev qemu-utils
curl --silent https://bootstrap.pypa.io/get-pip.py > /opt/get-pip.py
python /opt/get-pip.py pip==9.0.1 setuptools==33.1.1 wheel==0.29.0
pip install six swiftly
# clone the tooling repo
git clone https://github.com/odyssey4me/rpc_rd.git
cd rpc_rd/qcow_image
@odyssey4me
odyssey4me / 00-full-command-transcript.sh
Last active November 6, 2024 17:07
Ansible remote chroot experimentation
#!/bin/bash
# do this on localhost (deployment host)
# ensure that there's a local ssh private key
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
# now make sure that the public key is in the second host's authorized_keys
# then do a test ssh connection to make sure it works, and to add the host
# to known hosts
@odyssey4me
odyssey4me / release.sh
Last active November 7, 2016 14:59
OpenStack-Ansible Release Procedure (Nov 4 2016)
### Note that you can't copy-paste this whole thing.
### Each line break is a plce where manual input is required, or
### bash will not retain anything else copied and execute it.
#
###master sha update
#
cd ~/code/openstack-ansible
git checkout master
@odyssey4me
odyssey4me / 00-full-command-transcript.sh
Last active October 24, 2016 10:35
Ansible 2.1.1 experimentation with conditional include handling
#!/bin/bash
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban build-essential python2.7 python-dev libssl-dev libffi-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
pip install -U ansible==2.1.1
@odyssey4me
odyssey4me / 00-full-command-transcript.sh
Last active September 21, 2016 17:09
Ansible 2.1.1 regression for conditional include handling: https://github.com/ansible/ansible/issues/17687
#!/bin/bash
apt-get update && \
apt-get purge -y nano && \
apt-get install -y git vim tmux fail2ban build-essential python2.7 python-dev libssl-dev libffi-dev
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7
pip install ansible==2.1.0