This file contains hidden or 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 python | |
| # -*- coding: utf-8 -*- | |
| from boto.exception import BotoServerError | |
| from boto.iam import IAMConnection | |
| __author__ = 'Krzysztof Szarek' | |
| class SmartIAM(IAMConnection): | |
| def create_user(self, user): |
This file contains hidden or 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 show(debug=False): | |
| """Show server list via EC2""" | |
| instances = get_instances_map(debug) | |
| sorted_instances = sorted(instances, key=lambda instance: instance['name']) | |
| print 'Instance ID Name ', | |
| print 'Public IP Private IP Flavor State', | |
| print ' Status Prev Version Current Version Next Version' | |
| for instance in sorted_instances: |
This file contains hidden or 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
| include_recipe "smart_git::pulse" | |
| include_recipe "smart_nodejs" | |
| execute "start-pulse" do | |
| action :run | |
| command "su - nodejs -c 'cd pulse && ./start.sh'" | |
| not_if "nc -w1 -zvv localhost 5555 2>/dev/null;" | |
| end | |
NewerOlder