This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(streams | |
(where (not (expired? event)) | |
;; over time windows of 3 seconds... | |
(fixed-time-window 3 | |
;; calculate the average value of the metric and emit an average (summary) event | |
(combine folds/mean | |
;; if there are no events in the window, we can get nil events | |
(where (not (nil? event)) | |
#(info "average event" %) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn tc [wndtime numwnds threshold & children] | |
(fixed-event-window wndtime | |
(combine folds/mean | |
(moving-event-window numwnds | |
(combine folds/minimum | |
(where (> metric threshold) | |
;;create a threshold crossing event | |
(with {:host nil :state "threshold crossed" :description (str "service crossed the value of " threshold " over " numwnds " windows of " wndtime " seconds")} | |
(apply sdo children))))))) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- aws-sdk-1.34.1-original/lib/aws/core/client.rb 2014-04-10 22:07:31.722036263 -0700 | |
+++ aws-sdk-1.34.1/lib/aws/core/client.rb 2014-04-10 22:10:49.538138111 -0700 | |
@@ -551,6 +551,9 @@ | |
http_request.service_ruby_name = service_ruby_name | |
http_request.host = endpoint | |
http_request.port = port | |
+ if AWS.config.respond_to?("#{service_ruby_name}_service_path") | |
+ http_request.uri = config.send(:"#{service_ruby_name}_service_path") | |
+ end | |
http_request.region = @region |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you 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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tested on Ubuntu 14.04 | |
#set -x | |
sudo lxc-create --template=debian --name=systemvm -- --release=wheezy | |
sudo lxc-start -n systemvm -d | |
sleep 2 | |
ip=$(sudo lxc-info -n systemvm -i | awk '{print $2}') | |
#start provisioning using ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'net/ssh' | |
host = '' | |
user = 'root' | |
pass = 'root' | |
options = {} | |
opt_parser = OptionParser.new do |opts| | |
opts.banner = "Usage: provision.rb IP [options]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script takes 2 json files as input. The json file describes the global configuration of a CloudStack installation | |
# To generate a json file of the configuration, use cloudmonkey: | |
# | |
# cloudmonkey -c staging.cfg | |
# > set display json | |
# > exit | |
# cloudmonkey -c production.cfg | |
# > set display json | |
# > exit | |
# cloudmonkey -c staging.cfg list configurations > staging.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying myself: My Bitcoin username is +chiradeep. https://onename.io/chiradeep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "cloudstack" { | |
api_url = "http://localhost:8080/client/api" | |
api_key = "tZTPtxAfbZfTrIiIDe4XHfZupjlCoVYy3JnIfvlqyxWvHbVJ9TDw8UWxQ_INj6r5NWGglLMYHX4hN33sMuoI1g" | |
secret_key = "9u1bizzTQrfhnp3Y_Cs-Zu9uiOr-nAmRcN5Eo6Pp8dlbeKgq_V0TqUqhDdDGgrXFqzT8yZ731UUPTPDeFKLzzQ" | |
} | |
resource "cloudstack_vpc" "default" { | |
name = "test-vpc" | |
display_text = "test-vpc" | |
cidr = "10.0.0.0/16" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "cloudstack" { | |
api_url = "http://localhost:8080/client/api" | |
api_key = "tZTPtxAfbZfTrIiIDe4XHfZupjlCoVYy3JnIfvlqyxWvHbVJ9TDw8UWxQ_INj6r5NWGglLMYHX4hN33sMuoI1g" | |
secret_key = "9u1bizzTQrfhnp3Y_Cs-Zu9uiOr-nAmRcN5Eo6Pp8dlbeKgq_V0TqUqhDdDGgrXFqzT8yZ731UUPTPDeFKLzzQ" | |
} | |
resource "cloudstack_vpc" "default" { | |
name = "test-vpc" | |
display_text = "test-vpc" | |
cidr = "10.0.0.0/16" |
OlderNewer