Skip to content

Instantly share code, notes, and snippets.

View leifmadsen's full-sized avatar
🏠
Working from home

Leif Madsen leifmadsen

🏠
Working from home
  • Red Hat
  • Caledon, ON, Canada
  • 22:17 (UTC -04:00)
View GitHub Profile
ruby_block "Get starting values" do
block do
record = File.open("#{Chef::Config[:file_cache_path]}/#{db}-status.txt") {|f| f.readline}
node.set['mysql']['file_value'] = record.split("\t").first
node.set['mysql']['pos_value'] = record.split("\t")[1]
Chef::Log.info("Current values for file_value and pos_value are: #{node['mysql']['file_value']} and #{node['mysql']['pos_v#
end
action :create
end
# vim: set ft=ansible
- name: Deploy on OpenStack
hosts: localhost
gather_facts: false
vars_files:
- ~/.ansible/vars/elk_vars.yml
tasks:
- name: Deploy an instance
os_server:
@leifmadsen
leifmadsen / openshift+telemetry-infra.md
Last active April 25, 2018 20:15
OpenShift 3.9 Origin + Telemetry Core

Deploy SA Telemetry

A brief bit of information on how I've deployed OpenShift Ansible from the release-3.9 branch with GlusterFS storage, service brokers including Ansible Service Broker.

Permissions

oc login -u system:admin
oc create namespace sa

oc project sa

@leifmadsen
leifmadsen / telemetry-post-install.md
Last active April 30, 2018 17:42
Telemetry Post-Install Actions

Telemetry Post-Install Actions

Some actions that might be done post-install of telemetry to setup the system.

add user to htpasswd

htpasswd -bn lmadsen Sup3r$3creT
<copy_hash>
sudo su -

cat >> /etc/origin/master/htpasswd <

@leifmadsen
leifmadsen / atomic-resize-root.md
Last active June 22, 2018 15:02
Resize CentOS Atomic Root Disk

Resizing CentOS Atomic /dev/atomicos/root disk

I found out that the default Atomic root disk is only 3GB! That causes all sorts of problems on the master when you try to spin up more than a handful of things (you get disk pressure errors, and things end up not spinning up properly).

NOTE

You'll need to make sure you have libguestfs-xfs package installed or virt-resize won't be able to expand the XFS partition.

@leifmadsen
leifmadsen / infrared_home_network.md
Last active July 10, 2018 19:39
InfraRed Hybrid Cloud Environment Setup

Deployment Commands

VM spinup

ir virsh --host-address localhost --host-key ~/.ssh/id_rsa --topology-nodes "undercloud:1,controller:1" --topology-network bridged_undercloud --disk-pool /home/images/infrared --image-url https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2

Files

undercloud.conf

@leifmadsen
leifmadsen / telemetry_prereq.md
Last active August 13, 2018 14:33
Telemetry Pre-Requisite Builds
@leifmadsen
leifmadsen / telemetry-install.md
Last active August 13, 2018 14:33
Telemetry Platform Deployment Instructions

DEPRECATED

Documentation is now available at https://github.com/redhat-nfvpe/telemetry-framework/tree/master/docs

Telemetry Platform Deployment

Instructions in this gist are for the deployment of the telemetry platform on top of OpenShift Origin v3.9. Deployment of the platform is done in two (2) steps. The first step is bootstrap of the virtual hosts and installation of the virtual machines (VM) on those virtual hosts (virthost).

@leifmadsen
leifmadsen / telemetry-client-install.md
Last active August 13, 2018 14:33
Telemetry Platform Client Side Installation

DEPRECATED

Documentation is now available at https://github.com/redhat-nfvpe/telemetry-framework/tree/master/docs

Installation of the client will result in two containers running, along with two folders installed on the host system which provides the configuration to the Docker containers.

Containers being installed and executing will be barometer and qdr for the Barometer collectd and the local QPID Dispatch Router.