Resource definitions in YAML
Reported by Alex-SF | January 14th, 2011 @ 12:04 PM | in Rundeck 1.2
Resource (Nodes) should be defined in YAML for better readability and manipulation through mainstream sysadmin tools.
Hypothetical node definitions
#
Multi line format
strongbad:
type: Node
description: "Rundeck server node"
hostname: "strongbad"
osArch: "x86_64"
osFamily: "unix"
osName: "Mac OS X"
osVersion: "10.6.5"
username: "alexh"
editUrl: ""
remoteUrl: ""
tags: "rundeck"
-or -
#
single line format
ubuntu: {description: "Ubuntu server node", hostname: "192.168.1.101", osFamily: "unix", osName: "Linux", username: "demo", tags: "dev"}
Comments and changes to this ticket
-
Greg Schueler January 20th, 2011 @ 11:40 AM
- Assigned user set to Greg Schueler
question: should the node name only be specified via the top level map's key? if so, should a "nodename" value in the node data be ignored?
-
Deleted User January 20th, 2011 @ 11:51 AM
I think it should. I don't know if we have plans for a lint checker, but that would be a good rule to add to resource lint.
-
Greg Schueler January 20th, 2011 @ 12:03 PM
an alternate format would be like this: https://gist.github.com/27b46f8fd8cd67750d8e
so the nodename is a data element in the map, and nodes are just maps in a sequence
-
Greg Schueler January 20th, 2011 @ 01:17 PM
sequence based in flow mode would be like this:
[{nodename: x, hostname, y}, {nodename: z, hostname, w} .. ]
as opposed to map based:
{ x: {hostname:y}, z: {hostname:w}}
it is more compact in that mode.
-
Deleted User January 20th, 2011 @ 01:30 PM
Ah...how about this, lets say I have a list of IP address. 10.168.0.1, 10.168.0.2, 10.168.0.3.
What if instead of making the nodename the map name, we made it the hostname.
Then converting a list would be as easy as:
- 10.168.0.1 - 10.168.0.2 - 10.168.0.3
(Easily append the '- ' with
sed -i -e '/^/- /' filelist.txt
)And adding metadata would be:
- 10.168.0.1: {nodename: foobar} - 10.168.0.2: {nodename: barbaz} - 10.168.0.3: {nodename: bazfoo}
Just a thought.
-
Greg Schueler January 20th, 2011 @ 02:07 PM
hmm I see the utility. Even ideally you could just do
- 10.168.0.1 - 10.168.0.2
and have it be valid. i suppose using hostname as default for the node name
(and vice-versa?) is useful.but it makes the data structure awkward: a sequence of maps of maps. in
block mode it seems more awkward:- 10.168.0.1: nodename: blah username: x
sequence of name based maps is a little better, but not as easy to get from
just hostnames:name1: { hostname: 10.168.0.1 } name2: { hostname: 10.168.0.2 }
I will push what I have (original requested format) to dev and we can play
with it -
Greg Schueler January 20th, 2011 @ 05:05 PM
pushed initial version. this supports the nodename keyed map, as well as a sequence of maps (for comparison).
to use, modify project.properties and change the project.resources.file to use a ".yaml" extension
e.g.
project.resources.file = /Users/greg/rundeck11/projects/test/etc/resources.yaml
-
Greg Schueler January 21st, 2011 @ 03:03 PM
- State changed from new to open
-
Deleted User January 31st, 2011 @ 05:45 PM
(from [e8f857208bd195e7a30ecc9de8c87d06fb4c0049]) Support editUrl/remoteUrl in nodes YAML format [#173] https://github.com/dtolabs/rundeck/commit/e8f857208bd195e7a30ecc9de...
-
Greg Schueler February 25th, 2011 @ 11:15 AM
- State changed from open to resolved
- Milestone order changed from 15 to 0
-
victorpatrick December 13th, 2023 @ 12:36 AM
pushed the first iteration. This Retro Bowl supports a series of maps (for comparison) and the nodename keyed map.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues
People watching this ticket
Referenced by
- 173 Resource definitions in YAML (from [0ddf634ab5d74271d42e1e3982f0fcf3b7be8ede]) Initial...
- 187 Document jobs/resources yaml formats The job/resources YAML formats need documentation. ref: #...
- 173 Resource definitions in YAML (from [e8f857208bd195e7a30ecc9de8c87d06fb4c0049]) Support...