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
<?php | |
/********************************************************************** | |
Mikoomi MIT License | |
********************************************************************** | |
Copyright (c) 2011 by Jayesh Thakrar | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
manifests/site.pp: | |
import "classes/*.pp" | |
import "nodes/*.pp" | |
manifests/classes/base.pp | |
class base { | |
$role = regsubst($ec2_userdata, '.*role=(.*).*', '\1') | |
notify {"the role is: ${role}": } | |
Class['baseapps']<-Class['admin_users'] |
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
$ulimit = $::hostname ? { | |
boxtypeA => "10000", | |
boxtypeB => "20000", | |
default => "1024", | |
} |
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
-- mongod.py --- | |
@task | |
def rolling_upgrade(): | |
""" Rolling upgrade of mongodb """ | |
execute(puppet.puppetd_test) | |
--- puppet.py --- |
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
@task | |
def rolling_upgrade(hostname): | |
""" Rolling upgrade of mongodb """ | |
users.root() | |
conn = Connection('%s'%(hostname)) | |
db = conn.admin | |
replSet = db.command("replSetGetStatus") | |
for secondary in replSet['members']: | |
stateStr = str(secondary['stateStr']) | |
host = str(secondary['name']) |
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
@task | |
def test(stable_pkgs_url): | |
run('echo "export PACKAGESITE=\'%s\'" >> ~/.zshenv' %(stable_pkgs_url)) |
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
@task | |
def rolling_upgrade(hostname): | |
""" Rolling upgrade of mongodb """ | |
users.root() | |
## Make initial connection to determine which member is the primary node | |
conn = Connection('%s'%(hostname)) | |
db = conn.local | |
isMaster = db.command("isMaster") | |
primary = (isMaster['primary']) | |
primary = primary.replace(":27017","") |
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
from fabric.api import * | |
from fabric.operations import local,put | |
import paramiko | |
import socket | |
import subprocess | |
import os | |
import mongod | |
import puppet | |
def _is_host_up(host, port): |
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
from fabric.api import * | |
from fabric.operations import local,put | |
from fabric.colors import * | |
from pymongo import * | |
import sys | |
import difflib | |
import paramiko | |
import socket | |
import subprocess | |
import os |
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
from fabric.api import * | |
from fabric.operations import local,put | |
import paramiko | |
import socket | |
import subprocess | |
import os | |
@task | |
# @parallel | |
def puppetd_test(): |
OlderNewer