Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gambol99/rundeck-openstack
A node resource for Rundeck - pulling the instance from one or more openstack clusters
https://github.com/gambol99/rundeck-openstack
Last synced: 25 days ago
JSON representation
A node resource for Rundeck - pulling the instance from one or more openstack clusters
- Host: GitHub
- URL: https://github.com/gambol99/rundeck-openstack
- Owner: gambol99
- Created: 2014-06-06T17:25:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-29T17:00:01.000Z (over 10 years ago)
- Last Synced: 2024-04-17T15:10:31.551Z (9 months ago)
- Language: Ruby
- Size: 203 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[Deprecated - using rundeck-nodes instead]
RunDesk Openstack
=================The gem is a small integretion piece between Rundeck and Openstack. The gem is used to pull and generate a node resource file from one or more openstack clusters
An example use
require 'rundeck-openstack'
options = {
:config => './config.yaml', # the location of the configuration file
:template => './my_custom_template', # if you wish to override the default template
}
deck = RunDeckOpenstack.load( options )
# step: perform a classify
puts deck.classify
An example configuration
---
openstack:
- name: qa
username: admin
tenant: admin
api_key: xxxxxxx
auth_url: http://horizon.qa.xxxxx.com:5000/v2.0/tokens
- name: prod
username: admin
tenant: admin
api_key: xxxxxxx
auth_url: http://horizon.prod.xxxxx.com:5000/v2.0/tokens
tags:
'.*':
- openstack
'^wiki.*':
- web
- web_server
'^qa[0-9]{3}-[a-z0-9]{3}':
- qa_server
- web
templates:
- name: resourceyaml
template: |
---
<<% @nodes.each do |node| %>
<%= node['hostname'] %>:
hostname: <%= node['hostname'] %>
nodename: <%= node['hostname'].split('.').first %>
tags: '<%= node['tags'].concat( [ node['cluster'] ] ).join(', ') %>'
username: rundeck
<% node.each_pair do |k,v| -%>
<%- next if k =~ /^(hostname|tags)$/ -%>
<%= k %>: <%= v %>
<% end -%>
<% end -%>Tags
----Tags simply provide a means of adding custom tags for rundeck to filter upon; The hostname is regexed and any node that matches inhierits those tags - alternative we can pull the tags from the openstack metadata
tags:
'.*':
- openstack
'^wiki.*':
- web
- web_server
'^qa[0-9]{3}-[a-z0-9]{3}':
- qa_server
- web