Commit ee83c2ec by Clinton Blackburn

Added Support for Docker Sync

Docker Sync will alleviate some of the filesystem issues on OS X.
parent 47e18029
...@@ -29,8 +29,11 @@ devstack.provision: ## Provision all services ...@@ -29,8 +29,11 @@ devstack.provision: ## Provision all services
devstack.reset: ## Remove all service containers devstack.reset: ## Remove all service containers
docker-compose down docker-compose down
devstack.start: ## Start all services devstack.start: ## Start all services (with host volumes)
docker-compose up docker-compose -f docker-compose.yml -f docker-compose-host.yml up
devstack.start.sync: ## Start all services (with docker-sync)
docker-sync-stack start
devstack.stop: ## Stop all services devstack.stop: ## Stop all services
docker-compose stop docker-compose stop
......
...@@ -42,7 +42,8 @@ configure Docker with a sufficient amount of resources. Our testing found that [ ...@@ -42,7 +42,8 @@ configure Docker with a sufficient amount of resources. Our testing found that [
$ make devstack.provision $ make devstack.provision
``` ```
3. Start the services. 3. Start the services. By default this command will use host directories for source code. This is known to be slow on
macOS. macOS users should follow the steps below for Docker Sync to avoid this performance hit.
``` ```
$ make devstack.start $ make devstack.start
...@@ -55,6 +56,25 @@ For example to access the Catalog/Course Discovery Service, you can run: ...@@ -55,6 +56,25 @@ For example to access the Catalog/Course Discovery Service, you can run:
$ make devstack.open.discovery $ make devstack.open.discovery
``` ```
### Docker Sync
Docker for Mac has known filesystem issues that significantly decrease performance. In order to mitigate these issues,
we use [Docker Sync](https://github.com/EugenMayer/docker-sync/wiki) to synchronize file data from the host machine to
the containers. Follow the steps below to setup Docker Sync.
1. Ensure all containers are stopped.
```
$ make devstack.stop
```
2. Follow the installation instructions at https://github.com/EugenMayer/docker-sync/wiki to install Docker Sync.
3. Run Docker Sync and devstack.
```
$ make devstack.start.sync
```
## Usernames and Passwords ## Usernames and Passwords
The provisioning script creates a Django superuser for every service. The provisioning script creates a Django superuser for every service.
......
version: "2.1"
services:
credentials:
volumes:
- ../credentials:/edx/app/credentials/credentials
discovery:
volumes:
- ../course-discovery:/edx/app/discovery/discovery
ecommerce:
volumes:
- ../ecommerce:/edx/app/ecommerce/ecommerce
edxapp:
volumes:
- ../edx-platform:/edx/app/edxapp/edx-platform
version: "2.1"
services:
credentials:
volumes:
- credentials-sync:/edx/app/credentials/credentials:rw
discovery:
volumes:
- discovery-sync:/edx/app/discovery/discovery:rw
ecommerce:
volumes:
- ecommerce-sync:/edx/app/ecommerce/ecommerce:rw
edxapp:
volumes:
- edxapp-sync:/edx/app/edxapp/edx-platform:rw
volumes:
credentials-sync:
external: true
discovery-sync:
external: true
ecommerce-sync:
external: true
edxapp-sync:
external: true
...@@ -66,8 +66,6 @@ services: ...@@ -66,8 +66,6 @@ services:
image: edxops/credentials:devstack image: edxops/credentials:devstack
ports: ports:
- "18150:18150" - "18150:18150"
volumes:
- ../credentials:/edx/app/credentials/credentials
discovery: discovery:
command: /edx/app/discovery/devstack.sh start command: /edx/app/discovery/devstack.sh start
...@@ -82,8 +80,6 @@ services: ...@@ -82,8 +80,6 @@ services:
image: edxops/discovery:devstack image: edxops/discovery:devstack
ports: ports:
- "18381:18381" - "18381:18381"
volumes:
- ../course-discovery:/edx/app/discovery/discovery
ecommerce: ecommerce:
command: /edx/app/ecommerce/devstack.sh start command: /edx/app/ecommerce/devstack.sh start
...@@ -97,8 +93,6 @@ services: ...@@ -97,8 +93,6 @@ services:
image: edxops/ecommerce:devstack image: edxops/ecommerce:devstack
ports: ports:
- "18130:18130" - "18130:18130"
volumes:
- ../ecommerce:/edx/app/ecommerce/ecommerce
edxapp: edxapp:
command: /edx/app/edxapp/devstack.sh start command: /edx/app/edxapp/devstack.sh start
...@@ -111,8 +105,6 @@ services: ...@@ -111,8 +105,6 @@ services:
ports: ports:
- "18000:18000" - "18000:18000"
- "18010:18010" - "18010:18010"
volumes:
- ../edx-platform:/edx/app/edxapp/edx-platform
volumes: volumes:
elasticsearch_data: elasticsearch_data:
......
version: "2"
options:
compose-file-path: 'docker-compose.yml'
compose-dev-file-path: 'docker-compose-sync.yml'
syncs:
credentials-sync:
src: '../credentials/'
dest: '/edx/app/credentials/credentials'
sync_args: '-v --copy-links --hard-links'
sync_host_ip: 'localhost'
sync_host_port: 10872
sync_strategy: 'rsync'
discovery-sync:
src: '../course-discovery/'
dest: '/edx/app/discovery/discovery'
sync_args: '-v --copy-links --hard-links'
sync_host_ip: 'localhost'
sync_host_port: 10873
sync_strategy: 'rsync'
ecommerce-sync:
src: '../ecommerce/'
dest: '/edx/app/ecommerce/ecommerce'
sync_args: '-v --copy-links --hard-links'
sync_host_ip: 'localhost'
sync_host_port: 10874
sync_strategy: 'rsync'
edxapp-sync:
src: '../edx-platform/'
dest: '/edx/app/edxapp/edx-platform'
sync_args: '-v --copy-links --hard-links'
sync_host_ip: 'localhost'
sync_host_port: 10875
sync_strategy: 'rsync'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment