Rundeck.org - Rundeck

Date: 05 June 2013

Server: irc.freenode.net , Channel: #rundeck

00:12:46 bensix2

Alex-SF: gschueler replied some but i was asing : so i could set project.resources.file in /etc/rundeck/project.properties and NOT set it in /var/rundeck/projects/>myproject</project.properties ?

00:13:15 bensix2

i wanted to use 1 single resource files shared by all project

00:13:29 Alex-SF

oh

00:13:36 bensix2

so using project.resources.file in /etc/rundeck/project.properties was my first guess

00:13:39 Alex-SF

hmm, i’d have to try that.

00:14:23 Alex-SF

so you want it to take precedence of course

00:14:53 bensix2

since the resource file mainly has hostname, it would make sense to share it in an env where user can all send jobs to the same list of hosts

00:15:25 Alex-SF

right. more and more, i wonder about having a common resource model for the instance

00:15:39 bensix2

i was assuming project.resources.file in /etc/rundeck/project.properties was ging to take precedence and ve the default without even having to set it in each /var/rundeck/projects/>myproject</project.properties

00:15:54 Alex-SF

yah, i’ll have to try it

00:15:55 bensix2

s/ve/be

00:15:58 bensix2

k

00:16:01 Alex-SF

doing a quick check

00:19:15 Alex-SF

well hot damn

00:20:59 Alex-SF

https://gist.github.com/ahonor/51b6e9f12de9d3892372

00:21:44 Alex-SF

so it seems to work

00:21:57 Alex-SF

the project level config, doesn’t declare it

00:22:09 Alex-SF

i commented that out (line#21)

00:22:56 Alex-SF

taking out the comment gives the project level precedence

00:23:36 Alex-SF

does this map to what you are trying to achieve?

00:34:59 bensix2

checking

00:37:24 bensix2

so the project was created without the comment ? sorry am not clear on the workflow: can we first set project.resources.file in /etc/rundeck/project.properties then create a project and it will inherit the project.resources.file from /etc/rundeck/project.properties ?

00:38:41 bensix2

meaning there will be no project.resources.file in under projects/>myproject</etc/project.properties ?

00:47:58 nat2610

looking at the api doc of rundeck, I see a bunch of reference to $RUNDECK_SERVER_URL

00:48:18 nat2610

but when I dump my environement variables in a job, I don’t see that variable set

00:48:23 nat2610

am I missing something ?

00:49:41 Alex-SF

hi nat2610, no that is just confusing documentation

00:49:58 Alex-SF

it means use the base url for that install

00:50:05 nat2610

how can I find it ?

00:50:17 nat2610

without hard coded that ?

00:50:31 Alex-SF

oh are you writing a job that needs to know it?

00:50:43 nat2610

I have a setup with multiple rundeck (1 per environement)

00:50:49 nat2610

and I’d like to reuse the same job

00:51:00 nat2610

but in order to do my api calls, I need to craft the urls

00:51:15 Alex-SF

right. one rundeck instance needs to know the url of another rundeck instance?

00:51:17 nat2610

and depending on the environement it will be a different hostname

00:51:49 nat2610

no, but I’m doing a job that deploy artifacts using dispatch

00:52:08 nat2610

and so when the script run on a given host, it needs to know where to authenticate etc..

00:52:11 nat2610

isn’t it ?

00:53:34 Alex-SF

so the script needs to know the url of the server that dispatched it?

00:55:26 Alex-SF

hi bensix2, if you create a new project, it will do the normal thing and get its own project.properties like you see today. seems like we would want a different template to be used so it references the shared/common resources.xml

00:56:10 Alex-SF

( a project.properties template )

00:56:11 bensix2

oh i see

00:56:32 Alex-SF

let me see if that is possible

00:57:12 bensix2

so i coul dsimulate by just commenting out project.resources.file in /etc/rundeck/project.properties and the project would rely on project.resources.file in /etc/rundeck/project.properties

00:57:34 Alex-SF

right. that is what i just tried

00:57:49 nat2610

Alex-SF: yes

00:58:08 Alex-SF

the rub is that for new projects, you’ll need to comment out or remove that line.

00:58:48 Alex-SF

bensix2: seems like boiler-plating project configs is what we need here

00:59:24 bensix2

ultimately to me it s the same as the ssh key path. the ui shows the default and the user can change it if need be

01:00:01 bensix2

am going to try your sygegstion now

01:00:12 Alex-SF

bensix2: good point. it should be

01:01:21 Alex-SF

nat2610: the server url isn’t in the standard set of attributes but i am going to try something.

01:07:35 Alex-SF

nat2610: i don’t know if this is a reasonable work around but there is one way to expose server config. I edited /etc/rundeck/profile and declared an env var. It then gets exposed like RDECK_BASE does now

01:08:11 nat2610

let me try

01:08:39 Alex-SF

e.g., export RD_SERVER_URL=$(awk -F= ‘/framework.server.url/ {print $2}’ $RDECK_BASE/etc/framework.properties)

01:10:47 Alex-SF

nat2610: btw, this whole topic is on my mind because i’m doing some work setting up a rundeck cluster and i need to know the addresses of each member

01:14:11 nat2610

Alex-SF: sweet it works

01:14:36 Alex-SF

cool. nat2610, feel free to log this as a feature request.

01:14:46 nat2610

I’ll do that

01:14:49 Alex-SF

i.e., expose server-url as a standard property

01:15:23 Alex-SF

but good to know that we can also bend the profile for the unanticipated global data

01:16:19 nat2610

yeah I love how flexible rundeck is

01:16:28 nat2610

it’s really an awesome product

01:16:52 Alex-SF

it does seem to bend

01:17:16 Alex-SF

i’ve got to get the docs up to snuff because these things are good to know :)

01:22:06 nat2610

should I log the feature requests in github ?

01:22:12 Alex-SF

ya

01:22:15 nat2610

oky

14:40:31 Alex-SF

ping

15:09:11 Alex-SF

x