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
#https://boto3.readthedocs.org/en/latest/reference/services/cloudwatch.html | |
import boto3 | |
client = boto3.client('cloudwatch') | |
r2=client.get_metric_statistics(Namespace='AWS/EC2', MetricName='CPUUtilization',Statistics=['SampleCount'],StartTime=datetime(2015, 7, 19), EndTime=datetime(2015, 7, 20), Period=120, Dimensions=[{'Name': 'InstanceId', 'Value': 'i-6a469f90'}]) | |
runs=[] | |
for status in ec2.meta.client.describe_instance_status()['InstanceStatuses']: | |
runs.append(status) |
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
### after running this, manually update the Name tag and assign EIP. Run the bbin.yml playbook | |
- hosts: localhost | |
name: Provision kyoto | |
connection: local | |
gather_facts: False | |
vars: | |
- ami_id: ami-6bceb41c # with 1x500GB EBS | |
- key_name: operations |
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: localhost | |
name: Provision play | |
connection: local | |
gather_facts: False | |
vars: | |
- ami_id: ami-78fc7410 | |
- key_name: operations | |
- username: jameswong | |
tasks: | |
- name: Provision a set of 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
bash-3.2$ . .amb && amb-deploy-cluster | |
starting an ambari cluster with: 3 nodes | |
[DEBUG] docker run -d --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN= --name amb0 -h amb0.mycorp.kom sequenceiq/ambari --tag ambari-server=true | |
2ee6cc6983649f442e68966a9275669460b4ca7c96a9a1c850609f9878069899 | |
[DEBUG] docker run -d -e SERF_JOIN_IP=172.17.0.18 --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN= --name amb1 -h amb1.mycorp.kom sequenceiq/ambari --log-level debug | |
ebf5b14c05ff44eb3b4c426b40f5d7221a50cd09bc5104eecc65afb4a9d93f51 | |
[DEBUG] docker run -d -e SERF_JOIN_IP=172.17.0.18 --dns 127.0.0.1 --entrypoint /usr/local/serf/bin/start-serf-agent.sh -e KEYCHAIN= --name amb2 -h amb2.mycorp.kom sequenceiq/ambari --log-level debug | |
cb189ec23808fe782c5aa2244bd5ea9d74f7abb6c42bd63e1cb2969149d596cb | |
[DEBUG] docker run -it --rm -e EXPECTED_HOST_COUNT=3 -e BLUEPRINT=multi-node-hdfs-yarn --link amb0:ambariserver --entrypoint /bin/sh sequenceiq/ambari -c /tmp/install-cluste |
NewerOlder