Hi,
I am a new Open edX developer (I recently joined OpenCraft), and I tried edx with docker (
https://github.com/edx/devstack), and I'm surprised at how easy it was to get it running. Only bad thing: the setup is slow (although automatic).
Instructions:
1. First you need to install docker 17.06. I use Devuan GNU/Linux (Debian without systemd) and it was easier than expected: uninstall old docker, download a .deb from
https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/, dpkg -i, and it worked.
2. Install the command docker-compose, by following
https://docs.docker.com/compose/install/#alternative-install-options (e.g. by pip)
3. Clone from
https://github.com/edx/devstack4. Follow the instructions there (make dev.clone, make dev.provision). The provisioning command takes a long time (hours), but it's all automatic. This process is very lean on memory
5. Start the services (make dev.up). Automatical
6. Access URLs, e.g. studio is at
http://localhost:18010/, e-commerce at
http://localhost:18130/dashboard/, etc. Use user described in admin
Good from docker-edx:
- everything straight-forward, all instructions work, you just need to wait
- very lean on memory (RAM) all the time, even when it's building lots of stuff. Runs very fast and is usable with 4 Gb, with only occasional hangs
- scalable configuration, very easy to read and understand. The repository
https://github.com/edx/devstack itself is made of small and simple configuration files (starting with docker-compose.yml). You always understand what docker is doing and why. You get the power of docker: separate container, container inheritance, …
- simple to debug, e.g. to get a log for LMS: docker-compose logs lms
- you get everything included (also e-commerce) and already running from the start, each service in a URL. And a default user for each service
- super-fast start and stop of all containers („make dev.up“, „make down“), more than vagrant
Bad from docker-edx:
- the first step („make provision“) is very slow, much more than with vagrant, it took around 1'5 hours in my case. It's because it runs every migration for every project, compiles assets, … but also because it includes more components (e-commerce, …) It seems that with Vagrant, you download everything wholly baked, but with docker you build it. Luckily it's just one time, and it's worth the wait. There are also workaround described in the README (using DB dumps instead of migrating)
- I interrupted the provisioning step and had to start it from the beginning.
- I saw some strange error messages, like „No space on disk“ when I actually had enough, but they didn't prevent services from running. And some of the common errors are covered in the README
So from what I have tested: the provisioning configuration is very comfortable to read, write, and understand; you can keep the configuration of all services in version control… It was very instructive and much faster and complete than vagrant. And things work. Only bad thing is the waiting time the first time.
I attach an example of what you get when you start all services:
: dc; /w/devstack ; make dev.up
docker-compose -f docker-compose.yml -f docker-compose-host.yml up -d
Creating network "devstack_default" with the default driver
Creating
edx.devstack.chrome ...
Creating edx.devstack.memcached ...
Creating edx.devstack.firefox ...
Creating edx.devstack.mongo ...
Creating edx.devstack.memcached
Creating edx.devstack.mysql ...
Creating edx.devstack.elasticsearch ...
Creating
edx.devstack.chromeCreating edx.devstack.mongo
Creating edx.devstack.firefox
Creating edx.devstack.mysql
Creating edx.devstack.mongo ... done
Creating edx.devstack.studio ...
Creating edx.devstack.credentials ...
Creating edx.devstack.lms ...
Creating edx.devstack.ecommerce ...
Creating edx.devstack.elasticsearch ... done
Creating edx.devstack.discovery ...
Creating edx.devstack.ecommerce
Creating edx.devstack.discovery
Creating edx.devstack.lms
Creating edx.devstack.studio ... done
Note that it builds what it finds in ../edx-platform, so if you put there your own fork with modifications, it will build it in the same way.
I still didn’t try deploying themes, etc.
So with this I recommend more people to use Vagrant for development. It was simple enough for an openedx beginner, very instructive, and also the only comfortable way to run several openedx components in a laptop with just 4 Gb of RAM; at the same time it simplifies configuration. We need more people using it.
Greetings,
Daniel Clemente Laboreo
@
OpenCraft