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
# Successful request output | |
trellis@debian:~/rackspace-cloud-env$ python get-ip.py | |
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): lon.servers.api.rackspacecloud.com | |
DEBUG:requests.packages.urllib3.connectionpool:"GET /v2/xxxxx/servers/detail HTTP/1.1" 200 1643 | |
Name: xxxx | |
ID: xxxx | |
Public IP: 1.2.3.4 | |
# Unsuccessful request output |
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: Launch a server in rax cloud # playbook name | |
hosts: local # target local host | |
connection: local # run actions locally | |
gather_facts: false # forget gathering facts, this is our local system | |
tasks: | |
- name: Create a server # task name | |
local_action: | |
module: rax # module to use | |
creds_file: /home/trellis/creds # path to your credentials |
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 os | |
import logging | |
import sys | |
import pyrax | |
import pyrax.exceptions as exc | |
logging.basicConfig(level=logging.DEBUG) |
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 python | |
import os | |
import sys | |
import logging | |
import pyrax | |
import pyrax.exceptions as exc | |
import exceptions |
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 hmac | |
from hashlib import sha1 | |
from time import time | |
path = 'v1/MossoCloudFS_db3a5ebc-f7dd-4108-ab6e-a0bc7b3fbc93/test' | |
redirect = 'http://mysite.com/thanks.html' | |
max_file_size = 104857600 | |
max_file_count = 10 | |
expires = int(time() + 600) | |
print "expires: " |
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 hmac | |
from hashlib import sha1 | |
from time import time | |
path = '/v1/MossoCloudFS_XXXXXXXX/test' | |
redirect = 'done.html' | |
max_file_size = 104857600 | |
max_file_count = 10 | |
#expires = int(time() + 600) | |
expires = 1590835786 |
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
<html> | |
<form action="https://storage101.lon3.clouddrive.com/v1/MossoCloudFS_XXXXXXX/test" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name="redirect" value="done.htmlm" /> | |
<input type="hidden" name="max_file_size" value="104857600" /> | |
<input type="hidden" name="max_file_count" value="10" /> | |
<input type="hidden" name="expires" value="1590835786" /> | |
<input type="hidden" name="signature" value="XXXXX" /> | |
<input type="file" name="file1" /><br /> | |
<input type="submit" /> | |
</html> |
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
<html> | |
<form action="https://storage101.lon3.clouddrive.com/v1/MossoCloudFS_XXXXXXX/test" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name="redirect" value="done.html" /> | |
<input type="hidden" name="max_file_size" value="104857600" /> | |
<input type="hidden" name="max_file_count" value="10" /> | |
<input type="hidden" name="expires" value="1590835786" /> | |
<input type="hidden" name="signature" value="XXXXX" /> | |
<input type="file" name="file1" /><br /> | |
<input type="submit" /> | |
</html> |
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": "grizzly", | |
"description": "", | |
"cookbook_versions": { | |
}, | |
"json_class": "Chef::Environment", | |
"chef_type": "environment", | |
"default_attributes": { | |
}, | |
"override_attributes": { |
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/bash | |
for region in `aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]'`; do | |
aws ec2 describe-reserved-instances-offerings --region $region --output text --query 'ReservedInstancesOfferings[*].[AvailabilityZone,ReservedInstancesOfferingId]' --offering-type 'No Upfront' --instance-tenancy default --no-include-marketplace --instance-type m4.large --max-duration 31536000 --offering-class standard --product-description Linux/UNIX | grep -v 'None' | sort -n | |
done |