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
(rackspace)nick@mbp: ~/ansible-rackspace-servers$ ansible-playbook -i venv-inventory.yml build-cloud-server.yml | |
PLAY [Create a Rackspace Cloud Server] **************************************** | |
TASK: [Rackspace cloud server build request] ********************************** | |
ok: [localhost -> 127.0.0.1] | |
TASK: [Add new cloud server to host group] ************************************ | |
ok: [localhost -> 127.0.0.1] => (item={u'status': u'ACTIVE', u'rax_name': u'admin.enhancedtest.net', u'rax_metadata': {}, u'rax_progress': 100, u'rax_os-dcf_diskconfig': u'MANUAL', u'rax_human_id': u'adminenhancedtestnet', u'rax_addresses': {u'public': [{u'version': 6, u'addr': u'2001:4800:7818:104:be76:4eff:fe05:3c58'}, {u'version': 4, u'addr': u'104.130.158.89'}], u'private': [{u'version': 4, u'addr': u'10.209.36.188'}]}, u'rax_image': {u'id': u'0766e5df-d60a-4100-ae8c-07f27ec0148f', u'links': [{u'href': u'https://dfw.servers.api.rackspacecloud.com/HIDDEN/images/0766e5df-d60a-4100-ae8c-07f27ec0148f', u'rel': u'bookmark'}]}, u'rax_ |
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
PLAY [Create a Rackspace Cloud Server] **************************************** | |
TASK: [Rackspace cloud server build request] ********************************** | |
ok: [localhost -> 127.0.0.1] | |
TASK: [Add new cloud server to host group] ************************************ | |
ok: [localhost -> 127.0.0.1] => (item={u'status': u'ACTIVE', u'rax_name': u'admin.enhancedtest.net', u'rax_metadata': {}, u'rax_progress': 100, u'rax_os-dcf_diskconfig': u'MANUAL', u'rax_human_id': u'adminenhancedtestnet', u'rax_addresses': {u'public': [{u'version': 6, u'addr': u'2001:4800:7818:104:be76:4eff:fe05:3c58'}, {u'version': 4, u'addr': u'104.130.158.89'}], u'private': [{u'version': 4, u'addr': u'10.209.36.188'}]}, u'rax_image': {u'id': u'0766e5df-d60a-4100-ae8c-07f27ec0148f', u'links': [{u'href': u'https://dfw.servers.api.rackspacecloud.com/HIDDEN/images/0766e5df-d60a-4100-ae8c-07f27ec0148f', u'rel': u'bookmark'}]}, u'rax_user_id': u'HIDDEN', u'rax_links': [{u'href': u'https://dfw.servers.api.rackspacecloud.com/v2/HIDDEN/servers/0221 |
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
PLAY [Create a Rackspace Cloud Server] **************************************** | |
TASK: [Rackspace cloud server build request] ********************************** | |
ok: [localhost -> 127.0.0.1] | |
TASK: [Add new cloud server to host group] ************************************ | |
ok: [localhost -> 127.0.0.1] => (item={u'status': u'ACTIVE', u'rax_name': u'admin.enhancedtest.net', u'rax_metadata': {}, u'rax_progress': 100, u'rax_os-dcf_diskconfig': u'MANUAL', u'rax_human_id': u'adminenhancedtestnet', u'rax_addresses': {u'public': [{u'version': 6, u'addr': u'2001:4800:7818:104:be76:4eff:fe05:3c58'}, {u'version': 4, u'addr': u'104.130.158.89'}], u'private': [{u'version': 4, u'addr': u'10.209.36.188'}]}, u'rax_image': {u'id': u'0766e5df-d60a-4100-ae8c-07f27ec0148f', u'links': [{u'href': u'https://dfw.servers.api.rackspacecloud.com/HIDDEN/images/0766e5df-d60a-4100-ae8c-07f27ec0148f', u'rel': u'bookmark'}]}, u'rax_user_id': u'HIDDEN', u'rax_links': [{u'href': u'https://dfw.servers.api.rackspacecloud.com/v2/HIDDEN/servers/0221 |
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
(rackspace)nick@mbp: ~/ansible-rackspace-servers$ ansible-playbook -i virtualenv-inventory.yml build-cloud-server.yml -vvvv | |
PLAY [Create a Rackspace Cloud Server] **************************************** | |
TASK: [Rackspace cloud server build request] ********************************** | |
<127.0.0.1> REMOTE_MODULE rax flavor=performance1-1 credentials=/Users/nick/.rackspace_cloud_credentials image=0766e5df-d60a-4100-ae8c-07f27ec0148f state=present region=DFW name=admin.enhancedtest.net | |
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1420388644.87-43356630392997 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1420388644.87-43356630392997 && echo $HOME/.ansible/tmp/ansible-tmp-1420388644.87-43356630392997'] | |
<127.0.0.1> PUT /var/folders/rk/mr3kdp7s0xndgkd8p20_wdkc0000gn/T/tmpXID16W TO /Users/nick/.ansible/tmp/ansible-tmp-1420388644.87-43356630392997/rax | |
<127.0.0.1> EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /Users/nick/virtualenvs/rackspace/bin/python /Users/nick/.ansible |
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
(rackspace_cloud)nick@mbp: ~/virtualenvs$ pip install ansible | |
Downloading/unpacking ansible | |
Downloading ansible-1.8.2.tar.gz (754kB): 754kB downloaded | |
Running setup.py (path:/Users/nick/virtualenvs/rackspace_cloud/build/ansible/setup.py) egg_info for package ansible | |
no previously-included directories found matching 'lib/ansible/modules/core/.git' | |
no previously-included directories found matching 'lib/ansible/modules/extras/.git' | |
Downloading/unpacking paramiko (from ansible) | |
Downloading paramiko-1.15.2-py2.py3-none-any.whl (165kB): 165kB downloaded | |
Downloading/unpacking jinja2 (from ansible) |
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
(rackspace_cloud)nick@mbp: ~/virtualenvs$ pip install pyrax | |
Downloading/unpacking pyrax | |
Downloading pyrax-1.9.3-py2.py3-none-any.whl (338kB): 338kB downloaded | |
Downloading/unpacking six>=1.5.2 (from pyrax) | |
Downloading six-1.9.0-py2.py3-none-any.whl | |
Downloading/unpacking requests>=2.2.1 (from pyrax) | |
Downloading requests-2.5.1-py2.py3-none-any.whl (464kB): 464kB downloaded | |
Downloading/unpacking keyring (from pyrax) | |
Downloading keyring-4.0.zip (83kB): 83kB downloaded | |
Running setup.py (path:/Users/nick/virtualenvs/rackspace_cloud/build/keyring/setup.py) egg_info for package keyring |
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 | |
import ansible.runner | |
import sys | |
# construct the ansible runner and execute on all hosts | |
results = ansible.runner.Runner( | |
host_list=['10.20.30.40'], | |
pattern='*', | |
forks=10, |
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
# my virtualenvs are in ~/virtualenvs - you may need to adjust for your environment | |
cd ~/virtualenvs | |
virtualenv pelican-sprint-test | |
cd pelican-sprint-test | |
. bin/activate | |
mkdir ~/virtualenvs/pelican-sprint-test/src | |
cd ~/virtualenvs/pelican-sprint-test/src | |
git clone https://github.com/getpelican/pelican | |
cd pelican | |
pip install -r dev_requirements.txt |
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
[customerlon] | |
NOVA_URL=https://lon.identity.api.rackspacecloud.com/v2.0/ | |
NOVA_VERSION=1.1 | |
NOVA_RAX_AUTH=1 | |
NOVA_SERVICE_NAME=cloudServersOpenStack | |
NOVA_USERNAME=Username_here | |
NOVA_PASSWORD=API_key_here | |
NOVA_PROJECT_ID=DDI_number_here | |
NOVA_REGION_NAME=LON |
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
require 'activeresource' | |
API_PASSWORD = 'API_KEY_HERE' | |
class Zone < ActiveResource::Base | |
self.site = "https://#{API_PASSWORD}@api.slicehost.com/" | |
end | |
zone = Zone.new(:origin => 'myexample483727329784397.com', :ttl => 3000) | |
zone.save |
NewerOlder