Skip to content

Instantly share code, notes, and snippets.

@goulon
goulon / provision.sh
Last active April 11, 2016 13:35
Provisioning script for devstack creation
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y ubuntu-cloud-keyring
cp /vagrant/cloud_archive_liberty.list /etc/apt/sources.list.d/
apt-get update
apt-get upgrade -y
apt-get install -y apt-file apache2 bpython bridge-utils curl dhcpdump dnsmasq-base dnsmasq-utils ebtables euca2ools gawk gcc genisoimage git gir1.2-gnomekeyring-1.0 htop iftop iptables iputils-arping iputils-ping ipython kpartx libffi-dev libjs-jquery-tablesorter libldap2-dev libmysqlclient-dev libpq-dev libsasl2-dev libvirt-dev libxml2-dev libxml2-utils libxslt1-dev locate lsof lvm2 memcached mongodb-clients mongodb-server msgpack-python nbd-client nodejs open-iscsi open-iscsi-utils openssh-server openssl openvpn parted psmisc pylint python-boto python-carrot python-cheetah python-cmd2 python-configobj python-coverage python-dateutil python-dev python-eventlet python-feedparser python-gflags python-greenlet python-iso8601 python-kombu python-libvirt python-libxml2 python-lockfile python-lxml python-m
@goulon
goulon / local.conf
Last active April 11, 2016 13:34
Devstack configuration file
# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
# NOTE: Copy this file to the root ``devstack`` directory for it to
# work properly.
# ``local.conf`` is a user-maintained setings file that is sourced from ``stackrc``.
# This gives it the ability to override any variables set in ``stackrc``.
# Also, most of the settings in ``stack.sh`` are written to only be set if no
# value has already been set; this lets ``local.conf`` effectively override the
# default values.
@goulon
goulon / initrc
Created April 8, 2016 10:01
OS variable initiliazation file
export OS_USERNAME=demo
export OS_TENANT_NAME=demo
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0
export OS_PASSWORD=password
@goulon
goulon / Vagrantfile
Last active April 11, 2016 13:34
Vagrant flavored configuration file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@goulon
goulon / cloud_archive_liberty.list
Created April 8, 2016 15:25
OpenStack Liberty archives
deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main
@goulon
goulon / localrc
Created May 11, 2016 15:53
Configuration file for devstack installation. To include in the devstack repository.
# Misc
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password
# Enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
#!/bin/bash
ctrl_value=0
exit_control=0
repetitions=${repetitions:=5}
warn=${WARN:=0.8}
crit=${CRIT:=1}
# Define qual vai ser o valor da saída (armazena o maior valor)
set_exit_control () {
#!/bin/bash
while getopts 'w:c:' OPT; do
case $OPT in
w) WARN=$OPTARG;;
c) CRIT=$OPTARG;;
esac
done
WARN=${WARN:=0.8}
#!/bin/bash
while getopts 'w:c:' OPT; do
case $OPT in
w) WARN=$OPTARG;;
c) CRIT=$OPTARG;;
esac
done
WARN=${WARN:=90}
#!/bin/bash
while getopts 'w:c:' OPT; do
case $OPT in
w) WARN=$OPTARG;;
c) CRIT=$OPTARG;;
esac
done
WARN=${WARN:=90}