From 7d17b9a496f52ae7adb979471dcf6c782bb7c400 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch Date: Mon, 3 Jun 2024 14:21:00 -0400 Subject: [PATCH 01/18] Dataverse with WSL --- .../source/developers/windows.rst | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 53578fe980c..91e3d783177 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -16,3 +16,91 @@ See the `post + +You will be asked to create a linux user. +After installation of Linux check that you have internet connection: + +.. code-block:: bash + + ping www.google.com + +If you do not have internet connection try add in ``/etc/wsl.conf`` + +.. code-block:: bash + + [network] + generateResolvConf = false + +Also in /etc/resolv.conf add + +.. code-block:: bash + + nameserver 1.1.1.1 + +Now you can install all the tools one usually uses in Linux. For example, it is good idea to run update: + +.. code-block:: bash + + sudo apt update + sudo apt full-upgrade -y + +Install Dataverse +~~~~~~~~~~~~~~~~~ + +Now you can install Dataverse in WSL following the instructions for :doc:`classic-dev-env` +At the end check that you have ``-Ddataverse.pid.default-provider=fake`` in jvm-options. + +Now you can access dataverse in your windows browser + + - http://localhost:8080 + - username: dataverseAdmin + - password: admin + +IDE for Dataverse in Windows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Files in WSL are accessible from Windows for editing using ``\\wsl.localhost`` or ``\\wsl$`` path. Windows files are accessible in linux in ``/mnt/c/`` directory. Therefore one can use one's favorite editor or IDE to edit dataverse project files. Then one can build using ``mvn`` in WSL and deploy manually in WSL using ``asadmin``. + +It is still though possible to use full strength of IDE, the following instructions are for Intelij users. + +- Install Intelij in Windows. + +You can open the project through ``\\wsl.localhost`` and navigate to dataverse project. +You can try to build the project in Intelij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try +to disable WSL Hyperviser from firewall. +After that you should be able to build the project in Intelij. +It seems that at present it is impossible to deploy the glassfish application in Intelij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domian one, but it may fail since Intelij confuses the Windows and Linux paths. + +To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in InteliJ and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL dataverse project.Then press ``Download IDE and Connect``. This will install InteliJ in WSL in ``~/.cache/JetBrains/``. Now in InteliJ you should see your project opened in a new InteliJ window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. + +PgAdmin in Windows for Dataverse +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can access dataverse database from Windows. Install pgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/ In pgAdmin register server using 127.0.0.1 with port 5432, database dvndb and dvnapp as username with secret password. Now you will be able to access and update dataverse database. + From 8eeaa31829a2e980cc13387f50a691319d9fb37d Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:44:29 -0400 Subject: [PATCH 02/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 91e3d783177..d72ec0e50d2 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -38,7 +38,7 @@ See the list of possible distributions: wsl --list --online -Choose the distribution you would like. Then run the following command. Notice that this installation of dataverse was tried with ubuntu distribution. +Choose the distribution you would like. Then run the following command. These instructions were tested with Ubuntu. .. code-block:: powershell From 88d9854cd0328349c0acf0b96c767b04100d7ec7 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:44:53 -0400 Subject: [PATCH 03/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index d72ec0e50d2..6a2fc9155fc 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -45,7 +45,7 @@ Choose the distribution you would like. Then run the following command. These in wsl --install -d You will be asked to create a linux user. -After installation of Linux check that you have internet connection: +After the installation of Linux is complete, check that you have an internet connection: .. code-block:: bash From 9b5b29cf0eac6fc21f666d05c74f8406e1ddbdbf Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:45:14 -0400 Subject: [PATCH 04/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 6a2fc9155fc..8986cc2e875 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -51,7 +51,7 @@ After the installation of Linux is complete, check that you have an internet con ping www.google.com -If you do not have internet connection try add in ``/etc/wsl.conf`` +If you do not have an internet connection try adding it in ``/etc/wsl.conf`` .. code-block:: bash From 87edbcba66f8c293e2074cfbd758b338da0ad057 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:45:28 -0400 Subject: [PATCH 05/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 8986cc2e875..f689b172cd6 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -58,7 +58,7 @@ If you do not have an internet connection try adding it in ``/etc/wsl.conf`` [network] generateResolvConf = false -Also in /etc/resolv.conf add +Also in ``/etc/resolv.conf`` add .. code-block:: bash From 74254affb19eba566699675fae4d677ce6417ef2 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:45:45 -0400 Subject: [PATCH 06/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index f689b172cd6..ccba42274b8 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -64,7 +64,7 @@ Also in ``/etc/resolv.conf`` add nameserver 1.1.1.1 -Now you can install all the tools one usually uses in Linux. For example, it is good idea to run update: +Now you can install all the tools one usually uses in Linux. For example, it is good idea to run an update: .. code-block:: bash From 93c452d6bec71a402e73b4670db68cc0f95918fc Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:46:18 -0400 Subject: [PATCH 07/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index ccba42274b8..dda34a22719 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -102,5 +102,5 @@ To use the full strength of Intelij with build, deployment and debugging, one wi PgAdmin in Windows for Dataverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can access dataverse database from Windows. Install pgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/ In pgAdmin register server using 127.0.0.1 with port 5432, database dvndb and dvnapp as username with secret password. Now you will be able to access and update dataverse database. +You can access The Dataverse database from Windows. Install pgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/ In pgAdmin register a server using 127.0.0.1 with port 5432, database dvndb and dvnapp as username with secret password. Now you will be able to access and update Dataverse database. From fc57ddffd12c75798fd83f2a99da20128da0821b Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:46:46 -0400 Subject: [PATCH 08/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index dda34a22719..81b518333f9 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -30,7 +30,7 @@ If you have Docker already installed, you should already have WSL installed, oth wsl --install -If you already had WSL installed you can install specific linux distribution: +If you already had WSL installed you can install a specific Linux distribution: See the list of possible distributions: From fc25adf11a78f405045fdf64aee37f044bde4973 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:46:57 -0400 Subject: [PATCH 09/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 81b518333f9..4ff309bbc9f 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -44,7 +44,7 @@ Choose the distribution you would like. Then run the following command. These in wsl --install -d -You will be asked to create a linux user. +You will be asked to create a Linux user. After the installation of Linux is complete, check that you have an internet connection: .. code-block:: bash From 841ffd06ddc475f5168549171b97c1b1288673cd Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:47:13 -0400 Subject: [PATCH 10/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 4ff309bbc9f..fdc6641eab1 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -94,7 +94,7 @@ It is still though possible to use full strength of IDE, the following instructi You can open the project through ``\\wsl.localhost`` and navigate to dataverse project. You can try to build the project in Intelij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try to disable WSL Hyperviser from firewall. -After that you should be able to build the project in Intelij. +After that you should be able to build the project in Intellij. It seems that at present it is impossible to deploy the glassfish application in Intelij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domian one, but it may fail since Intelij confuses the Windows and Linux paths. To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in InteliJ and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL dataverse project.Then press ``Download IDE and Connect``. This will install InteliJ in WSL in ``~/.cache/JetBrains/``. Now in InteliJ you should see your project opened in a new InteliJ window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. From 185c31cac6aee4869772736bda0ea9879be61a42 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:47:26 -0400 Subject: [PATCH 11/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index fdc6641eab1..5d74072f264 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -92,7 +92,7 @@ It is still though possible to use full strength of IDE, the following instructi - Install Intelij in Windows. You can open the project through ``\\wsl.localhost`` and navigate to dataverse project. -You can try to build the project in Intelij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try +You can try to build the project in Intellij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try to disable WSL Hyperviser from firewall. After that you should be able to build the project in Intellij. It seems that at present it is impossible to deploy the glassfish application in Intelij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domian one, but it may fail since Intelij confuses the Windows and Linux paths. From f9fb940228106221b08f4cf60139cdd829171a6f Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:48:08 -0400 Subject: [PATCH 12/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 5d74072f264..e877f4612e1 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -77,7 +77,7 @@ Install Dataverse Now you can install Dataverse in WSL following the instructions for :doc:`classic-dev-env` At the end check that you have ``-Ddataverse.pid.default-provider=fake`` in jvm-options. -Now you can access dataverse in your windows browser +Now you can access Dataverse in your Windows browser (Edge, Chrome, etc.): - http://localhost:8080 - username: dataverseAdmin From d336f45154425cd0e49526807b3d087e268233d5 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:53:15 -0400 Subject: [PATCH 13/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index e877f4612e1..16063272966 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -85,7 +85,7 @@ Now you can access Dataverse in your Windows browser (Edge, Chrome, etc.): IDE for Dataverse in Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Files in WSL are accessible from Windows for editing using ``\\wsl.localhost`` or ``\\wsl$`` path. Windows files are accessible in linux in ``/mnt/c/`` directory. Therefore one can use one's favorite editor or IDE to edit dataverse project files. Then one can build using ``mvn`` in WSL and deploy manually in WSL using ``asadmin``. +Files in WSL are accessible from Windows for editing using ``\\wsl.localhost`` or ``\\wsl$`` path. Windows files are accessible under Linux in the ``/mnt/c/`` directory. Therefore one can use one's favorite editor or IDE to edit Dataverse project files. Then one can build using ``mvn`` in WSL and deploy manually in WSL using ``asadmin``. It is still though possible to use full strength of IDE, the following instructions are for Intelij users. From 4e4af12890c00b1b484d1d98d7428c16c32faa1c Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:53:32 -0400 Subject: [PATCH 14/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 16063272966..ec92adf7099 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -87,7 +87,7 @@ IDE for Dataverse in Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Files in WSL are accessible from Windows for editing using ``\\wsl.localhost`` or ``\\wsl$`` path. Windows files are accessible under Linux in the ``/mnt/c/`` directory. Therefore one can use one's favorite editor or IDE to edit Dataverse project files. Then one can build using ``mvn`` in WSL and deploy manually in WSL using ``asadmin``. -It is still though possible to use full strength of IDE, the following instructions are for Intelij users. +It is still though possible to use a full-strength IDE. The following instructions are for Intellij users. - Install Intelij in Windows. From 6a34b97b7e67e163553f483ab12a55e1379d4b92 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:53:48 -0400 Subject: [PATCH 15/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index ec92adf7099..b16e86b5c2d 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -91,7 +91,7 @@ It is still though possible to use a full-strength IDE. The following instructio - Install Intelij in Windows. -You can open the project through ``\\wsl.localhost`` and navigate to dataverse project. +You can open the project through ``\\wsl.localhost`` and navigate to Dataverse project. You can try to build the project in Intellij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try to disable WSL Hyperviser from firewall. After that you should be able to build the project in Intellij. From 3b9e691c476f9cc50ca75065c80f1a08526ff386 Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:54:05 -0400 Subject: [PATCH 16/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index b16e86b5c2d..09060b801ad 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -95,7 +95,7 @@ You can open the project through ``\\wsl.localhost`` and navigate to Dataverse p You can try to build the project in Intellij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try to disable WSL Hyperviser from firewall. After that you should be able to build the project in Intellij. -It seems that at present it is impossible to deploy the glassfish application in Intelij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domian one, but it may fail since Intelij confuses the Windows and Linux paths. +It seems that at present it is impossible to deploy the Glassfish application in Intellij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domain1, but it may fail since Intellij confuses the Windows and Linux paths. To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in InteliJ and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL dataverse project.Then press ``Download IDE and Connect``. This will install InteliJ in WSL in ``~/.cache/JetBrains/``. Now in InteliJ you should see your project opened in a new InteliJ window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. From 2e497a65aa609eff3934a914951b18da217dac9d Mon Sep 17 00:00:00 2001 From: Victoria Lubitch <43550154+lubitchv@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:54:23 -0400 Subject: [PATCH 17/18] Update doc/sphinx-guides/source/developers/windows.rst Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/developers/windows.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 09060b801ad..54a30e95aef 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -97,7 +97,7 @@ to disable WSL Hyperviser from firewall. After that you should be able to build the project in Intellij. It seems that at present it is impossible to deploy the Glassfish application in Intellij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domain1, but it may fail since Intellij confuses the Windows and Linux paths. -To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in InteliJ and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL dataverse project.Then press ``Download IDE and Connect``. This will install InteliJ in WSL in ``~/.cache/JetBrains/``. Now in InteliJ you should see your project opened in a new InteliJ window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. +To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in Intellij and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your Linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL Dataverse project. Then press ``Download IDE and Connect``. This will install Intellij in WSL in ``~/.cache/JetBrains/``. Now in Intellij you should see your project opened in a new Intellij window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. PgAdmin in Windows for Dataverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From bfcebb879e8e7d343464e73447084f22662591a4 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 10 Jul 2024 12:05:17 -0400 Subject: [PATCH 18/18] tweak docs and add release note #10606 --- .../10606-dataverse-in-windows-wsl.md | 1 + .../source/developers/windows.rst | 45 +++++++++++-------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 doc/release-notes/10606-dataverse-in-windows-wsl.md diff --git a/doc/release-notes/10606-dataverse-in-windows-wsl.md b/doc/release-notes/10606-dataverse-in-windows-wsl.md new file mode 100644 index 00000000000..9501d6e3090 --- /dev/null +++ b/doc/release-notes/10606-dataverse-in-windows-wsl.md @@ -0,0 +1 @@ +New instructions have been added for developers on Windows trying to run a Dataverse development environment using Windows Subsystem for Linux (WSL). See https://dataverse-guide--10608.org.readthedocs.build/en/10608/developers/windows.html #10606 and #10608. diff --git a/doc/sphinx-guides/source/developers/windows.rst b/doc/sphinx-guides/source/developers/windows.rst index 54a30e95aef..699b64c1e1f 100755 --- a/doc/sphinx-guides/source/developers/windows.rst +++ b/doc/sphinx-guides/source/developers/windows.rst @@ -12,19 +12,23 @@ Running Dataverse in Docker on Windows See the `post `_ by Akio Sone for additional details, but please observe the following: -- In git, the line-ending setting should be set to always LF (line feed, ``core.autocrlf=input``) - You must have jq installed: https://jqlang.github.io/jq/download/ +- In git, the line-ending setting should be set to always LF (line feed, ``core.autocrlf=input``). Update: This should have been fixed by https://github.com/IQSS/dataverse/pull/10092. -One the above is all set you can move on to :doc:`/container/dev-usage` in the Container Guide. +Once the above is all set you can move on to :doc:`/container/dev-usage` in the Container Guide. + +Generally speaking, if you're having trouble running a Dataverse dev environment in Docker on Windows, you are highly encouraged to post about it in the #containers channel on Zulip (https://chat.dataverse.org) and join a Containerization Working Group meeting (https://ct.gdcc.io). See also :doc:`/container/intro` in the Container Guide. Running Dataverse in Windows WSL -------------------------------- -It is possible to run Dataverse in Windows 10 and 11 through WSL (Windows subsystem for Linux) +It is possible to run Dataverse in Windows 10 and 11 through WSL (Windows Subsystem for Linux). + +Please note: these instructions have not been extensively tested. If you find any problems, please open an issue at https://github.com/IQSS/dataverse/issues. Install WSL ~~~~~~~~~~~ -If you have Docker already installed, you should already have WSL installed, otherwise open PowerShell and run: +If you have Docker already installed, you should already have WSL installed. Otherwise open PowerShell and run: .. code-block:: powershell @@ -45,13 +49,13 @@ Choose the distribution you would like. Then run the following command. These in wsl --install -d You will be asked to create a Linux user. -After the installation of Linux is complete, check that you have an internet connection: +After the installation of Linux is complete, check that you have an Internet connection: .. code-block:: bash ping www.google.com -If you do not have an internet connection try adding it in ``/etc/wsl.conf`` +If you do not have an Internet connection, try adding it in ``/etc/wsl.conf`` .. code-block:: bash @@ -75,32 +79,35 @@ Install Dataverse ~~~~~~~~~~~~~~~~~ Now you can install Dataverse in WSL following the instructions for :doc:`classic-dev-env` -At the end check that you have ``-Ddataverse.pid.default-provider=fake`` in jvm-options. +At the end, check that you have ``-Ddataverse.pid.default-provider=fake`` in jvm-options. Now you can access Dataverse in your Windows browser (Edge, Chrome, etc.): - - http://localhost:8080 - - username: dataverseAdmin - - password: admin +- http://localhost:8080 +- username: dataverseAdmin +- password: admin IDE for Dataverse in Windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Files in WSL are accessible from Windows for editing using ``\\wsl.localhost`` or ``\\wsl$`` path. Windows files are accessible under Linux in the ``/mnt/c/`` directory. Therefore one can use one's favorite editor or IDE to edit Dataverse project files. Then one can build using ``mvn`` in WSL and deploy manually in WSL using ``asadmin``. -It is still though possible to use a full-strength IDE. The following instructions are for Intellij users. +It is still though possible to use a full-strength IDE. The following instructions are for IntelliJ users. - Install Intelij in Windows. -You can open the project through ``\\wsl.localhost`` and navigate to Dataverse project. -You can try to build the project in Intellij. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by firewall).`` In that case you can try -to disable WSL Hyperviser from firewall. -After that you should be able to build the project in Intellij. -It seems that at present it is impossible to deploy the Glassfish application in Intellij. You can try to add Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domain1, but it may fail since Intellij confuses the Windows and Linux paths. +You can open the project through ``\\wsl.localhost`` and navigate to the Dataverse project. +You can try to build the project in IntelliJ. You may get a message ``Cannot establish network connection from WSL to Windows host (could be blocked by the firewall).`` In that case you can try +to disable WSL Hyperviser from the firewall. +After that you should be able to build the project in IntelliJ. +It seems that at present it is impossible to deploy the Glassfish application in IntelliJ. You can try to add a Glassfish plugin through Settings->Plugins and in Run->Edit Configurations configure Application Server from WSL ``/usr/localhost/payara6`` with URL http://localhost:8080 and Server Domain as domain1, but it may fail since IntelliJ confuses the Windows and Linux paths. -To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in Intellij and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your Linux distribution and press ``Next``. In ``Prpject Directory`` navigate to WSL Dataverse project. Then press ``Download IDE and Connect``. This will install Intellij in WSL in ``~/.cache/JetBrains/``. Now in Intellij you should see your project opened in a new Intellij window. After adding Glassfish plugin and editing configuration you should be able to build the project and run the project. +To use the full strength of Intelij with build, deployment and debugging, one will need to use Intelij ``Remote development``. Close all the projects in IntelliJ and go to ``Remote development->WSL`` and press ``New Project``. In WSL instance choose your Linux distribution and press ``Next``. In ``Project Directory`` navigate to WSL Dataverse project. Then press ``Download IDE and Connect``. This will install IntelliJ in WSL in ``~/.cache/JetBrains/``. Now in IntelliJ you should see your project opened in a new IntelliJ window. After adding the Glassfish plugin and editing your configuration you should be able to build the project and run the project. -PgAdmin in Windows for Dataverse +pgAdmin in Windows for Dataverse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can access The Dataverse database from Windows. Install pgAdmin https://www.pgadmin.org/download/pgadmin-4-windows/ In pgAdmin register a server using 127.0.0.1 with port 5432, database dvndb and dvnapp as username with secret password. Now you will be able to access and update Dataverse database. +You can access the Dataverse database from Windows. + +Install pgAdmin from https://www.pgadmin.org/download/pgadmin-4-windows/ +In pgAdmin, register a server using 127.0.0.1 with port 5432, database dvndb and dvnapp as username with secret password. Now you will be able to access and update the Dataverse database.