ARTbio / GalaxyKickStart

Ansible playbooks for Galaxy Server deployment
GNU General Public License v3.0
24 stars 22 forks source link

Simplify / clarify artimed-extra role and artimed group_vars #170

Closed drosofff closed 8 years ago

drosofff commented 8 years ago

I would like to simplify both these items, or at least understand the logics behind which sometimes seems redundant to me.

A typical ansible-playbook ... galaxy.yml for instance with [galaxy-kickstart] gives this log:

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
included: /Users/aligre/ansible-artimed/roles/artimed_extras/tasks/extras.yml for 192.54.201.71

TASK [artimed_extras : Create proftpd dir] *************************************
ok: [192.54.201.71]

TASK [artimed_extras : Manage template for proftpd] ****************************
ok: [192.54.201.71] => (item={u'dest': u'/etc/proftpd/proftpd.conf', u'src': u'proftpd.conf.j2'})

TASK [artimed_extras : Create tool dependency dir] *****************************
ok: [192.54.201.71]

TASK [artimed_extras : Restart/start supervisor tasks] *************************
changed: [192.54.201.71] => (item={u'state': u'restarted', u'name': u'proftpd'})
ok: [192.54.201.71] => (item={u'state': u'started', u'name': u'munge'})
ok: [192.54.201.71] => (item={u'state': u'started', u'name': u'nginx'})

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
included: /Users/aligre/ansible-artimed/roles/artimed_extras/tasks/supervisor_galaxy.yml for 192.54.201.71

TASK [artimed_extras : debug supervisor] ***************************************
skipping: [192.54.201.71]

TASK [artimed_extras : Restart Galaxy] *****************************************
changed: [192.54.201.71]

TASK [artimed_extras : Start Galaxy] *******************************************
skipping: [192.54.201.71]

TASK [artimed_extras : Stop Galaxy] ********************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

TASK [artimed_extras : include] ************************************************
skipping: [192.54.201.71]

Where a lot of things are skipped, due to a lot of "false" value passed by default in ansible-artimed/roles/artimed_extras/defaults/main.yml.

  1. Is all that folk's actually required ?
  2. The data_manager_task_file: "extra-files/artimed/artimed_data_manager_tasks.yml"

in ansible-artimed/group_vars/artimed, is not clear to me. In short, what is the purpose of this file :

dbkeys:
- dbkey: "hg19"
- dbkey: "hg38"
data_managers:
- id: "toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_dbkeys_all_fasta/0.0.1"
- id: "toolshed.g2.bx.psu.edu/repos/devteam/data_manager_bowtie2_index_builder/data_manager_bowtie2_index_builder/0.0.1"
- id: "toolshed.g2.bx.psu.edu/repos/devteam/data_manager_bwa_mem_index_builder/data_manager_bwa_mem_index_builder/0.0.1"
- id: "toolshed.g2.bx.psu.edu/repos/devteam/data_manager_gatk_picard_index_builder/data_manager_gatk_picard_index_builder/0.0.1"
- id: "toolshed.g2.bx.psu.edu/repos/devteam/data_manager_sam_fasta_index_builder/data_manager_sam_fasta_index_builder/0.0.1"

since with other inventories, we manage the data_manager tools just with the tool_list.yml ?

The presence of a data_manager_tasks.yml file in the same extra-files/artimed/ directory further complicates the thing.

  1. I have also some difficulties to understand the purpose of the dbkeys variable list, since indeed I do no see (or I miss it) this keys implemented in the final running Galaxy instance.

These are 3 examples, others things are difficult to follow.

For instance, artimed_extras is a role played in the galaxy.yml playbook. This is confusing. If it is "extra" (as artimed let to think of it) why including it in the galaxy.yml default playbook ? Either there is important things to play with this role, and it should probably be renamed and curated from dispensable tasks (that are currently put to false anyway if I understand) Or Nothing is important (I don't think it's true indeed), and then we should remove the role from the playbook.

In summary, the artimed-extra role is probably badly named and/or has confusing unused code, and, the artimed groupvars seems unnecessarily complicated with some code with unclear purpose/effect

mvdbeek commented 8 years ago

Well, to quote myself from earlier this year: "The artimed-extras role must die!".

Let's see step by step:

Where a lot of things are skipped, due to a lot of "false" value passed by default in ansible-artimed/roles/artimed_extras/defaults/main.yml.

Is all that folk's actually required ?

The role is doing a few different things:

To reduce this we could

The data_manager_task_file: "extra-files/artimed/artimed_data_manager_tasks.yml"

in ansible-artimed/group_vars/artimed, is not clear to me. In short, what is the purpose of this file :

When building the artimed flavor, this would run the data managers in data_managers: for the dbkeys in dbkeys:

So yes, this role should be removed.