Skip to content

Instantly share code, notes, and snippets.

View brk3's full-sized avatar
😮‍💨

Paul Bourke brk3

😮‍💨
View GitHub Profile
---
- hosts: storage
tasks:
- name: Setup Ceph
shell: parted /dev/vdb -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP 1 -1
#!/bin/bash
set -x
build() {
project=$1
docker build . \
--build-arg http_proxy=$http_proxy \
--build-arg https_proxy=$https_proxy \
---
- hosts: all
tasks:
#- debug:
#msg: "{{ item }}"
#with_filetree: /tmp/paul
- file:
path: "/tmp/result/{{ item.path }}"
---
- hosts: storage
tasks:
- shell: |
index=0
for d in sdc sdd sde; do
free_device=$(losetup -f)
fallocate -l 1G /tmp/$d
losetup $free_device /tmp/$d
---
- hosts: storage
tasks:
- name: Setup Cinder
shell: |
free_device=$(losetup -f)
fallocate -l 10G /var/lib/cinder_data.img
losetup $free_device /var/lib/cinder_data.img
pvcreate $free_device
<domain type='kvm'>
<name>virtual-baremetal</name>
<uuid>2a4cedd7-4912-4f96-ab04-a5c40e014c1c</uuid>
<memory unit='KiB'>25165824</memory>
<currentMemory unit='KiB'>25165824</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='network'/>
</os>
@brk3
brk3 / all.yml
Created February 15, 2018 17:54
ceph-ansible demo
---
dummy:
devices:
- /dev/vdb
osd_objectstore: bluestore
ceph_mgr_modules: [status,dashboard]
osd_scenario: collocated
ceph_stable_release: luminous
monitor_interface: eth0
public_network: 192.169.5.0/24
---
# ansible-playbook -i localhost, hello-ansible.yml --connection=local
- hosts: all
tasks:
- shell:
cmd:
hostname
Name: Hello-World
Version: 1.0
Release: 1%{?dist}
Summary: My first repository on GitHub!
License: blah
URL: https://github.com/octocat/Hello-World
BuildRequires: git
%define my_key my_value
#!/bin/bash
docker run --name nginx -v $(pwd):/usr/share/nginx/html:ro \
-v $(pwd)/default.conf:/etc/nginx/conf.d/default.conf:ro -p 8080:80 -d nginx