Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #97 from edx/sofiya/docker
Browse files Browse the repository at this point in the history
MakeFile and docker compose file to run VEDA locally.
  • Loading branch information
ssemenova committed Apr 10, 2018
2 parents 05c4822 + 5ab2390 commit 1ad91ee
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
http-shell:
docker exec -it veda.http /bin/bash

up:
docker-compose up -d

down:
docker stop veda.rabbitmq veda.http veda.encode veda.pipeline veda.deliver
docker rm veda.rabbitmq veda.http veda.encode veda.pipeline veda.deliver
28 changes: 28 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Running VEDA locally using docker

This directory is the current state of the work to docker-ize VEDA so it can be run locally.

## Setup to run

The [edx-video-pipeline](http://github.com/edx/edx-video-pipeline), [edx-video-worker](github.com/edx/edx-video-worker), and [v_videocompile](http://github.com/yro/v_videocompile) should all be downloaded in one directory and an environment variable ```VEDA_WORKSPACE``` set to point to the directory:

```
export VEDA_WORKSPACE=/Users/sofiyasemenova/veda
```

### Images

The images can be found on docker hub:
- [Http](https://hub.docker.com/r/ssemenova/veda-http/)
- [Pipeline](https://hub.docker.com/r/ssemenova/veda-pipeline/)
- [Deliver](https://hub.docker.com/r/ssemenova/veda-deliver/)
- [Encode](https://hub.docker.com/r/ssemenova/veda-encode/)
- [Rabbit MQ](https://hub.docker.com/r/ssemenova/veda-rabbitmq/)

## Work to be done

This is probably not an exhaustive list:

- The http endpoint works, but work needs to be done to connect all the containers together and have them speak over local ports instead of calling ec2 containers.
- The database settings file contains the right database configuration, but we need to actually make sure the database works and is set up locally.
- I have done very little with the Rabbit MQ container. The image is based off the base veda docker image, but has nothing rabbit-specific. I'm not sure about what work needs to be done here.
41 changes: 41 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: "0.1"

services:
rabbitmq:
image: "veda-rabbitmq"
container_name: "veda.rabbitmq"
volumes:
- ${VEDA_WORKSPACE}/rabbitmq:/rabbitmq
tty: true

pipeline:
image: "veda-pipeline"
container_name: "veda.pipeline"
volumes:
- ${VEDA_WORKSPACE}/edx-video-pipeline:/edx-video-pipeline
tty: true

http:
image: "veda-http"
command: bash -c 'cd /edx-video-pipeline/; python manage.py runserver 0.0.0.0:8000 --settings=VEDA.settings.local'
container_name: "veda.http"
volumes:
- ${VEDA_WORKSPACE}/edx-video-pipeline:/edx-video-pipeline
ports:
- "8000:8000"
tty: true
stdin_open: true

encode:
image: "veda-encode"
container_name: "veda.encode"
volumes:
- ${VEDA_WORKSPACE}/edx-video-worker:/edx-video-worker
tty: true

deliver:
image: "veda-deliver"
container_name: "veda.deliver"
volumes:
- ${VEDA_WORKSPACE}/edx-video-pipeline:/edx-video-worker
tty: true
8 changes: 8 additions & 0 deletions instance_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# ---
# Database information
# ---
# PRODUCTION
DATABASES:
default:
ENGINE: django.db.backends.sqlite3
Expand All @@ -13,6 +14,13 @@ FERNET_KEYS: ["a_random_string"]

debug: True

# LOCAL DOCKER
# default:
# ENGINE: 'django.db.backends.sqlite3'
# NAME: 'veda-docker'
# HOST: 'localhost'
# PORT: 3306

# Frontend S3 Auth
veda_secret_access_key: A_RANDOM_STRING
veda_access_key_id: A_RANDOM_STRING
Expand Down

0 comments on commit 1ad91ee

Please sign in to comment.