Skip to content

Instantly share code, notes, and snippets.

View lukehinds's full-sized avatar
🏃‍♂️
Either running or coding.

Luke Hinds lukehinds

🏃‍♂️
Either running or coding.
View GitHub Profile
CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH vagrant plugin install ~/tmp/vagrant-libvirt/vagrant-libvirt-0.0.40.gem
export PATH=$PATH:/usr/bin/core_perl
@lukehinds
lukehinds / ansible-hardening.sh
Last active April 3, 2019 07:45
Install ansible-hardening role. Construct inventory and playbook. Install Ansible Run Analysis and hooks.
#!/bin/bash
#set -x
if [[ `whoami` != "stack" ]]; then
echo -e "Please run this script as the stack user"
exit
fi
source ~/stackrc
When a new kernel borks your system.
Boot rescue disk
# cryptsetup luksOpen /dev/sda2 luks
# mount /dev/mapper/vg0-root /mnt
# mount /mnt/sda1 /mnt/boot
sudo yum install libguestfs-tools-c
virt-customize -a overcloud-full.qcow2 --install <package-name>
guestfish \
add overcloud-full.qcow2 : run : mount /dev/sda / : \
write /etc/resolv.conf "nameserver 10.10.160.1"
# To get details of machine
$ guestfish
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
virt-customize -a overcloud-full.qcow2 --install aide
sudo mv /httpboot /httpboot-old
sudo mkdir /httpboot # might need to restore boot.ipxe inspector.ipxe & pxelinux.cfg
openstack overcloud image upload --update-existing
Image "overcloud-full-vmlinuz" is up-to-date, skipping.
Image "overcloud-full-initrd" is up-to-date, skipping.
Image "overcloud-full" was uploaded.
+--------------------------------------+----------------+-------------+------------+--------+
Puppet modules troubleshooting: /var/lib/heat-config/deployed
sudo journalctl -u os-collect-config # Search for "Error" or module
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL
rbenv install 2.3.5
rbenv global 2.3.5
gem install bundler
rbenv rehash
@lukehinds
lukehinds / pypi
Last active November 24, 2017 17:02
# Increase version numbers:
grep version= setup.py
version="0.4",
# Build
python setup.py sdist
# Upload to test
twine upload --repository-url https://test.pypi.org/legacy/ dist/anteater-0.4.tar.gz