Is SCM import/export plugin usable ?

3,606 views
Skip to first unread message

Pierre-Yves Gillier

unread,
Nov 4, 2015, 10:31:07 AM11/4/15
to rundeck-discuss
Hi,

after upgrading an instance to rundeck 2.6.1, I wanted to test SCM integration with git.

Using a test project, I set up export, wrote four jobs and pushed them to git without a glitch.

On another project on same rundeck, import was set up, files were available when defining scm import (I can see all four ones in import window) but when I import them, they don't show at all in the project. I tried both with and without UUID in filename in git, Also removed UUID in files, merged repos and still nothing seems to be done.

When checking logs, no error is popping.

So, is my use case valid ? Or is the plugin too young to be usable ?

Regards,

virgil.c...@gmx.net

unread,
Nov 9, 2015, 6:58:56 AM11/9/15
to rundeck-discuss
Hello!
I am not one of the Rundeck developers but I may explain you why your usage scenario is wrong. The SCM plugin aims to give you the possibility to synchronize your jobs definition in the SCM of your choice (right now there is support for git). This means that everything in the job definition (including UUID) is synchronized on git.
Now, if you are trying to import in a project jobs that were pushed from another project on the same Rundeck the import job will try to import with the same UUID which, of course, is not possible. Maybe it should have give an error but the nice thing is that it does not do anything wrong.
To clone projects you already have an easy way with project import/export from configuration menu.
SCM integration is very useful if you setup multiple Rundeck instances, one for production and several others for test/dev and you are pushing all the changes in a controlled way via a centralized versioning system.

I hope that I answered your question,
Virgil

jeff mcdowell

unread,
Dec 23, 2015, 5:14:27 PM12/23/15
to rundeck-discuss
The bones of the SCM features in rundeck look positively fabulous.
But thusfar, we have been unable to get the tool working the way that we want.

If we sync up one single rundeck installation with a git repository, it works perfectly.
It detects changes, shows you the differences in the XML files, and allows for you to push and pull from the remote without issue.

However, when we attempt to sync up a second repository to the same git repository-- this is where we run into problems.
The import will detect that there are changes on the repository, but when you go to do an SCM Import of a job(s), the updates don't work.
A lovely "Setup Successful" message is displayed-- but the local job never updates to the remote copy (and the out of sync messages remain).
There are no errors indicated on screen or in the rundeck logs indicating that failure has occurred.

There seems to be a 1:1 pairing of sorts that occurs between rundeck installations and git repositories-- and SCM imports only work on one Rundeck installation at at time.
This is a shame, because we are attempting to use this great new feature to push jobs from a dev-anks,rundeck installation up to a prod-rundeck installation.

Has anyone else encountered this issue?
Are there any enhancements to SCM earmarked for 2.6.2?

Thanks,
Jeff M

jeff mcdowell

unread,
Dec 23, 2015, 6:02:01 PM12/23/15
to rundeck-discuss
So.. Another update:

We discovered that SCM Import feature *is* pulling the remote files local.
It is pulling them into the following dir:  rundeck/projects/<project_name>/scm
This directory seems to be like a local git repository of sorts, as it has all of the XML files, just as they are out on the remote git server.

However, even as they are stored locally-- the imported jobs are not actually pulled into the "jobs" portion of the project in Rundeck.
It's like, the second part of the SCM import, that enables the JOB from the XML is never executing.

Strange indeed.

Jeff M.

new23d

unread,
Dec 26, 2015, 1:30:34 PM12/26/15
to rundeck-discuss
Hi Guys,

As a part of some in-house development around Rundeck, I had also written an export/import script. See dir2rd.rb and rd2dir.rb scripts (which need rd-scm.rb to work) at https://github.com/thomsonreuters/tr-rundeck-winrm-plugin/tree/master/ext . The other scripts aren't completed yet in that location. These scripts have some inbuilt help which prints on console.


Cheers,
new23d

Kris Buytaert

unread,
Mar 2, 2016, 10:42:50 AM3/2/16
to rundeck-discuss


On Thursday, 24 December 2015 00:02:01 UTC+1, jeff mcdowell wrote:
So.. Another update:

We discovered that SCM Import feature *is* pulling the remote files local.
It is pulling them into the following dir:  rundeck/projects/<project_name>/scm
This directory seems to be like a local git repository of sorts, as it has all of the XML files, just as they are out on the remote git server.

However, even as they are stored locally-- the imported jobs are not actually pulled into the "jobs" portion of the project in Rundeck.
It's like, the second part of the SCM import, that enables the JOB from the XML is never executing.


Is there any progress on this ?   Is this an issue we can track somewhere ?
 I`m running into the same problem and wondering if I should hack around , or if this will be fixed.

Greg Schueler

unread,
Mar 2, 2016, 12:36:06 PM3/2/16
to rundeck...@googlegroups.com
Hi Kris,

A current limitation of the Git import plugin is that it retains the UUID from the source file on import, and so if you are exporting from one project into git, and trying to import into another within the same Rundeck instance, it will not work, due to conflicting UUID/project.

There is an github issue filed to fix this: https://github.com/rundeck/rundeck/issues/1503



-- 
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/20334cd2-d6f7-4a8a-b019-396941ed8599%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lee Thompson

unread,
Jul 29, 2016, 1:10:02 AM7/29/16
to rundeck-discuss


On Wednesday, March 2, 2016 at 11:36:06 AM UTC-6, greg wrote:
Hi Kris,

A current limitation of the Git import plugin is that it retains the UUID from the source file on import, and so if you are exporting from one project into git, and trying to import into another within the same Rundeck instance, it will not work, due to conflicting UUID/project.

There is an github issue filed to fix this: https://github.com/rundeck/rundeck/issues/1503

I'm playing around with this today.  In my experiment, I create all the jobs on a dev box and a boot up an empty rundeck in a managed environment.  The import shows success similar to Kris and Jeff with absolutely no change to rundeck.. but in this case there is no conflicting UUID.  I imagine I need to dump/load the project and use the SCM only for incremental update?  I was hoping to completely populate rundeck from SCM.

Akos Hencz

unread,
Jul 29, 2016, 7:02:19 AM7/29/16
to rundeck-discuss
I just had a go at the SCM plugin myself, my goal was to move jobs from our current Rundeck server to a completely new instance.

I setup the SCM import for an empty project (same name as on the other instance). At the job actions, I can see a 'Select files to import' option, which do lists the yaml definitions in the repository. I select all, click 'Setup', and nothing happens.

I also though it might be only for incremental updates, so exported/imported the jobs via a .jar file, and tried to import again from SCM, but again, nothing happens. There is a questions mark next to the jobs, which says 'Not tracked for SCM Import'. No matter what I tried I could not change that. The jobs in the SCM repo and the .jar file have identical names and UUIDs, and still they are not marked for import.

I would like to know how to use the SCM Import feature.

My main goal would be to change something in the steps of ~20 jobs, which is really easy with an editor's find and replace. Then push it to the git repository, and I expected Rundeck to see the change and pull the updated job definitions. And maybe it would, if the jobs were marked for SCM imort.

TIkki

unread,
Oct 13, 2016, 1:07:15 PM10/13/16
to rundeck-discuss
Hi,

Has this issue been resolved. I encountered same scenarios as Akos Hencz. I still cannot import jobs from GIT directly. The interface let's me chose the jobs but at the end no jobs get created.



Regards,
Pavan

sandeep...@gmail.com

unread,
Jan 31, 2017, 1:19:27 PM1/31/17
to rundeck-discuss
Hello Pavan,

Were you able to find a solution for this. I am facing similar problem. Please let me know.

Thanks & Regards,
Sandeep.

Gmail

unread,
Jan 31, 2017, 3:24:12 PM1/31/17
to rundeck...@googlegroups.com
Alternatively, I created a process/script using the RD-CLI to "promote" jobs between separate environments. (Job export / Job import)

Actually turned it into a Rundeck plugin and made it a runnable job...

Happy to share more details if there is any interest.

-Fred
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages