Skip to content

Commit

Permalink
Merge pull request saltstack-formulas#50 from andrew-vant/rsprov
Browse files Browse the repository at this point in the history
Added salt-cloud support for Rackspace OpenStack servers.
  • Loading branch information
gravyboat committed Oct 4, 2014
2 parents 4702e77 + 970da0e commit 095c6a8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ salt:
aws_secret: AWSSECRETYkkDY1iQf9zRtl9+pW+Nm+aZY95
gce_project: test
gce_service_account_email_address: [email protected]
rsos_user: afeawofghob
rsos_tenant: tenant_id_number
rsos_apikey: WFJIOJEOIGHSOFHESO
rsos_regions:
- ORD
- DFW
- IAD
- SYD
- HKG

salt_cloud_certs:
aws:
pem: |
Expand Down
2 changes: 2 additions & 0 deletions salt/files/cloud.maps.d/rsos.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file managed by Salt, do not edit by hand!!

7 changes: 7 additions & 0 deletions salt/files/cloud.profiles.d/rsos.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file managed by Salt, do not edit by hand!!
{% for region in salt['pillar.get']('salt:cloud:rsos_regions', []) %}
base_ubuntu_rsos_{{ region|lower }}:
image: Ubuntu 14.04 LTS (Trusty Tahr)
provider: rsos_{{ region|lower }}
size: 512MB Standard Instance
{% endfor %}
22 changes: 22 additions & 0 deletions salt/files/cloud.providers.d/rsos.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file managed by Salt, do not edit by hand!!
# Providers for openstack-based Rackspace cloud servers.

{% set salt = pillar.get('salt', {}) -%}
{% set cloud = salt.get('cloud', {}) -%}
{% for region in cloud.get('rsos_regions', []) %}

rsos_{{ region|lower }}:
minion:
master: {{ cloud['master'] }}
grains:
region: {{ region|lower }}

identity_url: 'https://identity.api.rackspacecloud.com/v2.0/tokens'
compute_name: cloudServersOpenStack
protocol: ipv4
compute_region: {{ region }}
provider: openstack
user: {{ cloud['rsos_user'] }}
tenant: {{ cloud['rsos_tenant'] }}
apikey: {{ cloud['rsos_apikey'] }}
{% endfor %}

0 comments on commit 095c6a8

Please sign in to comment.