-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quickstart development instructions (#2)
* feat: add tutor devstack quickstart * Remove tvm dependancy --------- Co-authored-by: Salah Alomari <[email protected]>
- Loading branch information
1 parent
fa98ec0
commit dc42625
Showing
6 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,6 @@ When the testing account is used, | |
Development and Testing | ||
####################### | ||
|
||
TBD: Add devstck and Tutor instructions. | ||
|
||
|
||
To run tests locally in your machine, you need to install the following dependencies:: | ||
|
||
$ pip install tox | ||
|
@@ -58,6 +55,24 @@ To run quality quality:: | |
$ tox -e py38 -- tests/unit/test_payfort_utils.py | ||
|
||
|
||
Tutor Devstack Installation Instructions | ||
######################################## | ||
|
||
You need to have | ||
`Tutor requirements such as Docker <https://docs.tutor.edly.io/install.html#requirements>`_. | ||
|
||
Run the following commands:: | ||
|
||
cd ~/work/ | ||
sudo pip install tutor==13.3.2 | ||
mkdir payfort && cd payfort | ||
git clone [email protected]:Zeit-Labs/ecommerce-payfort.git | ||
git clone --branch=open-release/maple.nelp [email protected]:eduNEXT/ecommerce.git | ||
git clone --branch=nelp/maple [email protected]:eduNEXT/tutor-discovery discovery | ||
bash ecommerce-payfort/tutor_plugin/tutor_quickstart.sh | ||
|
||
|
||
|
||
Installation and usage | ||
###################### | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is hacky plugin to install ecommerce-payfort into Tutor Maple v13. | ||
|
||
Follow the ecommerce-payfort/README.rst instructions to install the plugin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: "3.7" | ||
services: | ||
ecommerce: | ||
volumes: | ||
- PAYFORT_PACKAGE_DIR:/openedx/ecommerce-payfort | ||
- ECOMMERCE_DIR:/openedx/ecommerce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cybersource: | ||
merchant_id: SET-ME-PLEASE | ||
flex_shared_secret_key_id: SET-ME-PLEASE | ||
flex_shared_secret_key: SET-ME-PLEASE | ||
soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl | ||
transaction_key: SET-ME-PLEASE | ||
paypal: | ||
cancel_checkout_path: /checkout/cancel-checkout/ | ||
client_id: SET-ME-PLEASE | ||
client_secret: SET-ME-PLEASE | ||
error_url: /checkout/error/ | ||
mode: sandbox | ||
receipt_url: /checkout/receipt/ | ||
payfort: | ||
some_configs: "Yes, payfort's working!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from tutor import hooks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
set -e | ||
|
||
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
PAYFORT_PACKAGE_DIR="$(dirname "$SCRIPT_DIR")" | ||
ECOMMERCE_DIR="$(dirname "$PAYFORT_PACKAGE_DIR")/ecommerce" | ||
|
||
##if [ -z "$TVM_PROJECT_ENV" ]; then | ||
## echo "Error: activate tvm project environment first: " | ||
## echo | ||
## echo " $ source .tvm/bin/activate" | ||
## echo | ||
## exit 1 | ||
##fi | ||
|
||
|
||
set -x | ||
|
||
|
||
tutor config save \ | ||
--set 'ECOMMERCE_EXTRA_PIP_REQUIREMENTS=["-e /openedx/ecommerce-payfort"]' | ||
|
||
cat "$SCRIPT_DIR/docker-compose.override.yml" \ | ||
| sed -e "s|PAYFORT_PACKAGE_DIR|${PAYFORT_PACKAGE_DIR}|g" \ | ||
| sed -e "s|ECOMMERCE_DIR|${ECOMMERCE_DIR}|g" \ | ||
> "$(tutor config printroot)/env/dev/docker-compose.override.yml" | ||
|
||
pip install \ | ||
tutor-mfe==13.0.6 \ | ||
tutor-ecommerce==13.0.1 | ||
|
||
pip install -e discovery | ||
|
||
tutor plugins enable ecommerce | ||
tutor plugins enable discovery | ||
tutor plugins enable mfe | ||
tutor config save --set "DISCOVERY_DB_PREVIOUS_PARTNERS=false" # NELC specific setting: https://github.com/eduNEXT/tutor-discovery/pull/1 | ||
|
||
tutor config save --set "ECOMMERCE_PAYMENT_PROCESSORS=$(cat "$SCRIPT_DIR/ecommerce-config.yml")" | ||
tutor config save | ||
|
||
tutor dev quickstart --non-interactive | ||
|
||
tutor dev createuser --staff --superuser edx [email protected] --password edx | ||
|
||
tutor dev importdemocourse | ||
|
||
tutor dev run ecommerce npm install | ||
tutor dev run ecommerce ./node_modules/.bin/bower install --allow-root | ||
tutor dev run ecommerce python3 manage.py update_assets --skip-collect |