You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/06/17 16:41:23 UTC

[airavata-django-portal] branch master updated (564a8b1 -> 6f9048f)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


    from 564a8b1  Merge branch 'master' of https://github.com/apache/airavata-django-portal
     new 2169ef7  tutorial: tabbed instructions for different OS/environments
     new 31a8913  tutorial: update tab style to match admonitions
     new 2d2b016  tutorial: adding local python instructions for mac/linux
     new 33bbcfb  tutorial: cleaned up windows home guidance
     new 6f9048f  tutorial: windows instructions equivalent to `cd $HOME`

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/assets/css/pymdownx.tabbed.css |  47 ++++
 docs/tutorial/custom_ui_tutorial.md | 432 ++++++++++++++----------------------
 mkdocs.yml                          |   4 +
 requirements-dev.txt                |   3 +-
 4 files changed, 217 insertions(+), 269 deletions(-)
 create mode 100644 docs/assets/css/pymdownx.tabbed.css

[airavata-django-portal] 01/05: tutorial: tabbed instructions for different OS/environments

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 2169ef78dbeac9db1d99557143dbcdf5942175bd
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 17 09:48:04 2021 -0400

    tutorial: tabbed instructions for different OS/environments
---
 docs/assets/css/pymdownx.tabbed.css |  46 ++++++++
 docs/tutorial/custom_ui_tutorial.md | 230 +++++++++++++++++-------------------
 mkdocs.yml                          |   4 +
 requirements-dev.txt                |   3 +-
 4 files changed, 162 insertions(+), 121 deletions(-)

diff --git a/docs/assets/css/pymdownx.tabbed.css b/docs/assets/css/pymdownx.tabbed.css
new file mode 100644
index 0000000..6a744c2
--- /dev/null
+++ b/docs/assets/css/pymdownx.tabbed.css
@@ -0,0 +1,46 @@
+.tabbed-set {
+  display: flex;
+  position: relative;
+  flex-wrap: wrap;
+  margin-bottom: 1em;
+}
+
+.tabbed-set .highlight {
+  background: #ddd;
+}
+
+.tabbed-set .tabbed-content {
+  display: none;
+  order: 99;
+  width: 100%;
+  background-color: #e7f2fa;
+  padding: 0.25em;
+}
+
+.tabbed-set label {
+  width: auto;
+  /* margin: 0 0.5em; */
+  margin: 0;
+  padding: 0.25em 0.5em;
+  /* font-size: 120%; */
+  font-weight: 700;
+  cursor: pointer;
+}
+
+.tabbed-set input {
+  position: absolute;
+  opacity: 0;
+}
+
+.tabbed-set input:nth-child(n + 1) {
+  color: #333333;
+}
+
+.tabbed-set input:nth-child(n + 1):checked + label {
+  /* color: #ff5252; */
+  background-color: #e7f2fa;
+}
+
+.tabbed-set input:nth-child(n + 1):checked + label + .tabbed-content {
+  display: block;
+}
diff --git a/docs/tutorial/custom_ui_tutorial.md b/docs/tutorial/custom_ui_tutorial.md
index 1f3422c..7ba5981 100644
--- a/docs/tutorial/custom_ui_tutorial.md
+++ b/docs/tutorial/custom_ui_tutorial.md
@@ -38,24 +38,24 @@ Tutorial attendees should have:
 Python 3.6-3.9 are supported, but I highly recommend you download and use
 **Python 3.9**
 
-1. Download and install Python 3.9.
-    - (macOS/Windows): Download from https://www.python.org/downloads/
-    - (Linux): use your distribution's package manager to install Python 3.9
-2. (macOS/Linux) Verify you have installed Python 3.9. Open a terminal and run
-   `python3.9 --version`.
+Download and install Python 3.9.
 
-```
-$ python3.9 --version
-Python 3.9.5
-```
+-   (macOS/Windows): Download from <https://www.python.org/downloads/>
+-   (Linux): use your distribution's package manager to install Python 3.9
 
-3. (Windows) Verify you have installed Python 3.9. Open `cmd` and run
-   `py --version`:
+Verify you have installed Python 3.9:
 
-```text
-C:\Users\machrist>py --version
-Python 3.9.5
-```
+=== "macOS/Linux"
+
+        $ python3.9 --version
+        Python 3.9.5
+
+=== "Windows"
+
+    Open `cmd` then run:
+
+        C:\Users\username>py --version
+        Python 3.9.5
 
 ## Outline
 
@@ -383,35 +383,35 @@ We have a local develop environment created. Now we can start adding custom
 code. First, we'll create a custom Django app, which is the standard way to
 package a Django extension.
 
-1. (macOS/Linux) Create and activate a Python virtual environment
+#### Create and activate a Python virtual environment
 
-```bash
-$ cd $HOME
-$ python3.9 -m venv tutorial-env
-$ source tutorial-env/bin/activate
-(tutorial-env) $
-```
+=== "macOS/Linux"
 
-2. (Windows) Create and activate a Python virtual environment
+        $ cd $HOME
+        $ python3.9 -m venv tutorial-env
+        $ source tutorial-env/bin/activate
+        (tutorial-env) $
 
-```text
-C:\Users\machrist>cd %HOMEDRIVE%%HOMEPATH%
+=== "Windows"
 
-C:\Users\machrist>py -m venv tutorial-env
+        C:\Users\username>cd %HOMEDRIVE%%HOMEPATH%
 
-C:\Users\machrist>tutorial-env\Scripts\activate.bat
+        C:\Users\username>py -m venv tutorial-env
 
-(tutorial-env) C:\Users\machrist>
-```
+        C:\Users\username>tutorial-env\Scripts\activate.bat
+
+        (tutorial-env) C:\Users\username>
+
+#### Run the django app cookiecutter
 
-3. Install the latest version of cookiecutter. Cookiecutter is a tool for
+1. Install the latest version of cookiecutter. Cookiecutter is a tool for
    generating project source code from a template.
 
 ```sh
 pip install -U cookiecutter
 ```
 
-4. Use cookiecutter to run the Airavata Django app template.
+2. Use cookiecutter to run the Airavata Django app template.
 
 ```sh
 cookiecutter https://github.com/machristie/cookiecutter-airavata-django-app.git
@@ -431,110 +431,104 @@ version [0.1.0]:
 
 ### Setup local Django portal development environment
 
-To run the Django portal locally we'll start it as a Docker container. Another
-option, which we won't cover in this tutorial, is to check out the code and run
-the portal locally as a Python process (see the airavata-django-portal
-[README](https://github.com/apache/airavata-django-portal/blob/master/README.md)
-if you are interested).
+For running the local Django portal development environment, there are a few
+options:
 
-1. Make sure you have
-   [Docker installed](https://www.docker.com/products/docker-desktop).
-2. Run the following to create a Docker container called **custom-ui-tutorial**.
+-   **Docker**: Run the portal as a Docker container. If you have Docker
+    installed, this is the **recommended** option for the tutorial.
+-   **Python**: Install the portal dependencies (Python and Nodejs) and then run
+    it directly on your computer. This is recommended when you don't or can't
+    have Docker installed. It is also what we recommend when you are developing
+    a real custom django app extension.
 
-```
-cd $HOME
-git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
-cd custom_ui_tutorial_app
-docker run -d --name custom-ui-tutorial -p 8000:8000 -v "$PWD:/extensions" -v "$PWD/../custom_ui_tutorial_app-final/settings_local.py:/code/django_airavata/settings_local.py" machristie/airavata-django-portal
-```
+=== "Docker (macOS/Linux)"
 
-!!! note "For remote Docker host users"
+    1. Make sure you have
+    [Docker installed](https://www.docker.com/products/docker-desktop).
+    2. Run the following to create a Docker container called **custom-ui-tutorial**.
 
-    If you are using a remote Docker host (for example, you have Windows Home
-    and can't install Docker Desktop), make sure you run the above commands
-    on the remote Docker host. That means you need to
-    `ssh USERNAME@IP_ADDRESS` to the remote host first. See [Appendix on
-    running on a remote Docker
-    host](#appendix-setting-up-windows-for-a-remote-docker-host) for more
-    information on setting up the SSH connection. You can run the remaining
-    `docker` commands on your own computer, but this `docker run` command
-    must be run on the remote Docker host so that the tutorial files can be
-    mounted into it.
+            cd $HOME
+            git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
+            cd custom_ui_tutorial_app
+            docker run -d --name custom-ui-tutorial -p 8000:8000 -v "$PWD:/extensions" -v "$PWD/../custom_ui_tutorial_app-final/settings_local.py:/code/django_airavata/settings_local.py" machristie/airavata-django-portal
+    3. Run the following to load the default set of CMS pages:
 
-!!! note
+            docker exec custom-ui-tutorial python manage.py load_cms_data new_default_theme
 
-    You can also build the Docker image from scratch, which you might want to
-    do if the Docker image is out-dated. To do that run the following:
+=== "Python (Windows)"
 
-        cd /tmp/
-        git clone https://github.com/apache/airavata-django-portal.git
-        cd airavata-django-portal
-        docker build -t airavata-django-portal .
+    Verify that you have the following installed
 
-    Now you can `airavata-django-portal` instead of
-    `machristie/airavata-django-portal` in the `docker run` command above.
+    -   Python 3.9
+    -   Node LTS
+    -   Yarn
+    -   Git
 
-3. Run the following to load the default set of CMS pages:
+    The following instructions assume that you start in your home directory, but you
+    could technically checkout and build the code anywhere.
 
-```
-docker exec custom-ui-tutorial python manage.py load_cms_data new_default_theme
-```
+    1. Make sure that you have activated your `tutorial-env` virtual
+    environment. You should see `(tutorial-env)` at the beginning of the CMD
+    prompt. See the [virtual environment instructions if
+    needed](#create-and-activate-a-python-virtual-environment).
 
-#### Python/Windows instructions
+    2. Clone the custom_ui_tutorial_app and airavata-django-portal repositories.
 
-Verify that you have the following installled
+            (tutorial-env) C:\Users\username>cd %HOMEDRIVE%%HOMEPATH%
 
--   Python 3.9
--   Node LTS
--   Yarn
--   Git
+            (tutorial-env) C:\Users\username>git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
 
-The following instructions assume that you start in your home directory, but you
-could technically checkout and build the code anywhere.
+            (tutorial-env) C:\Users\username>git clone https://github.com/apache/airavata-django-portal.git
 
-1. Clone the custom_ui_tutorial_app and airavata-django-portal repositories.
+    3. Install the airavata-django-portal dependencies.
 
-```text
-(tutorial-env) C:\Users\machrist>cd %HOMEDRIVE%%HOMEPATH%
+            (tutorial-env) C:\Users\username>cd airavata-django-portal
 
-(tutorial-env) C:\Users\machrist>git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
+            (tutorial-env) C:\Users\username\airavata-django-portal>pip install -U pip
 
-(tutorial-env) C:\Users\machrist>git clone https://github.com/apache/airavata-django-portal.git
-```
+            (tutorial-env) C:\Users\username\airavata-django-portal>pip install -r requirements.txt
 
-2. Install the airavata-django-portal dependencies.
+    4. Copy in the settings_local.py file.
 
-```text
-(tutorial-env) C:\Users\machrist>cd airavata-django-portal
+            (tutorial-env) C:\Users\username\airavata-django-portal>copy ..\custom_ui_tutorial_app-final\settings_local.py django_airavata\
 
-(tutorial-env) C:\Users\machrist\airavata-django-portal>pip install -U pip
+    5. Run Django database migrations
 
-(tutorial-env) C:\Users\machrist\airavata-django-portal>pip install -r requirements.txt
-```
+            (tutorial-env) C:\Users\username\airavata-django-portal>python manage.py migrate
 
-3. Copy in the settings_local.py file.
+    6. Load the default Wagtail CMS pages.
 
-```text
-(tutorial-env) C:\Users\machrist\airavata-django-portal>copy ..\custom_ui_tutorial_app-final\settings_local.py django_airavata\
-```
+            (tutorial-env) C:\Users\username\airavata-django-portal>python manage.py load_cms_data new_default_theme
 
-4. Run Django database migrations
+    7. Build the JavaScript frontend code.
 
-```text
-(tutorial-env) C:\Users\machrist\airavata-django-portal>python manage.py migrate
-```
+            (tutorial-env) C:\Users\username\airavata-django-portal>build_js.bat
 
-5. Load the default Wagtail CMS pages.
+!!! note "For remote Docker host users"
 
-```text
-(tutorial-env) C:\Users\machrist\airavata-django-portal>python manage.py load_cms_data new_default_theme
-```
+    If you are using a remote Docker host (for example, you have Windows Home
+    and can't install Docker Desktop), make sure you run the above commands
+    on the remote Docker host. That means you need to
+    `ssh USERNAME@IP_ADDRESS` to the remote host first. See [Appendix on
+    running on a remote Docker
+    host](#appendix-setting-up-windows-for-a-remote-docker-host) for more
+    information on setting up the SSH connection. You can run the remaining
+    `docker` commands on your own computer, but this `docker run` command
+    must be run on the remote Docker host so that the tutorial files can be
+    mounted into it.
 
-6. Build the JavaScript frontend code.
+!!! note
 
-```text
-(tutorial-env) C:\Users\machrist\airavata-django-portal>build_js.bat
-```
+    You can also build the Docker image from scratch, which you might want to
+    do if the Docker image is out-dated. To do that run the following:
+
+        cd /tmp/
+        git clone https://github.com/apache/airavata-django-portal.git
+        cd airavata-django-portal
+        docker build -t airavata-django-portal .
+
+    Now you can use `airavata-django-portal` instead of
+    `machristie/airavata-django-portal` in the `docker run` command above.
 
 ---
 
@@ -772,28 +766,24 @@ install_requires =
 10. Now we need to install the _custom_ui_tutorial_app_ package into the Django
     portal's virtual environment.
 
-Docker instructions:
+=== "Docker (macOS/Linux)"
 
-```bash
-docker exec -w /extensions custom-ui-tutorial pip install -e .
-docker exec custom-ui-tutorial touch /code/django_airavata/wsgi.py
-```
+        docker exec -w /extensions custom-ui-tutorial pip install -e .
+        docker exec custom-ui-tutorial touch /code/django_airavata/wsgi.py
 
-These commands:
+    These commands:
 
-1. install our custom django app package and its dependencies into the
-   container's Python environment, and
-2. touches the wsgi.py to trigger a reload of the Django portal dev server.
+    1. install our custom django app package and its dependencies into the
+    container's Python environment, and
+    2. touches the wsgi.py to trigger a reload of the Django portal dev server.
 
-Python/Windows instructions:
+=== "Python (Windows)"
 
-```text
-(tutorial-env) C:\Users\machrist\airavata-django-portal>cd ..\custom_ui_tutorial_app
+        (tutorial-env) C:\Users\username\airavata-django-portal>cd ..\custom_ui_tutorial_app
 
-(tutorial-env) C:\Users\machrist\custom_ui_tutorial_app>pip install -e .
+        (tutorial-env) C:\Users\username\custom_ui_tutorial_app>pip install -e .
 
-(tutorial-env) C:\Users\machrist\airavata-django-portal>python manage.py runserver
-```
+        (tutorial-env) C:\Users\username\airavata-django-portal>python manage.py runserver
 
 ### Use the GaussianEigenvaluesViewProvider with the Gaussian log output file
 
diff --git a/mkdocs.yml b/mkdocs.yml
index 6b17256..2da4025 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -22,8 +22,12 @@ nav:
 
 theme: readthedocs
 
+extra_css:
+  - assets/css/pymdownx.tabbed.css
+
 markdown_extensions:
   - sane_lists # allow restarting numbering of ordered lists
   - admonition
   - toc:
       permalink: true
+  - pymdownx.tabbed
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 40c56a4..36f48db 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -3,8 +3,9 @@ autopep8==1.5.4
 flake8==3.8.4
 flake8-isort==4.0.0
 isort==5.2.2
-mkdocs==1.0.4
+mkdocs==1.1.2
 Markdown==3.2.1
+pymdown-extensions==8.2
 pycodestyle==2.6.0
 pyflakes==2.2.0
 tox==3.20.0

[airavata-django-portal] 05/05: tutorial: windows instructions equivalent to `cd $HOME`

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 6f9048fce260b3097cc99e56c2f4ac9857b146fd
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 17 12:14:46 2021 -0400

    tutorial: windows instructions equivalent to `cd $HOME`
---
 docs/tutorial/custom_ui_tutorial.md | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/tutorial/custom_ui_tutorial.md b/docs/tutorial/custom_ui_tutorial.md
index 42f2ac1..343b8af 100644
--- a/docs/tutorial/custom_ui_tutorial.md
+++ b/docs/tutorial/custom_ui_tutorial.md
@@ -390,7 +390,7 @@ package a Django extension.
 
 === "Windows"
 
-        C:\Users\username>cd %HOMEDRIVE%%HOMEPATH%
+        C:\Users\username>cd %userprofile%
 
         C:\Users\username>py -m venv tutorial-env
 
@@ -474,7 +474,7 @@ options:
 
     2. Clone the custom_ui_tutorial_app and airavata-django-portal repositories.
 
-            (tutorial-env) C:\Users\username>cd %HOMEDRIVE%%HOMEPATH%
+            (tutorial-env) C:\Users\username>cd %userprofile%
 
             (tutorial-env) C:\Users\username>git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
 
@@ -565,9 +565,13 @@ Now we'll also generate and implement a **Gaussian Eigenvalues View** provider.
    code. First, change into the `custom_ui_tutorial_app` generated in the
    previous step:
 
-```sh
-cd $HOME/custom_ui_tutorial_app
-```
+=== "macOS/Linux"
+
+        (tutorial-env) $ cd $HOME/custom_ui_tutorial_app
+
+=== "Windows"
+
+        (tutorial-env) C:\Users\username>cd %userprofile%\custom_ui_tutorial_app
 
 2. Run the following cookiecutter template:
 

[airavata-django-portal] 02/05: tutorial: update tab style to match admonitions

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 31a891395885e119e9d1abedca19cdc7d13c97d0
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 17 09:58:55 2021 -0400

    tutorial: update tab style to match admonitions
---
 docs/assets/css/pymdownx.tabbed.css | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/assets/css/pymdownx.tabbed.css b/docs/assets/css/pymdownx.tabbed.css
index 6a744c2..21f6ce1 100644
--- a/docs/assets/css/pymdownx.tabbed.css
+++ b/docs/assets/css/pymdownx.tabbed.css
@@ -14,7 +14,8 @@
   order: 99;
   width: 100%;
   background-color: #e7f2fa;
-  padding: 0.25em;
+  padding: 0.5em;
+  border-top: 1px solid #6ab0de;
 }
 
 .tabbed-set label {
@@ -37,8 +38,8 @@
 }
 
 .tabbed-set input:nth-child(n + 1):checked + label {
-  /* color: #ff5252; */
-  background-color: #e7f2fa;
+  background: #6ab0de;
+  color: #fff;
 }
 
 .tabbed-set input:nth-child(n + 1):checked + label + .tabbed-content {

[airavata-django-portal] 04/05: tutorial: cleaned up windows home guidance

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 33bbcfbad751ac1516073df9a709660b8f81ac3a
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 17 12:07:56 2021 -0400

    tutorial: cleaned up windows home guidance
---
 docs/tutorial/custom_ui_tutorial.md | 176 ++----------------------------------
 1 file changed, 9 insertions(+), 167 deletions(-)

diff --git a/docs/tutorial/custom_ui_tutorial.md b/docs/tutorial/custom_ui_tutorial.md
index cb3787e..42f2ac1 100644
--- a/docs/tutorial/custom_ui_tutorial.md
+++ b/docs/tutorial/custom_ui_tutorial.md
@@ -19,19 +19,15 @@ Tutorial attendees should have:
 
 !!! note "Special note for Windows Home users"
 
-    If you have Windows Home installed, you'll need to either use a **remote
-    Docker host** (recommended) or take some extra steps to setup WSL2
-    (Windows Subsystem for Linux 2). The following are some special
-    instructions to help you with these options:
-
-    1. (**Recommended**) For the in person session of the tutorial, you will
-    have the option of using a **remote Docker host** provided to you. See
-    [Appendix: Setting up Windows Home for a remote Docker
-    host](#appendix-setting-up-windows-for-a-remote-docker-host) for more
-    details.
-    2. (**Advanced**) [Install Docker Desktop on Windows Home with WSL2
-    enabled](https://docs.docker.com/docker-for-windows/install-windows-home/).
-    See the link for more information.
+    If you have Windows Home, you may not be able to install Docker Desktop.
+    You'll need to either **install the Airavata Django Portal dependencies
+    (Python, Nodejs, Yarn)** (recommended) or take some extra steps to setup
+    WSL2 (Windows Subsystem for Linux 2) and then install Docker Desktop. Since
+    setting up WSL2 can be fairly involved, we don't recommend it for the in
+    person tutorial, but if you are interested in this option, see [Install
+    Docker Desktop on Windows Home with WSL2
+    enabled](https://docs.docker.com/docker-for-windows/install-windows-home/)
+    for more information.
 
 ### Installing Python
 
@@ -561,32 +557,6 @@ options:
 
             (tutorial-env) $ python manage.py runserver
 
-!!! note "For remote Docker host users"
-
-    If you are using a remote Docker host (for example, you have Windows Home
-    and can't install Docker Desktop), make sure you run the above commands
-    on the remote Docker host. That means you need to
-    `ssh USERNAME@IP_ADDRESS` to the remote host first. See [Appendix on
-    running on a remote Docker
-    host](#appendix-setting-up-windows-for-a-remote-docker-host) for more
-    information on setting up the SSH connection. You can run the remaining
-    `docker` commands on your own computer, but this `docker run` command
-    must be run on the remote Docker host so that the tutorial files can be
-    mounted into it.
-
-!!! note
-
-    You can also build the Docker image from scratch, which you might want to
-    do if the Docker image is out-dated. To do that run the following:
-
-        cd /tmp/
-        git clone https://github.com/apache/airavata-django-portal.git
-        cd airavata-django-portal
-        docker build -t airavata-django-portal .
-
-    Now you can use `airavata-django-portal` instead of
-    `machristie/airavata-django-portal` in the `docker run` command above.
-
 ### Create the custom output viewer
 
 Now we'll also generate and implement a **Gaussian Eigenvalues View** provider.
@@ -1526,131 +1496,3 @@ file in the
 
 SciGaP provides free Airavata Gateways hosting services. Log in or create an
 account at [scigap.org](https://scigap.org/) to request gateway hosting.
-
-## Appendix: Setting up Windows for a **remote Docker host**
-
-### Installing Visual Studio Code
-
-The tutorial code needs to be on the remote Docker host so that it can be
-mounted into the Django portal container. To modify the files as required by the
-tutorial you'll need to either SSH into the remote Docker host and edit the
-files there with a terminal editor, like Vim, or you can use
-[Visual Studio Code](https://code.visualstudio.com/) to edit the files remotely
-with the SSH extension.
-
-To use Visual Studio Code, install it from <https://code.visualstudio.com/>.
-Once you have it installed, start it. In the menu, go to **View > Extensions**.
-In the Extensions search, type `ssh` and click on **Install** for the _Remote -
-SSH_ extension. Once it is installed, click on the green box in the lower left
-hand corner and select **Remote-SSH: Connect to Host...**, or, type
-`Ctrl-Shift-P` and type `Remote-SSH` and select **Remote-SSH: Connect to
-Host...**. Select **linux** as the remote platform type.
-
-Once you are connected, go to **View > Explorer**. Click on the **Open Folder**
-button. Select the folder that contains the tutorial code and click **OK**. You
-should now see the tutorial files in the Explorer on the left hand side. Now you
-can edit the tutorial files from your local computer and they will be
-immediately reflected in the Django portal container.
-
-### SSH configuration
-
-To connect via SSH to the remote Docker host, you'll need an SSH key pair. If
-you are setting up the remote Docker host, you can create the key pair yourself
-and copy the public portion to the `~/.ssh/authorized_keys` file under the user
-account on the remote Docker host. For the in person tutorial session this will
-have already been setup and you will be provided with the private key.
-
-1. Create a directory in your home directory (i.e. `C:\Users\<username>\`)
-   called `.ssh`.
-2. Copy the private key file into the `.ssh` directory.
-3. Create (or if provided, copy) a `config` file in the `.ssh` directory. The
-   contents of the file should be:
-
-```
-Host IP_ADDRESS
-    IdentityFile ~\.ssh\PRIVATE_KEY
-```
-
-Where IP_ADDRESS should be replaced with the IP address or hostname of the
-remote Docker host (for example: `149.165.168.201`). And PRIVATE_KEY should be
-replaced with the name of your private key file that you copied in step 2.
-
-Test that SSH is working by opening a Powershell command prompt (in Visual
-Studio Code open a new terminal with **Ctrl+Shift+`**) and running the
-following:
-
-```
-ssh username@IP_ADDRESS
-```
-
-You should see something like the following:
-
-```text
-PS C:\Users\testuser> ssh user1@149.165.157.132
-The authenticity of host '149.165.157.132 (149.165.157.132)' can't be established.
-ECDSA key fingerprint is SHA256:RG86D7KwCZNQtFOAfEc4TZ4V0stn1RyGrj5I+v7SHxU.
-Are you sure you want to continue connecting (yes/no)? yes
-Warning: Permanently added '149.165.157.132' (ECDSA) to the list of known hosts.
-Last login: Thu Aug 20 14:31:41 2020 from 156-56-142-122.dhcp-bl.indiana.edu
-[user1@django-tutorial ~]$
-```
-
-If you get the "authenticity of host ... can't be established", as shown above,
-enter `yes` at the prompt to proceed. You shouldn't be prompted for a password
-since the private key will be used for authentication. If you are prompted for a
-password, double check that the `config` file is correct.
-
-### Connecting to Docker
-
-To connect to Docker you'll need the Docker client. Download
-<https://github.com/StefanScherer/docker-cli-builder/releases/download/19.03.12/docker.exe>
-and copy it to `C:\Windows` (or anywhere else that is on your PATH, or in the
-current directory).
-
-Next, at a Powershell command prompt set the environment variable `DOCKER_HOST`
-to the SSH username and IP address of the remote Docker host.
-
-```
-$env:DOCKER_HOST = "ssh://USERNAME@IP_ADDRESS"
-```
-
-But replace USERNAME with your username on the remote Docker host and the
-IP_ADDRESS with the IP address or domain name of the remote Docker host. For
-example:
-
-```
-$env:DOCKER_HOST = "ssh://train01@149.165.170.99"
-```
-
-Now run the following to test that the connection is working:
-
-```
-docker ps
-```
-
-You'll use this command prompt window during the tutorial to run docker
-commands.
-
-!!! note "Note for legacy Command Prompt users"
-
-    If you are using `CMD`, the legacy command prompt program then you need a
-    slightly different way of specifying the DOCKER_HOST environment
-    variable. The form is
-
-    ```
-    set DOCKER_HOST=ssh://USERNAME@IP_ADDRESS
-    ```
-
-### SSH Tunnel
-
-For some of the tutorial instructions you'll be asked to load the Django portal
-in your browser at <http://localhost:8000>. However, your Django portal
-container is running on a remote Docker host, not your local computer. To make
-it appear that the Django portal is running locally, create an SSH tunnel to
-forward port 8000 to the remote Docker host. In a separate command prompt (in
-Visual Studio Code open a new terminal with **Ctrl+Shift+`**), run the
-following:
-
-```
-ssh -L 8000:localhost:8000 USERNAME@IP_ADDRESS
-```

[airavata-django-portal] 03/05: tutorial: adding local python instructions for mac/linux

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 2d2b016d4ce29f34fd09b707a237161929929364
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Jun 17 10:13:33 2021 -0400

    tutorial: adding local python instructions for mac/linux
---
 docs/tutorial/custom_ui_tutorial.md | 72 +++++++++++++++++++++++++++++++++----
 1 file changed, 66 insertions(+), 6 deletions(-)

diff --git a/docs/tutorial/custom_ui_tutorial.md b/docs/tutorial/custom_ui_tutorial.md
index 7ba5981..cb3787e 100644
--- a/docs/tutorial/custom_ui_tutorial.md
+++ b/docs/tutorial/custom_ui_tutorial.md
@@ -455,6 +455,10 @@ options:
 
             docker exec custom-ui-tutorial python manage.py load_cms_data new_default_theme
 
+    Go to [http://localhost:8000](http://localhost:8000), click on **Login in**,
+    enter your username and password. On the dashboard you should see the your
+    experiments listed on the right hand side.
+
 === "Python (Windows)"
 
     Verify that you have the following installed
@@ -504,6 +508,59 @@ options:
 
             (tutorial-env) C:\Users\username\airavata-django-portal>build_js.bat
 
+    8. Run the server.
+
+            (tutorial-env) C:\Users\username\airavata-django-portal>python manage.py runserver
+
+=== "Python (macOS/Linux)"
+
+    Verify that you have the following installed
+
+    -   Python 3.9
+    -   Node LTS
+    -   Yarn
+    -   Git
+
+    The following instructions assume that you start in your home directory, but you
+    could technically checkout and build the code anywhere.
+
+    1. Make sure that you have activated your `tutorial-env` virtual
+    environment. You should see `(tutorial-env)` at the beginning of the shell
+    prompt. See the [virtual environment instructions if
+    needed](#create-and-activate-a-python-virtual-environment).
+
+    2. Clone the custom_ui_tutorial_app and airavata-django-portal repositories.
+
+            (tutorial-env) $ cd $HOME
+            (tutorial-env) $ git clone https://github.com/machristie/custom_ui_tutorial_app.git custom_ui_tutorial_app-final
+            (tutorial-env) $ git clone https://github.com/apache/airavata-django-portal.git
+
+    3. Install the airavata-django-portal dependencies.
+
+            (tutorial-env) $ cd airavata-django-portal
+            (tutorial-env) $ pip install -U pip
+            (tutorial-env) $ pip install -r requirements.txt
+
+    4. Copy in the settings_local.py file.
+
+            (tutorial-env) $ cp ../custom_ui_tutorial_app-final/settings_local.py django_airavata/
+
+    5. Run Django database migrations
+
+            (tutorial-env) $ python manage.py migrate
+
+    6. Load the default Wagtail CMS pages.
+
+            (tutorial-env) $ python manage.py load_cms_data new_default_theme
+
+    7. Build the JavaScript frontend code.
+
+            (tutorial-env) $ build_js.sh
+
+    8. Run the server.
+
+            (tutorial-env) $ python manage.py runserver
+
 !!! note "For remote Docker host users"
 
     If you are using a remote Docker host (for example, you have Windows Home
@@ -530,12 +587,6 @@ options:
     Now you can use `airavata-django-portal` instead of
     `machristie/airavata-django-portal` in the `docker run` command above.
 
----
-
-Go to [http://localhost:8000](http://localhost:8000), click on **Login in**,
-enter your username and password. On the dashboard you should see the your
-experiments listed on the right hand side.
-
 ### Create the custom output viewer
 
 Now we'll also generate and implement a **Gaussian Eigenvalues View** provider.
@@ -783,8 +834,17 @@ install_requires =
 
         (tutorial-env) C:\Users\username\custom_ui_tutorial_app>pip install -e .
 
+        (tutorial-env) C:\Users\username\custom_ui_tutorial_app>cd ..\airavata-django-portal
+
         (tutorial-env) C:\Users\username\airavata-django-portal>python manage.py runserver
 
+=== "Python (macOS/Linux)"
+
+        (tutorial-env) $ cd $HOME/custom_ui_tutorial_app
+        (tutorial-env) $ pip install -e .
+        (tutorial-env) $ cd ../airavata-django-portal
+        (tutorial-env) $ python manage.py runserver
+
 ### Use the GaussianEigenvaluesViewProvider with the Gaussian log output file
 
 Back in the Django Portal, we'll make sure the application interface for