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/python | |
# | |
# generate_report.py | |
# Command-line utility to generate reports | |
# | |
import sys | |
import time | |
import subprocess |
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/sh | |
# | |
# Copyright (C) 2011 Eucalyptus Systems, Inc. | |
# | |
# Copies an EMI from one Eucalyptus cloud to another. | |
# | |
# This script takes several input parameters: | |
# | |
# -s <path to the source cloud eucarc> | |
# -d <path to the destination cloud eucarc> |
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
import boto | |
euca = boto.connect_euca(host='xxx', aws_access_key_id='xxx', | |
aws_secret_access_key='xxx', debug=0) | |
api_version = '2010-08-31' | |
euca.APIVersion = api_version | |
print euca.get_all_instances() |
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
tgerla-mbp-13:eucalyptus tgerla$ git diff | |
diff --git a/clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java b/clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java | |
index e3ffa89..0c8ba5e 100644 | |
--- a/clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java | |
+++ b/clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java | |
@@ -163,7 +163,7 @@ public class Bundles { | |
public static VmBundleTask create( VmInstance v, String bucket, String prefix, String policy ) throws AuthException { | |
verifyPolicy( policy, bucket ); | |
- verifyBucket( bucket ); |
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
{ | |
"Statement": [ | |
{ | |
"Sid": "Stmt1347556945699", | |
"Action": "*", | |
"Effect": "Allow", | |
"Resource": "*" | |
} | |
] | |
} |
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
attach_volume () { | |
volId=$1 | |
grep vd[a-z]$ /proc/partitions | awk "{print \$4;}" > /tmp/before | |
sleep 2 | |
# attach the volume | |
echo "Attaching $volId to $instanceId" | |
euca-attach-volume -i $instanceId $volId -d /dev/vdc |
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
--- | |
- name: networking test | |
hosts: linux1 | |
tasks: | |
- name: Ensure repository host entries exist | |
lineinfile: dest=/etc/hosts regexp="$item" line="$item" state=present | |
with_items: | |
- "192.168.0.1 test.server1" | |
- "192.168.0.2 test.server2" |
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
# a simple playbook to check out a git repository locally and push it to a target | |
# system using rsync. this avoids the requirement of the git client on the remote | |
# system, or having the remote system directly access the repo. | |
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
tasks: | |
- name: check out the repository | |
# might want to use /opt/webapp instead of /tmp -- it's safe to keep the contents |
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
--- | |
- hosts: all | |
tasks: | |
- name: hello | |
debug: msg="system $inventory_hostname hello world ${ansible_selinux.config_mode}" | |
when_string: "${ansible_selinux.config_mode} == 'enforcing'" |
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 playbook deploys the whole application stack in this site. | |
# apply common configuration to all hosts | |
- hosts: all | |
roles: | |
- common | |
- hosts: dbservers | |
user: root |
OlderNewer