Skip to content

Instantly share code, notes, and snippets.

View pmandreoli's full-sized avatar

pmandreoli pmandreoli

View GitHub Profile
@pmandreoli
pmandreoli / job_conf.xml
Created May 14, 2019 11:24
job_conf.xml chronos destination
<?xml version="1.0"?>
<job_conf>
<plugins>
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="4"/>
<plugin id="chronos" type="runner" load="galaxy.jobs.runners.chronos:ChronosJobRunner" workers="4">
<param id="chronos">hostaname and port</param>
<!-- Hostname which runs Chronos instance. -->
<param id="owner">pietro.mandreoli@gmail.com</param>
<!-- The email address of the person responsible for the job. -->
<param id="username"></param>
@pmandreoli
pmandreoli / docker_run_command_on_mesos.txt
Created May 14, 2019 11:40
mulled enabled destination Chronos: command outputs and file
docker run --name mesos-99ec34b0-982a-4f18-888f-0435a5d73d9a --runtime runc -v /export/galaxy/database/:/export/galaxy/database/:rw -v /var/lib/mesos/slaves/89907619-076f-4f00-8bfd-67a1bbd599a6-S1/docker/links/99ec34b0-982a-4f18-888f-0435a5d73d9a:/mnt/mesos/sandbox --net host --restart no -h vnode-0.localdomain -e 'MESOS_SANDBOX=/mnt/mesos/sandbox' -e 'MESOS_TASK_ID=ct:1557825422389:0:galaxy-chronos-134:' -e 'mesos_task_id=ct:1557825422389:0:galaxy-chronos-134:' -e 'CHRONOS_JOB_RUN_ATTEMPT=0' -e 'CHRONOS_RESOURCE_CPU=2.0' -e 'CHRONOS_RESOURCE_MEM=512.0' -e 'MESOS_CONTAINER_NAME=mesos-99ec34b0-982a-4f18-888f-0435a5d73d9a' -e 'CHRONOS_RESOURCE_GPU=0' -e 'HOST=90.147.188.117' -e 'CHRONOS_JOB_NAME=galaxy-chronos-134' -e 'CHRONOS_JOB_OWNER=pietro.mandreoli@gmail.com' -e 'CHRONOS_JOB_RUN_TIME=1557825422389' -e 'CHRONOS_RESOURCE_DISK=256.0' -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -a stdout -a stderr --entrypoint "/bin/sh" quay.io/biocontainers/fastqc:0.11.8--1 -c rm -rf working; mkdir
@pmandreoli
pmandreoli / ls_job_working_dir_mulled_local.txt
Created May 14, 2019 11:46
job_conf.xml mulled enabled destination: local
ls /export/galaxy/database/job_working_directory/000/243
totale 180K
drwxr-xr-x. 3 root root 4,0K 10 mag 14.27 dataset_454_files
-rw-r--r--. 1 galaxy galaxy 2 10 mag 14.27 galaxy_243.ec
-rwxr-xr-x. 1 galaxy galaxy 6,3K 10 mag 14.27 galaxy_243.sh
drwxr-xr-x. 2 galaxy galaxy 4,0K 10 mag 14.27 home
-rw-r--r--. 1 galaxy galaxy 11 10 mag 14.27 __instrument_core_epoch_end
-rw-r--r--. 1 galaxy galaxy 11 10 mag 14.27 __instrument_core_epoch_start
-rw-r--r--. 1 galaxy galaxy 1 10 mag 14.27 __instrument_core_galaxy_memory_mb
-rw-r--r--. 1 galaxy galaxy 2 10 mag 14.27 __instrument_core_galaxy_slots
@pmandreoli
pmandreoli / hello_world.xml
Created May 14, 2019 12:44
simple wrapper with docker container as requirement
<tool id="hello_world" name="hello_world" version="0.1.0">
<requirements>
<container type="docker">ubuntu</container>
</requirements>
<command>
<![CDATA[
echo "Hello World";
echo "Hello World output file content" > $output &&
@pmandreoli
pmandreoli / fastqc.json
Created May 28, 2019 09:21
fastqc.json
"name": "biocontainers-test-job",
"description": "Running fastqc job",
"command": "fastqc $MESOS_SANDBOX/Sc_IP.fastq",
"shell": true,
"retries": 1,
"cpus": 1.0,
"mem": 500.0,
"uris": [ "http://159.149.160.56/indigo_demo/Sc_IP.fastq" ],
"schedule": "R1//PT1M",
"container": {
@pmandreoli
pmandreoli / curl_call.txt
Created May 28, 2019 09:25
curl command for fastqc execution on MESOS node
curl -k -L -H 'Content-Type: application/json' -X POST -d '@fastqc.json' https://ipMESOS:PORTA/v1/scheduler/iso8601 -u admin
@pmandreoli
pmandreoli / curl_call_proxy.txt
Created May 29, 2019 19:59
curl call for Galaxy VM deployment GARR cloud
curl -k -H 'Content-type: text/yaml' -H 'AUTHORIZATION: type = InfrastructureManager; username = pietro; token = eyJraWQiOiJyc2ExIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJjNmQxZGIyNy1kNzY2LTQ3OTYtYWQ0MS1iNmRmMjFjZjE1N2EiLCJpc3MiOiJodHRwczpcL1wvaXAtOTAtMTQ3LTE4OS02OC5wYTEuZ2FycnNlcnZpY2VzLml0XC8iLCJleHAiOjE1NTU1MTgxODgsImlhdCI6MTU1NTUxNDU4OCwianRpIjoiZjk2OTY5OWYtZWZkZi00ODcxLTliZDktNzNkMWVkZmU1MzZhIn0.O1Kj1eXh06KBJZ78KO4LpppUw2oQ3pndsr-SkvF9uQIKwc0L6gA1FJlhChsjl4nN__UOBtmZs6JUcGEQmL7xmsVpV-IGkDAmryqacZi66DwhfoNE5gXFT-onz-Y_RvnvX7eK6RRCevfHBhBpCuKVMjaDz-EHW0TyVlR3f37amn0\nid = ost; type = OpenStack; host = https://keystone.cloud.garrservices.it:5000; domain = cloudusers; auth_version = 3.x_password; username = **********; password = ******; tenant = elixir; service_region = garr-pa1' -i -X GET https://ip-90-147-189-62.pa1.garrservices.it/im/infrastructures
@pmandreoli
pmandreoli / singularity.yml
Created May 31, 2019 09:00
ansible playbook for singularity installation
---
- hosts: localhost
remote_user: root
vars:
gopks: "go1.12.5.linux-amd64.tar.gz"
tasks:
- name: Install singularity dependencies
yum:
name:
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- indigo_custom_types: https://raw.githubusercontent.com/mtangaro/tosca-types/master/custom_types.yaml
description: >
TOSCA test for launching a Galaxy Server also configuring the bowtie2
tool using Galaxy Tool Shed.
topology_template:
.
├── at10
│   ├── bowtie2
│   │   ├── genome.1.bt2
│   │   ├── genome.2.bt2
│   │   ├── genome.3.bt2
│   │   ├── genome.4.bt2
│   │   ├── genome.rev.1.bt2
│   │   └── genome.rev.2.bt2
│   ├── bowtie-index