{"__v":0,"_id":"587cf69680491d190042ae5b","category":{"__v":0,"_id":"5735936aafab441700723a54","project":"5735936aafab441700723a50","version":"5735936aafab441700723a53","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-13T08:42:18.644Z","from_sync":false,"order":0,"slug":"documentation","title":"Get Started"},"project":"5735936aafab441700723a50","user":"573592b84b0ab120000b7d44","version":{"__v":12,"_id":"5735936aafab441700723a53","project":"5735936aafab441700723a50","createdAt":"2016-05-13T08:42:18.615Z","releaseDate":"2016-05-13T08:42:18.615Z","categories":["5735936aafab441700723a54","5735a32931a73b1700887c94","5735b55beceb872200abbc6c","5735b56eb667601700d3bd6f","5735b9ba4b0ab120000b7dd4","5735b9c94b0ab120000b7dd5","5735cb131f16241700c8a0f7","5735e5c4e4824c3400aa1f21","5735e5d9e4824c3400aa1f23","5735e5f2ec67f6290013ac72","573ecfe0804f901700a9dfc7","573f276c7eeb8b190094ca7d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-16T16:36:38.700Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Having just released [Lepbase v4](http://lepbase.org/lepbase-v4/), we're actively working on reorganising all our code and documentation and testing for/fixing any bugs. If you would like to set up your own Lepbase-style [GenomeHub](http://genomehubs.org) then you may like to try out the [tutorials](http://genomehubs.org/documentation/mirror-setup-part-i/) on genomehubs.org.\",\n  \"title\": \"Work in Progress\"\n}\n[/block]\nDockerised setup allows you to set up a complete site like [lepbase](http://ensembl.lepbase.org), including blast and downloads services using a set of five [Docker](http://docker.com) containers. Lepbase-specific Docker images are available at [hub.docker.com/u/lepbase](http://hub.docker.com/u/lepbase)\n\nA set of slides from a [presentation at PAG XXV](https://docs.google.com/presentation/d/1h3pF5ZY4Z1FGbQZ_C1segJiqyGVG9FGxOXZfL5NPmA8/edit?usp=sharing) describing this setup is available, which may be useful to fill in the gaps in this draft documentation.\n\nFor the example commands that follow, a straightforward directory structure is used to simplify versioning and backup, with subdirectories for most components containing configuration and data files.\n```\nlepbase/\n├── v4\n│   ├── blast\n│   │   ├── blastdbs\n│   │   └── conf\n│   ├── download\n│   │   ├── conf\n│   │   └── data\n│   ├── ensembl\n│   │   ├── conf\n│   │   └── logs\n│   └── import\n│       ├── conf\n│       └── data\n└── mysql\n```\nThe main exception is the `ensembl` directory, used for the EasyMirror docker container, which lacks a data subdirectory as it is linked to the mysql database container when used.\n\n## mySQL\n```\ndocker run -d \\\n           --name lb-mysql \\\n           -v ~/lepbase/mysql:/var/lib/mysql \\\n           -e MYSQL_RANDOM_ROOT_PASSWORD=yes \\\n           -e MYSQL_ROOT_HOST='172.17.0.0/255.255.0.0' \\\n           mysql/mysql-server:5.5\n\n# run a container\n           # call it lb-mysql\n           # mount the mySQL directory\n           # set environment variables\n           # using this mysql container image\n```\nThen update the root password using `docker exec -it lb-mysql bash` and logging in to mysql using the `GENERATED_ROOT_PASSWORD` which can be found by running `docker logs lb-mysql`\n\n## EasyMirror\n\n```\nnano ~/lepbase/v4/ensembl/conf/database.ini\n\n# set passwords for database users\n\n# specify Ensembl/EnsemblGenomes databases to download and \n  host locally (DB_HOST should be lb-mysql)\n```\n\n```\nnano /home/ubuntu/lepbase/v4/ensembl/conf/setup.ini\n\n# specify database connection settings\n\n# specify Ensembl plugins to use\n\n# specify species/comparative databases to use\n```\n\n```\ndocker run -d \\\n           --name lb-ensembl \\\n           -v ~/lepbase/v4/ensembl/conf:/ensembl/conf \\\n           -v ~/lepbase/v4/ensembl/logs:/ensembl/logs \\\n           --link lb-mysql:mysql/mysql-server \\\n           -p 8011:8080 \\\n          lepbase/easy-mirror\n\n# run a container\n           # call it lb-ensembl\n           # mount conf and logs directories\n           # link to the lb-mysql container\n           # map port for the website\n           # using the lepbase easy-mirror container image\n```\n\n## EasyImport\n\nEasyImport is used to export files and index databases when setting up a mirror site. To use for new data import, additional flags will be required.\n\n```\nnano ~/lepbase/v4/import/conf/hmel2_core_32_85_1.ini\n\n# specify database connection settings\n```\n\n```\ndocker run -d \\\n           --name lb-import-hmel2 \\\n           --link lb-mysql:mysql/mysql-server \\\n           -v ~/lepbase/v4/import/conf:/import/conf \\\n           -v ~/lepbase/v4/import/data:/import/data \\\n           -v ~/lepbase/v4/download/data:/import/download \\\n           -v ~/lepbase/v4/blast/blastdbs:/import/blast \\\n           -e DATABASE=hmel2_core_32_85_1 \\\n           -e FLAGS=\"-e -j -i\" \\\n           lepbase/easy-import\n\n# run a container\n           # call it lb-import-hmel2\n           # link to the lb-mysql container\n           # mount some directories\n           # set some environment variables\n           # using the lepbase easy-import container image\n```\n\n## Downloads\n\n```\ndocker run -d \\\n           --name lb-download \\\n           -v ~/lepbase/v4/download/conf:/conf \\\n           -v ~/lepbase/v4/download/data:/var/www/v4 \\\n           -p 8012:80 \\\n           lepbase/h5ai\n\n# run a container\n           # call it lb-download\n           # mount some directories\n           # map the port\n           # using the lepbase h5ai image\n```\n\n## BLAST\n\n```\ndocker run -d \\\n           --name lb-blast \\\n           -v ~/lepbase/v4/blast/conf:/conf \\\n           -v ~/lepbase/v4/blast/blastdbs:/dbs \\\n           -p 8013:4567 \\\n           lepbase/sequenceserver\n\n# run a container\n           # call it lb-blast\n           # mount some directories\n           # map the port\n           # using the lepbase sequenceserver image\n```","excerpt":"Making it even easier to set up a custom Ensembl","slug":"dockerised-setup","type":"basic","title":"Dockerised setup"}

Dockerised setup

Making it even easier to set up a custom Ensembl

[block:callout] { "type": "info", "body": "Having just released [Lepbase v4](http://lepbase.org/lepbase-v4/), we're actively working on reorganising all our code and documentation and testing for/fixing any bugs. If you would like to set up your own Lepbase-style [GenomeHub](http://genomehubs.org) then you may like to try out the [tutorials](http://genomehubs.org/documentation/mirror-setup-part-i/) on genomehubs.org.", "title": "Work in Progress" } [/block] Dockerised setup allows you to set up a complete site like [lepbase](http://ensembl.lepbase.org), including blast and downloads services using a set of five [Docker](http://docker.com) containers. Lepbase-specific Docker images are available at [hub.docker.com/u/lepbase](http://hub.docker.com/u/lepbase) A set of slides from a [presentation at PAG XXV](https://docs.google.com/presentation/d/1h3pF5ZY4Z1FGbQZ_C1segJiqyGVG9FGxOXZfL5NPmA8/edit?usp=sharing) describing this setup is available, which may be useful to fill in the gaps in this draft documentation. For the example commands that follow, a straightforward directory structure is used to simplify versioning and backup, with subdirectories for most components containing configuration and data files. ``` lepbase/ ├── v4 │ ├── blast │ │ ├── blastdbs │ │ └── conf │ ├── download │ │ ├── conf │ │ └── data │ ├── ensembl │ │ ├── conf │ │ └── logs │ └── import │ ├── conf │ └── data └── mysql ``` The main exception is the `ensembl` directory, used for the EasyMirror docker container, which lacks a data subdirectory as it is linked to the mysql database container when used. ## mySQL ``` docker run -d \ --name lb-mysql \ -v ~/lepbase/mysql:/var/lib/mysql \ -e MYSQL_RANDOM_ROOT_PASSWORD=yes \ -e MYSQL_ROOT_HOST='172.17.0.0/255.255.0.0' \ mysql/mysql-server:5.5 # run a container # call it lb-mysql # mount the mySQL directory # set environment variables # using this mysql container image ``` Then update the root password using `docker exec -it lb-mysql bash` and logging in to mysql using the `GENERATED_ROOT_PASSWORD` which can be found by running `docker logs lb-mysql` ## EasyMirror ``` nano ~/lepbase/v4/ensembl/conf/database.ini # set passwords for database users # specify Ensembl/EnsemblGenomes databases to download and host locally (DB_HOST should be lb-mysql) ``` ``` nano /home/ubuntu/lepbase/v4/ensembl/conf/setup.ini # specify database connection settings # specify Ensembl plugins to use # specify species/comparative databases to use ``` ``` docker run -d \ --name lb-ensembl \ -v ~/lepbase/v4/ensembl/conf:/ensembl/conf \ -v ~/lepbase/v4/ensembl/logs:/ensembl/logs \ --link lb-mysql:mysql/mysql-server \ -p 8011:8080 \ lepbase/easy-mirror # run a container # call it lb-ensembl # mount conf and logs directories # link to the lb-mysql container # map port for the website # using the lepbase easy-mirror container image ``` ## EasyImport EasyImport is used to export files and index databases when setting up a mirror site. To use for new data import, additional flags will be required. ``` nano ~/lepbase/v4/import/conf/hmel2_core_32_85_1.ini # specify database connection settings ``` ``` docker run -d \ --name lb-import-hmel2 \ --link lb-mysql:mysql/mysql-server \ -v ~/lepbase/v4/import/conf:/import/conf \ -v ~/lepbase/v4/import/data:/import/data \ -v ~/lepbase/v4/download/data:/import/download \ -v ~/lepbase/v4/blast/blastdbs:/import/blast \ -e DATABASE=hmel2_core_32_85_1 \ -e FLAGS="-e -j -i" \ lepbase/easy-import # run a container # call it lb-import-hmel2 # link to the lb-mysql container # mount some directories # set some environment variables # using the lepbase easy-import container image ``` ## Downloads ``` docker run -d \ --name lb-download \ -v ~/lepbase/v4/download/conf:/conf \ -v ~/lepbase/v4/download/data:/var/www/v4 \ -p 8012:80 \ lepbase/h5ai # run a container # call it lb-download # mount some directories # map the port # using the lepbase h5ai image ``` ## BLAST ``` docker run -d \ --name lb-blast \ -v ~/lepbase/v4/blast/conf:/conf \ -v ~/lepbase/v4/blast/blastdbs:/dbs \ -p 8013:4567 \ lepbase/sequenceserver # run a container # call it lb-blast # mount some directories # map the port # using the lepbase sequenceserver image ```