Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
@viglesiasce
viglesiasce / scale-init.sh
Last active August 29, 2015 14:03
Scale System Init Script
#!/bin/bash
#
# configure vlan for Private VM network
#
IP=`ifconfig em1 | grep "inet " | awk '{ print $2 }' | awk '{sub("addr:","")}1'`
Octet3=`echo $IP | cut -d"." -f3`
Octet4=`echo $IP | cut -d"." -f4`
NewOctet3=$((Octet3 + 100))
IPADDR="172.16".$Octet3"."$Octet4
# Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above
#### Install Info
default["eucalyptus"]["install-type"] = "packages"
### Package repo info
default["eucalyptus"]["eucalyptus-repo"] = "http://downloads.eucalyptus.com/software/eucalyptus/4.0/centos/6/x86_64/"
default["eucalyptus"]["euca2ools-repo"] = "http://downloads.eucalyptus.com/software/euca2ools/3.1/centos/6/x86_64/"
default["eucalyptus"]["enterprise-repo"] = ""
default["eucalyptus"]["eucalyptus-gpg-key"] = "http://www.eucalyptus.com/sites/all/files/c1240596-eucalyptus-release-key.pub"
default["eucalyptus"]["euca2ools-gpg-key"] = "http://www.eucalyptus.com/sites/all/files/c1240596-eucalyptus-release-key.pub"
default["eucalyptus"]["epel-rpm"] = "http://downloads.eucalyptus.com/software/eucalyptus/3.4/centos/6/x86_64/epel-release-6.noarch.rpm"
service 'apache2' do
action :restart
not_if 'echo `uptime | awk '{print $9}'`'>30'| bc'
end
#!/bin/bash
###################################################################################################################################
# This script installs Motherbrain and Chef-zero on the sane machine and creates ~/.mb/config.json and ~/chef-repo/.chef/knife.rb
# configuration files
#
#
###################################################################################################################################
if rpm -q chefdk; then
echo "Chef DK already installed"
@viglesiasce
viglesiasce / qa-init.sh
Created August 26, 2014 21:44
qa-init.sh
#!/bin/bash
#
# Script to add the git server ssh fingerprint key to the local system.
#
keyid='git.eucalyptus-systems.com,10.115.1.204 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA30Tu5JVIN9CikZh/4B0SUkgAZZh/2rVDb1hcijYmNUX85EdGRb8iwOoj3rKP7i56Hm3IB/zNRDi9biFb1mTxnmI4stGoHVRPe1M1B/D8ZEMP7XScAp0kqwWycxRnzXWqbNw5eoE8FzdmEhCuWdVVRsQea3NnCzaSHg013l1suLqCoDsHdszV8Fdj7QJ0UtpFc1KKaDg93mlTde7aop7nnJwhe3eZkw+9amhilAQl7kuWo/+f8cQ7w14ozYp9sgUJikD8m/V0pG9g81FUnwrKpJXuDmaJLBTFTSOGB+vbVQQTQciT3aplpBhl7Mx069gSEmYU4akqrO2S9s9pLKeotw=='
keyfile="$HOME/.ssh/known_hosts"
check_key=`grep -c "$keyid" $keyfile`
@viglesiasce
viglesiasce / grafana_config.js
Last active August 29, 2015 14:08
grafana_config.js
define(['settings'],
function (Settings) {
return new Settings({
datasources: {
influxdb: {
type: 'influxdb',
url: "http://localhost:8086/db/locust",
username: 'admin',
password: 'admin',
default: true
@viglesiasce
viglesiasce / grafana-locust.json
Last active August 29, 2015 14:08
grafana-locust.json
{
"id": null,
"title": "Locust",
"originalTitle": "Locust",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"rows": [
#cloud-config
---
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
# uncomment the following line and replace it with your discovery URL
discovery: https://discovery.etcd.io/5a402422ecc26c3f515ce6bc2bee398b
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
# give etcd more time if it's under heavy load - prevent leader election thrashing
input {
syslog { }
}
output {
stdout {
codec => rubydebug
}
elasticsearch {