bgruening / docker-galaxy-stable

:whale::bar_chart::books: Docker Images tracking the stable Galaxy releases.
http://bgruening.github.io/docker-galaxy-stable
MIT License
224 stars 133 forks source link

'/galaxy-central/scripts/fetch_eggs.py': [Errno 2] No such file or directory #100

Closed mictadlo closed 8 years ago

mictadlo commented 8 years ago

Hello, I have tried to convert your Dockerfile to my Ubuntu/Mint 14.04 system with the below comands, but I have recieved the following error from ansible-playbook:

changed: [localhost]
__________________________________________________________
/ TASK: galaxyprojectdotorg.galaxyextras | Fetch DRMAA egg \
\ for Galaxy                                               /
----------------------------------------------------------
    \   ^__^
    \  (oo)\_______
    (__)\       )\/\
        ||----w |
        ||     ||

failed: [localhost] => {"changed": true, "cmd": "/home/galaxy/venv/bin/python /galaxy-central/scripts/fetch_eggs.py -e drmaa -c /etc/galaxy/galaxy.ini", "delta": "0:00:00.009963", "end": "2015-11-02 09:21:30.107698", "rc": 2, "start": "2015-11-02 09:21:30.097735", "warnings": []}
stderr: /home/galaxy/venv/bin/python: can't open file '/galaxy-central/scripts/fetch_eggs.py': [Errno 2] No such file or directory

FATAL: all hosts have already failed -- aborting
____________
< PLAY RECAP >
------------
    \   ^__^
    \  (oo)\_______
    (__)\       )\/\
        ||----w |
        ||     ||

      to retry, use: --limit @/root/provision.retry

localhost                  : ok=17   changed=16   unreachable=0    failed=1 

These are the following commands wich I did so far:

export DEBIAN_FRONTEND=noninteractive

apt-get -qq update && apt-get install --no-install-recommends -y apt-transport-https software-properties-common

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

add-apt-repository ppa:fkrull/deadsnakes && apt-get -qq update

apt-get purge -y software-properties-common

apt-get install --no-install-recommends -y autoconf automake build-essential gfortran cmake git-core libatlas-base-dev libblas-dev liblapack-dev openssl
apt-get install openjdk-7-jre-headless python-dev python2.6 python2.6-dev python-setuptools python-virtualenv zlib1g-dev libyaml-dev subversion python-dev pkg-config 

apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 

git clone --branch 1.2 https://github.com/samtools/htslib.git

git clone --branch 1.2 https://github.com/samtools/bcftools.git

apt-get install zlib1g-dev

make -C bcftools && cp bcftools/bcftools /usr/bin

rm -rf bcftools htslib

#----------------------

export GALAXY_RELEASE=dev
export GALAXY_REPO=https://github.com/galaxyproject/galaxy
export GALAXY_ROOT=/galaxy-central
export GALAXY_CONFIG_DIR=/etc/galaxy 

export GALAXY_CONFIG_FILE=$GALAXY_CONFIG_DIR/galaxy.ini
export GALAXY_CONFIG_JOB_CONFIG_FILE=$GALAXY_CONFIG_DIR/job_conf.xml
export GALAXY_CONFIG_JOB_METRICS_CONFIG_FILE=$GALAXY_CONFIG_DIR/job_metrics_conf.xml
export GALAXY_VIRTUALENV=/home/galaxy/venv
export GALAXY_USER=galaxy
export GALAXY_UID=1450
export GALAXY_GID=1450
export GALAXY_POSTGRES_UID=1550
export GALAXY_POSTGRES_GID=1550
export GALAXY_HOME=/home/galaxy
export GALAXY_DEFAULT_ADMIN_USER=admin@galaxy.org
export GALAXY_DEFAULT_ADMIN_PASSWORD=admin
export GALAXY_DEFAULT_ADMIN_KEY=admin
export EXPORT_DIR=/export 

# Create the postgres user before apt-get does (with the configured UID/GID) to facilitate sharing /export/postgresql with non-Linux hosts 
groupadd -r postgres -g $GALAXY_POSTGRES_GID
adduser --system --quiet --home /var/lib/postgresql --no-create-home --shell /bin/bash --gecos "" --uid $GALAXY_POSTGRES_UID --gid $GALAXY_POSTGRES_GID postgres

apt-get -qq update && apt-get install --no-install-recommends -y apt-transport-https software-properties-common
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
apt-add-repository -y ppa:ansible/ansible
apt-add-repository -y ppa:galaxyproject/nginx
apt-get update -qq && apt-get upgrade -y
apt-get install --no-install-recommends -y mercurial python-psycopg2 postgresql-9.3 sudo samtools python-virtualenv wget
apt-get install nginx-extras=1.4.6-1ubuntu3.3ppa1 nginx-common=1.4.6-1ubuntu3.3ppa1 uwsgi uwsgi-plugin-python supervisor lxc-docker-1.7.1 slurm-llnl slurm-llnl-torque libswitch-perl
apt-get install slurm-drmaa-dev proftpd proftpd-mod-pgsql libyaml-dev nodejs-legacy npm aufs-tools ansible
apt-get install nano nmap lynx vim curl python-pip python-gnuplot python-rpy2
apt-get purge -y software-properties-common
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

groupadd -r $GALAXY_USER -g $GALAXY_GID
useradd -u $GALAXY_UID -r -g $GALAXY_USER -d $GALAXY_HOME -c "Galaxy user" $GALAXY_USER 
mkdir $EXPORT_DIR $GALAXY_HOME && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_HOME $EXPORT_DIR 
gpasswd -a $GALAXY_USER docker

# Download latest stable release of Galaxy. 
mkdir $GALAXY_ROOT && wget -q -O - $GALAXY_REPO/archive/$GALAXY_RELEASE.tar.gz | tar xzf - --strip-components=1 -C $GALAXY_ROOT && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_ROOT

# TODO: ensure virtualenv as part of galaxy role 
su $GALAXY_USER -c "virtualenv $GALAXY_VIRTUALENV"
# Setup Galaxy configuration files. 
mkdir -p $GALAXY_CONFIG_DIR $GALAXY_CONFIG_DIR/web && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_CONFIG_DIR
su $GALAXY_USER -c "cp $GALAXY_ROOT/config/galaxy.ini.sample $GALAXY_CONFIG_FILE"
cp docker-galaxy-stable/galaxy/reports_wsgi.ini.sample $GALAXY_CONFIG_DIR/reports_wsgi.ini
cp docker-galaxy-stable/galaxy/htpasswd /etc/nginx/htpasswd
cp docker-galaxy-stable/galaxy/servers.ini $GALAXY_CONFIG_DIR/servers.ini
cat $GALAXY_CONFIG_DIR/servers.ini >> $GALAXY_CONFIG_FILE && rm $GALAXY_CONFIG_DIR/servers.ini

###### missing
mkdir -p /tmp/ansible/roles
cp -r ...
######
cp -r docker-galaxy-stable/galaxy/roles/ /tmp/ansible
cp docker-galaxy-stable/galaxy/provision.yml /tmp/ansible/provision.yml

ansible-playbook /tmp/ansible/provision.yml \
--extra-vars galaxy_user_name=$GALAXY_USER \
--extra-vars galaxy_config_file=$GALAXY_CONFIG_FILE \
--extra-vars galaxy_config_dir=$GALAXY_CONFIG_DIR \
--extra-vars galaxy_job_conf_path=$GALAXY_CONFIG_JOB_CONFIG_FILE \
--extra-vars galaxy_job_metrics_conf_path=$GALAXY_CONFIG_JOB_METRICS_CONFIG_FILE \
--extra-vars supervisor_manage_slurm="" \
--tags=galaxyextras -c local

What did I do wrong?

Thank you in advance.

Mic

bgruening commented 8 years ago

@mictadlo are you using the dev version of Galaxy? Or a stable one? I recommend unsing a stable release for now. The development version has some substantial changes in how Galaxy handles dependencies.

bgruening commented 8 years ago

@mictadlo any news here? Can we close this. Galaxy dev is expected to not work as @natefoo has changed the dependency handling and I need to catch up with all changes.

mictadlo commented 8 years ago

Stable one has worked. Thank you.

natefoo commented 8 years ago

@mictadlo I have created galaxyproject/ansible-galaxy-extras#16 to fix this.

bgruening commented 8 years ago

Many thanks @natefoo!