I recommend using direnv
over the edxenv
bash script that I created above. It is easy to setup and use plus it can do more. I’ve created several files that I used in my setup here https://gist.github.com/ztraboo/d1e9cad3e9a9c03e75f2792922f887f2.
After direnv
is configured I ran these steps to make it work. Thanks to @arbrandes for recommending this directory environment application. Using zsh
from Mac OS X Catalina but you may prefer bash
command.
ztraboo-macbookpro:devstack.ironwood ztraboo$ zsh
direnv: loading ~/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood/.envrc
direnv: export +DEVSTACK_WORKSPACE +OPENEDX_RELEASE +VIRTUAL_ENV ~PATH
(venv)ztraboo@ztraboo-macbookpro devstack.ironwood % which python
/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood/devstack/venv/bin/python
(venv)ztraboo@ztraboo-macbookpro devstack.ironwood % printenv
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/kq/gmqwcr_n1jj6pxpnhvvlh9g00000gn/T/
USER=ztraboo
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.FfC6udK6kq/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood/devstack/venv/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:~/Library/Python/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
TERMINAL_EMULATOR=JetBrains-JediTerm
PWD=/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=2
HOME=/Users/ztraboo
LOGNAME=ztraboo
LC_CTYPE=en_US.UTF-8
OLDPWD=/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood
DIRENV_DIFF=eJzcU09zqjoU_y5Zq5HKQ2TmLXiAgAoiIDDdMPyJomiCSUSw0372N22n3pk7XfZu7u53Tk4y5_cnL6ABygvw1NACCoCrQ04z2sM5zc7oRmjNoNfziuDR7qsDI0TZgWAGJyMJ5gesvD2ufc4-DuCVUXgiRXb6VX6AR8U-EPttmFUZRbAkHCOuvMHRJ4KckBNTvtvRIZh8t6F2pRRhDjVyPme4ZOB1APA7X92IglDVlmm89peBp2rGO_stQ5TBO6dZTgjUUQuN8lpkHMWE1jtCCwR91BAGSYPwEJUdLFHLeFbUowMl-EZICQZAt33DjVLd9oEChj_7aKyGmmUEQAFo0Y3v9Xwt3dWN6mpTtHjasWiMOfWGSWBXC2ejsVydGffo0s_9oysJ6mQxnu2rtTxLL411cqaXLf6v6ONGdo36Oc7F8M4KOWoC0qFYlrtAW0zJrUrEDWfp7cj20zw-FVcxEdHEPLp6yGvu46TZ5w6bXora2SY8LWzvKnjmUJjnkbD2l8lM2BV01gdBu912tpbYwZNVLiV5Lxx0y3ICs3J1_RlXsmhKw-dNq13JsRCabtHxmWOuL3YbVmJv_nM5WpKJxu20NzNLkidU1FVVT1MxX8W5_S8YgLVnuIaepL6xMtTg3dEvAUfnjHFEweAR9B9w5dGBLcLtZ6b_9v8zAJHth1t1lRpu9Ed0BK-v_wcAAP__noycCw==
DIRENV_WATCHES=eJx0zkFO6zAQANC7eJ2fsV0ntrP-XSIhJMQCsbA9EzVqyFRjN61A3J09ghO89_qpHlM7qUnBcyWp8NEkZWb4Tzsc8VpSoxeW88xSCJ7owhX4Qts_wjsg7bWlcu4X4e3GjNDTtktRnXpgbMs7qckMUXt_cIPu1PG-1FbV1ORKX91fcr9ySSvUUxICXIS2HdK68g1iDHHMSGhNDDZnh84G6-ZQvCuojc1pxJxt9MGOqIvTh4yG5qjH6Ge0v7yGaH683r4DAAD__4bLWbI=
DEVSTACK_WORKSPACE=/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood
DIRENV_DIR=-/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood
OPENEDX_RELEASE=ironwood.master
VIRTUAL_ENV=/Users/ztraboo/Dev/EducateWorkforce/Repos/open-edx/devstack.ironwood/devstack/venv
_=/usr/bin/printenv
Once the environment is setup you can just go to the ./devstack
directory and launch make dev.up
and your release specific containers will launch.
(venv)ztraboo@ztraboo-macbookpro devstack.ironwood % cd devstack
(venv)ztraboo@ztraboo-macbookpro devstack % make dev.up
bash -c 'docker-compose -f docker-compose.yml -f docker-compose-host.yml up -d'
Starting edx.devstack-ironwood.master.elasticsearch ... done
Starting edx.devstack-ironwood.master.mysql ... done
Starting edx.devstack-ironwood.master.memcached ... done
Starting edx.devstack-ironwood.master.mongo ... done
Starting edx.devstack-ironwood.master.firefox ... done
Starting edx.devstack-ironwood.master.devpi ... done
Starting edx.devstack-ironwood.master.gradebook ... done
Starting edx.devstack-ironwood.master.chrome ... done
Starting edx.devstack-ironwood.master.credentials ... done
Starting edx.devstack-ironwood.master.ecommerce ... done
Starting edx.devstack-ironwood.master.discovery ... done
Starting edx.devstack-ironwood.master.forum ... done
Starting edx.devstack-ironwood.master.lms ... done
Starting edx.devstack-ironwood.master.studio ... done
Starting edx.devstack-ironwood.master.edx_notes_api ... done
bash ./programs/provision.sh cache >/dev/null