Skip to content

Instantly share code, notes, and snippets.

from cm.services.apps import ApplicationService
import logging
log = logging.getLogger('cloudman')
class BaseJobManager(ApplicationService):
def __init__(self, app):
super(BaseJobManager, self).__init__(app)
...
galaxy.queue_worker INFO 2015-05-06 16:33:13,705 Binding and starting galaxy control worker for main
Starting server in PID 3058.
serving on http://127.0.0.1:8080
galaxy.jobs.runners.drmaa DEBUG 2015-05-06 16:33:13,898 (114/115) state change: job finished, but failed
galaxy.jobs.runners.slurm WARNING 2015-05-06 16:33:13,942 (114/115) Job not found, assuming job check exceeded MinJobAge and completing as successful
galaxy.datatypes.metadata DEBUG 2015-05-06 16:33:14,202 setting metadata externally failed for HistoryDatasetAssociation 117: External set_meta() not called
[bam_index_core] the alignment is not sorted (ERR030882.10002135): 3053935 > 3053755 in 25-th chr
[bam_index_build2] fail to index the BAM file.
*** Error in `python': double free or corruption (out): 0x00007faff008e9b0 ***
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Blueberry/cross/Blueberry - cross.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "save only",
"linters": {
"flake8": {
@afgane
afgane / popularity.mako
Created December 3, 2015 15:37
Galaxy tool popularity WIP
<%
root = h.url_for( "/" )
app_root = root + "plugins/visualizations/popularity/static/"
title = "Tool popularity derived from dataset '" + hda.name + "'"
## creating_job = hda.creating_job.id
creating_job = trans.security.encode_id( hda.creating_job.id )
creating_job_id = hda.creating_job.id
tool1 = hda.creating_job.tool_id
# optionally bootstrap data from dprov
@afgane
afgane / gulpfile.js
Created June 21, 2016 22:08
Attempts at transpiling CloudLaunch-UI
const gulp = require('gulp');
const del = require('del');
const typescript = require('gulp-typescript');
const tscConfig = require('./tsconfig.json');
// clean the contents of the distribution directory
gulp.task('clean', function () {
return del('dist/**/*');
});
@afgane
afgane / ansible.cfg
Last active June 23, 2016 18:17
Deploying a Galaxy server via Ansible roles.
[defaults]
allow_world_readable_tmpfiles=True
callback_whitelist = profile_tasks
@afgane
afgane / playbook.yml
Created June 23, 2016 23:11
Setting up a server for CloudLaunch
---
- hosts: ansible-hosts
become: yes
become_user: root
tasks:
- name: Add Ansible PPA
apt_repository: repo={{ item }} update_cache=no
with_items:
- ppa:fkrull/deadsnakes
@afgane
afgane / intro.py
Created August 2, 2016 19:18
A complete CloudBridge intro script
from cloudbridge.cloud.factory import CloudProviderFactory, ProviderList
# Add your cloud provider info, for example:
# config = {'aws_access_key': 'access key',
# 'aws_secret_key': 'secret key'}
# provider = CloudProviderFactory().create_provider(ProviderList.AWS, config)
# image_id = 'ami-2d39803a' # Ubuntu 14.04 (HVM)
# Create a key pair
kp = provider.security.key_pairs.create('CB-intro')
@afgane
afgane / generic_cloud_connect.py
Last active January 18, 2017 17:43
Set the variables at the top and connect to a desired cloud via `boto` library.
import boto
import boto.s3.connection
from boto.ec2.regioninfo import RegionInfo
# Provide access info for your cloud and your account
A_KEY = ""
S_KEY = ""
region_name = 'Chameleon'
region_endpoint = 'openstack.tacc.chameleoncloud.org'
ec2_conn_path = "/services/Cloud"
@afgane
afgane / README.md
Created June 23, 2016 16:00
An Ansible playbook for setting up a host to run Ansible itself.

Create an inventory file such called hosts with the following content (adjusting the IP address)

[ansible-hosts]
129.114.18.39 ansible_ssh_private_key_file=key_pair.pem ansible_ssh_user=ubuntu  # Ubuntu target

From an Ansible-enabled machine, download playbook.yml and run it with