From 400ec7025f625b5d1fea3f52038c0ff231d138b5 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Wed, 17 Mar 2021 21:49:00 +0300 Subject: [PATCH 1/2] doc: create_devstack base domain argument --- README.rst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index 8b8fb3313c..eb04cb982f 100644 --- a/README.rst +++ b/README.rst @@ -95,10 +95,11 @@ Creating more sites is possible via the commands below: .. code:: bash $ make amc-shell # Inside your machine to open the AMC shell - $ ./manage.py create_devstack_site blue # Inside the AMC shell + $ ./manage.py create_devstack_site blue localhost # Inside the AMC shell $ make lms-shell # Inside your machine to open the LMS shell - $ ./manage.py lms create_devstack_site blue + $ ./manage.py lms create_devstack_site blue localhost +**Note:** Sultan users can replace the base domain ``localhost`` in ``create_devstack_site`` commands with something else like `devstack`. If something goes wrong, check out the rest of this README for additional details. @@ -699,7 +700,7 @@ How do I run multiple named Open edX releases on same machine? -------------------------------------------------------------- You can have multiple isolated Devstacks provisioned on a single computer now. Follow these directions to switch between the named releases. -#. Bring down any running containers by issuing a `make stop.all`. +#. Bring down any running containers by issuing a `make stop.all`. #. The ``COMPOSE_PROJECT_NAME`` variable is used to define Docker namespaced volumes and network based on this value, so changing it will give you a separate set of databases. This is handled for you automatically by setting the ``OPENEDX_RELEASE`` environment variable in ``options.mk`` (e.g. ``COMPOSE_PROJECT_NAME=devstack-juniper.master``. Should you want to manually override this edit the ``options.local.mk`` in the root of this repo and create the file if it does not exist. Change the devstack project name by adding the following line: ``COMPOSE_PROJECT_NAME=`` (e.g. ``COMPOSE_PROJECT_NAME=secondarydevstack``) #. Perform steps in `How do I run the images for a named Open edX release?`_ for specific release. @@ -714,15 +715,15 @@ Switch between your Devstack releases by doing the following: #. Bring down the containers by issuing a ``make stop.all`` for the running release. #. Follow the instructions from the `How do I run multiple named Open edX releases on same machine?`_ section. -#. Edit the project name in ``options.local.mk`` or set the ``OPENEDX_RELEASE`` environment variable and let the ``COMPOSE_PROJECT_NAME`` be assigned automatically. +#. Edit the project name in ``options.local.mk`` or set the ``OPENEDX_RELEASE`` environment variable and let the ``COMPOSE_PROJECT_NAME`` be assigned automatically. #. Bring up the containers with ``make dev.up``. **NOTE:** Additional instructions on switching releases using `direnv` can be found in `How do I switch releases using 'direnv'?`_ section. Examples of Docker Service Names After Setting the ``COMPOSE_PROJECT_NAME`` variable. Notice that the **devstack-juniper.master** name represents the ``COMPOSE_PROJECT_NAME``. - -- edx.devstack-juniper.master.lms -- edx.devstack-juniper.master.mysql + +- edx.devstack-juniper.master.lms +- edx.devstack-juniper.master.mysql Each instance has an isolated set of databases. This could, for example, be used to quickly switch between versions of Open edX without hitting as many issues with migrations, data integrity, etc. @@ -734,11 +735,11 @@ Questions & Troubleshooting – Multiple Named Open edX Releases on Same Machine This broke my existing Devstack! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See if the troubleshooting of this readme can help resolve your broken devstack first, then try posting on the `Open edX forums `__ to see if you have the same issue as any others. If you think you have found a bug, file a CR ticket. - + I’m getting errors related to ports already being used. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Make sure you bring down your devstack before changing the value of COMPOSE_PROJECT_NAME. If you forgot to, change the COMPOSE_PROJECT_NAME back to its original value, run ``make dev.down``, and then try again. - + I have custom scripts/compose files that integrate with or extend Devstack. Will those still work? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ With the default value of COMPOSE_PROJECT_NAME = devstack, they should still work. If you choose a different COMPOSE_PROJECT_NAME, your extensions will likely break, because the names of containers change along with the project name. @@ -754,7 +755,7 @@ Make sure that you have setup each Open edX release in separate directories usin # You should see something like the following after successfully enabling 'direnv' for the Juniper release. - direnv: loading ~/open-edx/devstack.juniper/.envrc + direnv: loading ~/open-edx/devstack.juniper/.envrc direnv: export +DEVSTACK_WORKSPACE +OPENEDX_RELEASE +VIRTUAL_ENV ~PATH (venv)username@computer-name devstack.juniper % @@ -798,7 +799,7 @@ We recommend separating the named releases into different directories, for clari ## ~/.zshrc for ZSH shell for Mac OS X. ## Hook in `direnv` for local directory environment setup. - ## https://direnv.net/docs/hook.html + ## https://direnv.net/docs/hook.html eval "$(direnv hook zsh)" # https://github.com/direnv/direnv/wiki/Python#zsh @@ -847,7 +848,7 @@ We recommend separating the named releases into different directories, for clari export PATH } -#. Example `.envrc` file used in project directory. Need to make sure that each release root has this unique file. +#. Example `.envrc` file used in project directory. Need to make sure that each release root has this unique file. .. code:: sh From 5a30cdf665aae57f2e4c15ccb5f4a8f4597c6a07 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Thu, 18 Mar 2021 06:39:33 +0300 Subject: [PATCH 2/2] create_devstack_site Better note for Sultan users Co-authored-by: Ahmed Jazzar --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index eb04cb982f..4189dd35ac 100644 --- a/README.rst +++ b/README.rst @@ -99,7 +99,7 @@ Creating more sites is possible via the commands below: $ make lms-shell # Inside your machine to open the LMS shell $ ./manage.py lms create_devstack_site blue localhost -**Note:** Sultan users can replace the base domain ``localhost`` in ``create_devstack_site`` commands with something else like `devstack`. +**Note:** Sultan users can replace the base domain ``localhost`` in ``create_devstack_site`` commands with any host specified in their Sultan `EDX_HOST_NAMES` configuration. If something goes wrong, check out the rest of this README for additional details.