Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update, this is the current working implementation that supports consonance-wes. #1

Open
wants to merge 38 commits into
base: develop_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
895df7f
Commented out a aws-creds removal. Need them for uploading files back…
achave11-ucsc Apr 16, 2018
29f0649
Fixing outdate python issue
achave11-ucsc Apr 17, 2018
8a1b8be
Updating python2
achave11-ucsc Apr 17, 2018
b1689bb
Fixing provisioning issues with container-host-bag for consonance.
achave11-ucsc Apr 19, 2018
ea4d45b
Changed pip2.7 to pip executable. Install pip method changed.
achave11-ucsc Apr 19, 2018
993528a
reverted to old method of installing pip.
achave11-ucsc Apr 19, 2018
ba747c6
Adding methods for consistent downloading and running files from python.
achave11-ucsc Apr 19, 2018
1376fc6
Quick fix
achave11-ucsc Apr 19, 2018
af99a06
Quick fix
achave11-ucsc Apr 19, 2018
e8ec1e7
sudo apt-get update for 'Quick update'
achave11-ucsc Apr 19, 2018
8345ce6
Reverting to install of pip that gets further along the provisioning
achave11-ucsc Apr 20, 2018
6f55873
Including python-dev
achave11-ucsc Apr 20, 2018
f9508bb
Hot fix. flag for install pre-requisites.
achave11-ucsc Apr 20, 2018
9285be8
Adding :worker to consonance install. Hoping it copies credential over,
achave11-ucsc Apr 20, 2018
9ab587d
Changes paths for copying over credentials.
achave11-ucsc Apr 20, 2018
88e7305
Changes paths for copying over credentials in destination.
achave11-ucsc Apr 22, 2018
cf24f2d
Removed error logs! Provisioning creds., correctly.
achave11-ucsc Apr 22, 2018
bd76524
Updated consonance-arch.jar file. Synchronized with consonance-main.
achave11-ucsc Apr 22, 2018
59d12a0
Hot fix, to url for arch-file!
achave11-ucsc Apr 22, 2018
6c50a68
Synchronized java versions. Made a circuit less test. Working
achave11-ucsc Apr 22, 2018
94598e1
Hot fix!
achave11-ucsc Apr 22, 2018
c8f8fcb
Update download jar-file method.
achave11-ucsc Apr 22, 2018
ec3c446
Set consonance host to master and not master:worker
achave11-ucsc Apr 22, 2018
7043cbd
Tracing logs, det diffs.
achave11-ucsc Apr 23, 2018
9a451a4
Reverted jar, trying with dockstore credentials.
achave11-ucsc Apr 23, 2018
d7b4bbc
Detting up dockstore directory.
achave11-ucsc Apr 23, 2018
ca3b9f9
Update permissions for req. Installs.
achave11-ucsc Apr 26, 2018
4348b82
Update permissions for requirements. Changing/duplicating file locati…
achave11-ucsc Apr 26, 2018
7a94bd4
Hot fix.
achave11-ucsc Apr 26, 2018
7769b95
Updated cwltool version to one compatible with dockstore.
achave11-ucsc May 17, 2018
8db3a2d
Updated schema-salad version to one compatible with dockstore.
achave11-ucsc May 17, 2018
85001b9
Updated schema-salad version to one compatible with dockstore.
achave11-ucsc May 17, 2018
42bb44e
Trying cwltool install with dependencies via pip install.
achave11-ucsc May 17, 2018
a8f4231
Adding additional dependencies.
achave11-ucsc May 17, 2018
6dfc82d
Adding update ubuntu system call.
achave11-ucsc May 17, 2018
681cedb
Hot fix, added sudo to update command.
achave11-ucsc May 17, 2018
ab45529
Diff pip install call.
achave11-ucsc May 17, 2018
91c5a08
Update cwltool, and remove patched files. They are no longer required.
achave11-ucsc Jun 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion install.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# file: install.yml
# This file is used for installing a container host

# Not sure why, but I needed this to create a /etc/hosts that actually works with the Ubuntu image here on openstack
- hosts: master:worker
become: yes
Expand Down
24 changes: 20 additions & 4 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@
with_items:
- python

- name: Download get-pip
get_url: url=https://bootstrap.pypa.io/get-pip.py dest=/home/ubuntu/downloads/get-pip.py
- name: Update ubuntu system
raw: sudo apt-get update

#- name: Download get-pip
# get_url: url=https://bootstrap.pypa.io/get-pip.py dest=/home/ubuntu/downloads/get-pip.py
- name: Install build pre-requisites
raw: sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev

- name: Install pip
become: yes
become_user: root
shell: python /home/ubuntu/downloads/get-pip.py

raw: apt-get install -y python-pip
#shell: python /home/ubuntu/downloads/get-pip.py
#TODO: provisioning fails in the following!
- name: Install docker-py
become: yes
become_user: root
Expand All @@ -32,3 +38,13 @@
become: yes
become_user: root
file: state=directory path=/home/ubuntu/.aws owner=ubuntu

- name: Setup dockstore config directory
become: yes
become_user: root
file: state=directory path=/home/ubuntu/.dockstore owner=ubuntu

- name: Setup dockstore config directory 2
become: yes
become_user: root
file: state=directory path=/root/.dockstore owner=ubuntu
67 changes: 17 additions & 50 deletions roles/consonance/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: Get Architecture3 jar file
get_url: url=https://www.dropbox.com/s/giy9ayxlvpoohiz/consonance-arch-2.0-alpha.11-SNAPSHOT.jar?dl=1 dest=/home/ubuntu/consonance-arch-{{ consonance_arch_version }}.jar
- name: Get Architecture3 jar file # This needs to be updated to the latest release of consonance dependencies!
raw: sudo wget https://www.dropbox.com/s/p254pqswn3o53xg/consonance-arch-2.0.0-alpha.16-SNAPSHOT.jar -O /home/ubuntu/consonance-arch-{{ consonance_arch_version }}.jar
#https://www.dropbox.com/s/giy9ayxlvpoohiz/consonance-arch-2.0-alpha.11-SNAPSHOT.jar?dl=1 dest=/home/ubuntu/consonance-arch-{{ consonance_arch_version }}.jar
#get_url: url=https://seqwaremaven.oicr.on.ca/artifactory/simple/seqware-release/io/consonance/consonance-arch/{{ consonance_arch_version }}/consonance-arch-{{ consonance_arch_version }}.jar dest=/home/ubuntu/consonance-arch-{{ consonance_arch_version }}.jar

# The "endless" flag for the worker is not a true/false, it's "--endless" or "".
Expand All @@ -12,7 +13,7 @@
set_fact: endless_worker_flag=""
when: endless_worker is not defined or not endless_worker

- name: Get kill-worker script
- name: Get kill-worker scriptls
template: src=kill_worker_daemon.j2 dest=/home/ubuntu/kill_worker_daemon.sh

- name: Get run-worker script
Expand All @@ -37,62 +38,28 @@
when: seqware_use_custom_settings is defined and seqware_use_custom_settings

- name: Copy over keys/credentials for workers.
copy: src={{ item }} dest={{ item }} owner=ubuntu
copy: src={{ item }} dest=/root/.aws owner=root
with_fileglob:
- /home/ubuntu/.gnos/*
- /home/ubuntu/.aws/*
- /root/.aws/*

- name: Copy over dockstore credentials
copy: src={{ item }} dest=/root/.dockstore/ owner=root
with_fileglob:
- /root/.dockstore/*

- name: Install setuptools
raw: sudo pip install setuptools==36.5.0

- name: Install avro
pip: name=avro executable=pip2.7 version=1.8.1
raw: sudo pip install avro==1.8.1

- name: Install schema-salad
pip: name=schema-salad executable=pip2.7 version=1.14.20160708181155
raw: sudo pip install schema-salad==2.6.20170806163416

- name: Install cwltool
pip: name=cwltool executable=pip2.7 version=1.0.20160712154127

- name: Copy over patched job files
copy: src=roles/consonance/files/job_new.py dest=/usr/local/lib/python2.7/dist-packages/cwltool/job.py owner=root

- name: Copy over patched process files
copy: src=roles/consonance/files/process_new.py dest=/usr/local/lib/python2.7/dist-packages/cwltool/process.py owner=root

- name: Copy over patched main files
copy: src=roles/consonance/files/main_new.py dest=/usr/local/lib/python2.7/dist-packages/cwltool/main.py owner=root

- name: Delete compiled job files
command: rm -f /usr/local/lib/python2.7/dist-packages/cwltool/job.pyc

- name: Delete compiled process files
command: rm -f /usr/local/lib/python2.7/dist-packages/cwltool/process.pyc

- name: Delete compiled main files
command: rm -f /usr/local/lib/python2.7/dist-packages/cwltool/main.pyc

# install dcc-storage

#- name: Create required directory
# become_user: root
# file: path=/icgc/dcc-storage/ owner=ubuntu state=directory
#
#- name: Create working directory
# become_user: root
# file: path=/icgc/dcc-storage/archive owner=ubuntu state=directory
#
#- name: Get file
# get_url: url=https://seqwaremaven.oicr.on.ca/artifactory/dcc-release/org/icgc/dcc/dcc-storage-client/{{ dcc_storage_version }}/dcc-storage-client-{{ dcc_storage_version }}-dist.tar.gz dest=/icgc/dcc-storage/archive
#
#- name: Unarchive the dcc tool
# unarchive: src=/icgc/dcc-storage/archive/dcc-storage-client-{{ dcc_storage_version }}-dist.tar.gz dest=/icgc/dcc-storage/archive copy=no
#
#- name: Copy files extracted files into correct location
# shell: creates=/icgc/dcc-storage/bin/dcc-storage-client mv /icgc/dcc-storage/archive/dcc-storage-client-{{ dcc_storage_version }}/* /icgc/dcc-storage/
#
#- name: Template shell script
# template: src=dcc-storage-client.j2 dest=/icgc/dcc-storage/bin/dcc-storage-client owner=ubuntu
raw: sudo pip install cwltool==1.0.20170217172322

# end dcc-storage

- name: Run worker as daemon
become_user: root
shell: chdir=/home/ubuntu nohup bash /home/ubuntu/run_worker_daemon.sh &
11 changes: 6 additions & 5 deletions roles/containers/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
with_dict: s3_containers | default({})
when: s3_containers is defined

- name: Remove AWS config and credentials, now that objects have been downloaded.
file: path={{ item }} state=absent
when: s3_containers is defined
with_fileglob:
- /home/ubuntu/.aws/*
#TODO: We do not want to get rid of the credentials so that aws can upload outputs
#- name: Remove AWS config and credentials, now that objects have been downloaded.
# file: path={{ item }} state=absent
# when: s3_containers is defined
# with_fileglob:
# - /home/ubuntu/.aws/*

- name: Load Private images
shell: docker load -i /home/ubuntu/downloads/{{ item.value.name }}.tar
Expand Down
11 changes: 6 additions & 5 deletions roles/workflow/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
retries: 5
delay: 15

- name: Remove AWS config, now that objects have been downloaded.
file: path={{ item }} state=absent
when: s3_containers is defined or s3_workflows is defined
with_fileglob:
- /home/ubuntu/.aws/*
#TODO: Require docstore to upload outputs back to aws.
#- name: Remove AWS config, now that objects have been downloaded.
# file: path={{ item }} state=absent
# when: s3_containers is defined or s3_workflows is defined
# with_fileglob:
# - /home/ubuntu/.aws/*

# TODO: Some of these plays are copy-pasted (ugh!) with different hashes. Need to find a more elegant way to do this.

Expand Down