Skip to content

Instantly share code, notes, and snippets.

View danilochilene's full-sized avatar

Danilo Chilene danilochilene

View GitHub Profile
@danilochilene
danilochilene / gist:2d12c89f04900e45669f44ae4f6a1c3a
Created March 28, 2018 13:41
salt-run return as variable
root@saltserver:/srv/salt/tools# salt-run minion.token
minion01:
fa651fe9be09fcadfe0fcc6fc018ab21
root@salt:/srv/salt/tools# salt 'minion01' state.sls tools/install-minion
minion01:
Data failed to compile:
@danilochilene
danilochilene / all.yml
Last active May 21, 2018 11:26
Ceph ansible install
---
dummy:
cluster: ceph
mon_group_name: mons
osd_group_name: osds
rgw_group_name: rgws
@danilochilene
danilochilene / Instructions
Last active January 8, 2018 17:07
OVS with OSA for Pike
Enter each neutron agent container, and run the following:
ovs-vsctl add-br br-provider
ovs-vsctl add-port br-provider eth12
On each compute node, run the following:
ovs-vsctl add-br br-provider
ovs-vsctl add-port br-provider br-vlan
debug: true
pip_validate_certs: false
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH"
group: "network_hosts"
glance_default_store: rbd
---
cidr_networks:
container: 10.20.20.0/24
tunnel: 10.30.30.0/24
storage: 192.168.1.0/24
used_ips:
- "10.20.20.1,10.20.20.50"
- "10.20.20.100,10.20.20.150"
- "10.30.30.1,10.30.30.50"
---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@danilochilene
danilochilene / config.go
Created March 24, 2017 16:12 — forked from abraithwaite/config.go
Awesome way to do configuration in go. Taken from https://github.com/influxdata/telegraf
package main
import (
"io/ioutil"
"log"
"github.com/naoina/toml"
"github.com/naoina/toml/ast"
)
INFO:kolla.image.build:Found the docker image folder at /usr/local/share/kolla/docker
INFO:kolla.image.build:Added image base to queue
INFO:kolla.image.build:Attempting to run task BuildTask(base) for the first time
INFO:kolla.image.build.base:Building
INFO:kolla.image.build.base:Step 1 : FROM centos:7
INFO:kolla.image.build.base: ---> 0584b3d2cf6d
INFO:kolla.image.build.base:Step 2 : MAINTAINER Kolla Project (https://launchpad.net/kolla)
INFO:kolla.image.build.base: ---> Using cache
INFO:kolla.image.build.base: ---> db501f862216
INFO:kolla.image.build.base:Step 3 : LABEL kolla_version "3.0.1"
Warnings: 'data' is an invalid keyword argument for 'event.wait'. If you
were trying to pass additional data to be used in a template
context, please populate 'context' with 'key: value' pairs. Your
approach will work until Salt Carbon is out. Please update your
state files.
@danilochilene
danilochilene / write_metrics.py
Created December 1, 2015 20:31
Write data to InfluxDB
from influxdb import InfluxDBClient
import random
from time import sleep
import sys
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'metrics')
x = 0
while True: