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
for rpm in `curl http://pkgs.repoforge.org/git/ | grep CentOS | grep '1.7.11.3' | grep el6 | grep x86_64 | cut -d ' ' -f 8 | sed 's/href="//g' | sed 's/".*//g' ` ; do wget http://pkgs.repoforge.org/git/$rpm ; | |
done |
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
# | |
# Setup python 2.7 in addition to 2.6.6 on CentOS 6 | |
# | |
# prerequisites repos | |
sudo yum groupinstall "Development tools" -y | |
sudo yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel mysql-devel -y | |
#python sources | |
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz | |
tar xf Python-2.7.6.tar.xz |
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 bash | |
# gets the list of DBs | |
$DBS = psql -h /var/lib/eucalyptus/db/data -p 8777 -l | awk '{print $1}' | grep euca | |
#creates the dumps | |
for db in $DBS ; do pg_dump -c -o -h /var/lib/eucalyptus/db/data -p 8777 -U root $db > $db-`date +%Y-%m-%d_%Hh%M`.sql ; done | |
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
for i in `curl $URL | grep $VERSION | sed 's/rpm.*/rpm/g' | cut -d = -f 5 | sed 's/\"//g'` ; do echo $i && curl -O $URL/$i ; done |
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
{ | |
"InstanceDnsDomain": "eucalyptus.internal", | |
"InstanceDnsServers": [ | |
"10.1.1.254" | |
], | |
"PublicIps": [ | |
"10.104.6.1-10.104.6.62" | |
], | |
"Subnets": [], | |
"Clusters": [ |
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
prefix => (?:\d{1,2}|)$ | |
IP _> \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ |
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
68 pg_dumpall --oids -c -h/var/lib/eucalyptus/db/data -p8777 -Uroot -f~/eucalyptus_pg_dumpall-backup.sql | |
69 ll | |
70 pg_dumpall --oids -c -h/var/lib/eucalyptus/db/data -p8777 -Uroot -f ~/eucalyptus_pg_dumpall-backup.sql | |
71 tar -czvf ~/eucalyptus-keydir.tgz /var/lib/eucalyptus/keys | |
72 /etc/init.d/eucalyptus-cloud stop | |
73 ll | |
74 rm -rf /var/lib/eucalyptus/db | |
75 euca_conf --initialize | |
76 su eucalyptus -c "/usr/pgsql-9.1/bin/pg_ctl start -w -s -D/var/lib/eucalyptus/db/data -o '-h0.0.0.0/0 -p8777 -i'" | |
77 psql -U root -d postgres -p 8777 -h /var/lib/eucalyptus/db/data -f ~/eucalyptus_pg_dumpall-backup.sql |
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
{ | |
"ldap-service":{ | |
"server-url":"ldap://192.168.91.43:389", | |
"auth-method":"simple", | |
"user-auth-method":"simple", | |
"auth-principal":"cn=rodc,cn=Users,dc=eucalyptus,dc=lan", | |
"auth-credentials":"{{ encrypted password }}", | |
"use-ssl":"false", |
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 bash | |
# | |
# This must be used with care and only knowing what you are doing. | |
# Eucalyptus cant be taken reponsible for bad usage of this script | |
# | |
NEWTYPE=$1 | |
INSTANCE=$2 |
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
# Run instances in AZs | |
for i in 1 2 3 4 ; do for j in 1 2 3 4 ; do euca-run-instances -z az_$i -n 60 -k key emi-ID -d Hello ;done done ;date | |
# Gets connected to every instances using the public address | |
for i in `euca-describe-instances verbose | grep INST | awk '{print $13}'`; do ssh -i /root/.euca/admintest.pem -o UserKnownHostsFile=/dev/null $i -o StrictHostKeyChecking=no curl -s 169.254.169.254/latest/user-data 2>/dev/null; echo ; done | wc -l | |
# gets information from NC about the IP and instances state | |
ansible nc -m shell -a 'echo -n "N*eucanted processes:"; ps faux | grep eucanetd| grep \/\/ | wc -l ; echo -n "PUB IPs :" ; ip addr sh eth0 | grep inet | grep -v inet6| wc -l; echo -n "N* VNET : "; ifconfig | grep vnet | wc -l ; echo -n "InstanceRunning :"; virsh list | grep i- | wc -l' > ips_instances_proc_`date +%Y-%m-%d_%H-%M`.log | |
# makes sure that the meta-data rule is set on NCs |
OlderNewer