We can’t find the directory for where the default template file is located. Where is it? Using stock installation for version 1.5.
Examples and default jobs are shipped with the source code provided here:
However, you should add/modify templates in this directory.
You can view all the templates we use at OSC here.
We place that entire
apps directory (from the source linked there) in
/etc/ood/config/apps - so you can see that’s how we configure a bunch of apps, not just the job composer (myjobs)
We are still on version 1.5 and the directory /etc/ood/config/apps/myjobs/templates/ does not exist. I created the directory path and put a template file there, but it appears that ood copies the template from /home/wew/ondemand/data/sys/myjobs/projects/default/14
and not where you indicated. One other thing I noticed this morning is that it no longer shows the code or has an edit button in the job composer.
It copies it to
$HOME/ondemand/data/sys/myjobs/projects/... from wherever the source directory may be. The idea being, it was a global template, now it’s your job.
I think it’s OK that you had to create the directory, just be sure it has the correct permissions.
What you need now are sub-directories, not simply the template file. Also note the manifest.yml. Here’s output of one such directory and it’s corresponding manifest. The Github I’ve linked you should be able to see lots of examples (including another default), but I think the important bit is that it’s a directory with a manifest (that has all the fields listed).
[jeff@16da6156ba82 /]$ ls /etc/ood/config/apps/myjobs/templates/Simple_Parallel_Job manifest.yml myscript.c parallel_job.sh [jeff@16da6156ba82 /]$ cat /etc/ood/config/apps/myjobs/templates/Simple_Parallel_Job/manifest.yml name: Simple Parallel Job host: owens script: parallel_job.sh notes: > Here is an example of an MPI job that uses 4 nodes with 28 cores each, running one process per core (112 processes total).
I understand it is now “my” file once it is copied. The question is where does it copy from? It does not appear to copy from
/etc/ood/config/apps/myjobs/templates when you select new job from template. It copies from /var/www/ood/apps/sys/myjobs/example_templates/default/
OK, yea, it copies from
/var/www/... out of the box.
It will copy from
/etc/ood/config/apps/myjobs/templates once/if you populate it with directories.
If you create a
/etc/ood/config/apps/myjobs/templates/default with the appropriate files (a manifest.yml and a shell script), it should become your new default. You can see OSC’s custom default here.
Hope that clarifies things.
To clarify, this is the expected functionality:
If you click New Job “From Default Template”:
- New Job “From Default Template” will copy the default template. In a new install that is
/var/www/ood/apps/sys/myjobs/example_templates/default/. If you add this directory
/etc/ood/config/apps/myjobs/templates/defaultthe default template used is this one. You can see this default template is what we use - our templates directory is on GitHub.
If you click New Job “From Template”:
- it should take you to the Templates page:
- You can select the template to copy on the templates page. The template location of the selected template is shown in the bottom right:
Great information but it’s not picking up the default from the /etc/ood tree. Here’s some info. I did restart the httpd24-httpd service and get the version in the /var/www/ood tree.
[root@ondemand templates]# pwd
[root@ondemand templates]# ls -l
drwxr-xr-x 2 root root 4096 Aug 19 13:13 default
[root@ondemand templates]# ls -l default/
-rw-r–r-- 1 root root 584 Aug 19 13:13 main_job.sh
-rw-r–r-- 1 root root 981 Aug 19 08:27 manifest.yml
That I’m not sure, I just did a small test on 1.6 and all I had to do was refresh the webpage.
Your file permissions look OK, I’d be sure the entire directory path has 755 permissions. That’s apps, myjobs & templates (given that you had to create those directories by hand). I’ll look into the release notes more thoroughly, but on a quick glance, I didn’t see anything that changed in this regard from 5 to 6.
@gwylym where you able to solve this?