-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- make use this direct link version
- Docker 17.06 CE or later. You can use this link to download a package according to your machine or for ubuntu 16.04, or you can use this direct link.
- docker-compose
- Make a directory
philuat your desired place and navigate to this directory in terminal. - Set environment variable
OPENEDX_RELEASE=ironwood.master - Set environment variable
DEVSTACK_WORKSPACE=/path/to/philu - You can temporarily set environment variables using:
export OPENEDX_RELEASE=ironwood.masterexport DEVSTACK_WORKSPACE=/path/to/philu
In-order to set variable permanently refer to this answer on stackoverflow. Using this method might require logging in again (or reboot) for the variables to set up or
-
For Mac:
- Open Terminal
- Run
touch ~/.bash_profile; open ~/.bash_profile - In TextEdit, add
export OPENEDX_RELEASE=ironwood.masterexport DEVSTACK_WORKSPACE=/path/to/philu
- Save the .bash_profile file and Quit (Command + Q) Text Edit.
- Run source ~/.bash_profile
- Execute
git clone git@github.com:philanthropy-u/devstack.git - Execute
cd devstack - Execute
make dev.clone. This command will clone the following repositories inphilu. Navigate back tophiluand make sure you have these repositories available there:
NOTE: Please pay attention, while cloning these repositories you might be asked for your github credentials a few times. If any of the repositories is missing, clone it manually inside the
philudirectory.
-
Starting at
philu, navigate toNodeBBand create a directoryplugins(philu/NodeBB/plugins) inside it. -
Copy
plugin_clone.shandlink_cloned_plugins.shfrom devstack tophilu/NodeBB/plugins/and executeplugin_clone.sh. This will clone the following repositories inphilu/NodeBB/plugins/:
- Back at
philu, make a new directory namedsrc, and movephilu-edx-themetophilu/src
This is what your directory structure should look like now:
| philu
|---- course-discovery
|---- credentials
|---- devstack
|---- edx-platform
|---- NodeBB
|-------- plugins
|------------nodebb-plugin-custom-join
|------------nodebb-plugin-philu-badging
|------------nodebb-plugin-s3-uploads
|------------nodebb-plugin-session-sharing
|------------nodebb-plugin-write-api
|------------nodebb-theme-philu-community
|---- src
|-------- philu-edx-theme
NOTE: This step will download a few docker images from
philanthropyudev/philudocker hub repository and will take a long time depending on your internet speed.
- Obtain credentials for the
philanthropyudev/philurepo on Docker hub from a colleague - Execute
docker loginand provide the obtained username and password from step 1
NOTE: If you get this error:
Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/auth: dial unix /var/run/docker.sock: connect: permission denied, try executingsudo chmod 666 /var/run/docker.sock
- Revert this PR in
philu/edx-platform. Also, Comment following lines inedx-platform/lms/djangoapps/commerce/migrations/0001_data__add_ecommerce_service_user.py
dependencies = [ ('onboarding', '0003_historicaluser'), ]
3A. Replace ('student', '0019_auto_20181221_0540') to ('student', '0017_auto_20171219_0925') in edx-platform/common/djangoapps/student/migrations/0020_auto_20200618_0157.py
-
Navigate to
philu/devstack. -
Run provision command:
make -f Makefile dev.provision.run -
Move to the next step if the provision runs successfully, otherwise seek immediate help from a colleague.
-
Ask for the
config.jsonfile from a colleague and place it inphilu/NodeBB. -
Execute the following commands, maybe in parallel:
make dev.up.lmsmake dev.up.nodebb
-
After the images have been pulled from the repo, docker will make a container out of these images and try to run it.
-
Execute
make mongo-shell -
Inside the mongo-shell, execute
./restoredb.sh, andexitout of the shell -
Execute
make nodebb-shell. Inside the shell navigate topluginsdirectory then run command./link_cloned_plugins.sh. Exit out of the shell. -
Shut down the
nodebbcontainer (already running as a result of step 3) usingCTRL+C -
Execute
make dev.up.nodebb -
Execute
make dev.up.studio -
Insert the following in your host machines
/etc/hostsfile:127.0.0.1 local.philanthropyu.org -
Make sure that the IP in lms, cms, and nodebb
extra_hostsinside thephilu/devstack/docker-compose.ymlmatches the result of this command
docker network inspect -f '{{with index .IPAM.Config 0}} {{json .Gateway}} {{end}}' devstack_default | tr -d '"'
If it does not match, update the IP values against each of the extra_hosts
- Congratulations! You now have the development environment all setup! If you encountered any error, please ask one of your colleague for help.
Follow this link for PyCharm Integration