Is there any way(hackish or not) to get rundeck to execute tasks on a remote server that would survice a network issue etc?
If I issue a “yes” on a server, and then restart my rundeck server(it runs in a container, quick enough to bring back up :)) my yes-process obviously dies on the host.
I need yes to survice a restart of my rundeck-server.
Or network issue, or anything in between,
Im going to kick off long running processes that are not allowed to fail due to such things.
Using cron right now to kick them off, but would be nice with a ceteralized place etc.
so you want to execute a task on a remote node, kind of like a background task
so i guess there’s a couple of points to make there
#1 is that the ssh dropped connection could propagate a terminate signal. that of course you don’t want
because that will essentially interrupt your remote process
so it’s like you want to trigger a managed process on a remote node. I say managed in the sense of “watched over”
funny thing is in winrm the idea of a session is more persistent than it is with ssh
i.e., in winrm you create a session that you can reconnect to.
I could use screen ofc, but I would rather not want to use that.
so, this probably sounds like overkill but i do know of cases where people run another rundeck (like it was that watching process).
so one rundeck calls another rundeck. the local rundeck manages the process
Ah yeah, just hit the api endpoints.
Thats quite nice.
we should think of a lighter wait way
but rundeck is small (50MB ). some users have asked about stripping rundeck down so it could be an agent with the same API set
i kind of like that idea
That would be really cool.
Especially if the agent kind of stores its jobs locally, so they would be executed even if there is a network outage or watherever is using the cron feature.
it solves lots of problems too. for example, the rundeck server could crash or get portioned from the network. When it comes back it could reconnect to the other ones
kind of a federated model
btw, i know of a couple users that are doing this kind of thing in windows environments because they don’t want to use winrm
so they put rundeck on each of the windows nodes and have a “master” rundeck call the api like a NodeExecutor
Blargh, battery died.
What was the last lines you wrote Alex-SF?
darn that battery!
oh about setting up rundeck like a remote agent in a windows environment because winrm couldn’t be worked out
I dont know any Java im afraid, and I dont have time to learn. But if there were any specs for what an agent would have to provide to be able to speak to the rundeck-server I could write one in Python.
you could write a node executor plugin in python
Because this would be really useful.
let me find a link
firstly this is pretty cool to know about: http://vincent.behar.name/rundeck-api-java-client/jython.html
and this http://rundeck.org/docs/manual/plugins.html#script-plugin
yah these plugins can be written in script or java
i write lots of plugins in bash :)
let me know if you get stuck. we might want to do a online google hangout to teach this stuff if it’s helpful
Ok, Ill have a read and see if I can figure something out.
In the meantime Ill just stick to cron then :)
Rundeck community google hangout starting now: https://plus.google.com/hangouts/_/110d0a9595f2e104b14ea3386df9f8258a3c7643
I dont have a mic in this computer.
simon_: what training topic would you be interested in? (for online free training)
damonedw: mostly about the architecture of rundeck I guess, and it would be cool with like “hello world plugin” hangout.
simon_: any particular thing about the arch? overview? how to scale?
Just a high level overwiew, it can be a bit daunting to dive into a big codebase without a high level overview of where things live and if there are any design decisions one should know of.
Btw, Ive written a chef-cookbook for rundeck which automagically add nodes from a node search if anyone is interested https://github.com/simonjohansson/chef-rundeck
holy moly. ya that is good
hello i just discovered rundeck but i have many windows machines is there a good integration ?
the key part is the winrm plugin to make it possible
Alex-SF, okay i’ll check that i’ ve seen that it’s one year old. i wanted to be sure that this is still fully functionnal :)
yah, it’s still active.
we recently made an update to have it use a newer underlying library
great ! thx
Alex-SF, i see that i can create form for job with like dropdown meny. can i pupulate this json from Chef for example ?
yes, but you’d have to write a little CGI wrapper
so essentially this CGI like wrapper would call the Chef search and return back the options JSON
Alex-SF, i’m allowed to use what language to do that ? :)
you could write a cgi in shell script
but it does require something else to run the cgi. what scripting language do you like ?
python, bash,ruby things like that
ok. so you could write a cgi script that uses one of those languages like that
that’ s great. so let me take a example and then i;ll leave you to install rundeck :)
it would be nice for us to have a working example where you could just drop stuff into
can rundeck is good to orchestrate a mongodb cluster creation for example ? install 3 server wait so that they are up then configure the replicaset then pop a mongoS, then wait and create the cluster and the user and destroy the mongos process
Kzim: I would rather use Chef/Puppet for that.
That way you dont need to do anything really, just use the manifest/cookbook and it will figure everything out by itself.
simon_, we use Chef but Chef has no orchestration
Ah, sorry, didnt see orchestartion there.
it’s a simple one but i’ll have to know wwhen every node are up then when the replicat set is configured for example
Are you running mongo in the cloud(tm) or on physical hardware? I think RightScale and other similar companies tries to solve these issues.
Our mongo-setup is on physical machines and very static(we add nodes to the cluster when we need more space) so the chef-recipes has been good enough for us.
Alrighty, I need to go home. Se yall later
Alex-SF, can i limit a user to a certain project or job ?
Kzim: yes you can with an aclpolicy
you can allow it on a per-user or per-usergroup basis
wow i have amny things to read. it’s not in the GUI i assume
unfortunately, no. but it is a powerful dsl
Alex-SF, so to user are managed in a flat file ? do you have good practice to version every file or ?
well nevermind it was a stupid question
just generally to manage them in an SCM and the provisioning packages them up
Alex-SF, i’ve seen that you we can get any value from a Chef-server but can i tag a node with information in stored locally in the node ?
you are asking if you can tag a node in rundeck locally?
let’s say on each server i have a /etc/role file with a string in there. now i want to display that string in rundeck and filter servers based on it
ok so that file, /etc/role, is a value that states the nodes role. Is that a chef role too?
i should say, does chef know that information too
Alex-SF, could be both yes
some of those information will not be on chef
on the Chef server. and perhaps we will use Chef solo
ok, well you could maintain node info in another model source. Rundeck merges them together using the node name as the key
for example, you could have a minimal set of node metadata that contains the role assignment.
here’s a simple example
you could have a chef server supplying the data it knows about as a URL model source via the chef-rundeck service. you could have another model source, maybe in a yaml/xml file that overlays the role info
so your project would have 2 model sources
i see intresting
Alex-SF, to you have a good tuto for Chef plugin ?
Any have an ideas why I keep getting the follow:
sorry mangled remote copy/paste
Jun 6 16:00:09 w-d sshd: Accepted publickey for rsync from ::ffff:10.137.15.80 port 53874 ssh2
Jun 6 16:00:09 w-d sshd: Received disconnect from ::ffff:10.137.15.80: 3: com.jcraft.jsch.JSchException: Auth cancel
I can ssh using publickey fine
Dink: can you make sure the correct key is being chosen? usually that’s the issue for me
e.g., the one i use from the CLI is different than one used by rundeck
is it the same one in framworks.properties
hmm added they key again and it worked this time, strange
added the key to the remote’s authorized?
Kzim: we could totally benefit from a chef plugin tutorial
Alex-SF: yeah maybe it was a bad copy/paste originally. idk
[travis-ci] dtolabs/rundeck#271 (development - be79533 : Greg Schueler): The build passed.
[travis-ci] Change view : https://github.com/dtolabs/rundeck/compare/db24692ad84d…be7953333cba
[travis-ci] Build details : http://travis-ci.org/dtolabs/rundeck/builds/7858252