From 4dfa633ac7aa859bc4ce260648c8362f2fb2e9fa Mon Sep 17 00:00:00 2001 From: Emilien Thoreau Date: Mon, 19 Aug 2024 14:44:36 +0000 Subject: [PATCH 1/4] Update documentation and setup.py requirements --- doc/admin_doc/install_doc/installation.rst | 41 ++++++++++++---------- setup.py | 4 ++- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/doc/admin_doc/install_doc/installation.rst b/doc/admin_doc/install_doc/installation.rst index 26da7b4d6..dc9bca7cd 100644 --- a/doc/admin_doc/install_doc/installation.rst +++ b/doc/admin_doc/install_doc/installation.rst @@ -87,7 +87,7 @@ As previously said, INGInious needs some specific packages. Those can simply be .. code-block:: bash - sudo apt install git gcc tidy python3-pip python3-dev python3-venv libzmq3-dev apt-transport-https + sudo apt install git gcc tidy python3-pip python3-dev python3-venv libzmq3-dev apt-transport-https ca-certificates curl software-properties-common For Docker and MongoDB, some specific steps are needed: @@ -100,18 +100,18 @@ First, Docker: echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install docker-ce docker-ce-cli + docker info Then, Mongo: .. code-block:: bash - wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list + sudo apt install gnupg wget apt-transport-https ca-certificates software-properties-common + curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor + echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list sudo apt update - wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb - sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb - sudo apt install -y mongodb-org - + sudo apt install mongodb-org + mongosh --eval 'db.runCommand({ connectionStatus: 1 })' .. NOTE:: Libssl installation is a temporary fix that is not required for all versions. @@ -120,14 +120,13 @@ Then, Mongo: You may also add ``libxmlsec1-dev libltdl-dev`` for the SAML2 auth plugin. You can now start and enable the ``mongod`` and ``docker`` services: -:: - # systemctl daemon-reload - # systemctl start mongod - # systemctl enable mongod - # systemctl start docker - # systemctl enable docker +.. code-block:: bash + systemctl daemon-reload + systemctl enable --now docker + systemctl enable --now mongod + macOS @@ -153,7 +152,8 @@ The next step is to install `Docker for Mac Date: Tue, 20 Aug 2024 11:19:15 +0200 Subject: [PATCH 2/4] Update installation.rst --- doc/admin_doc/install_doc/installation.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/admin_doc/install_doc/installation.rst b/doc/admin_doc/install_doc/installation.rst index dc9bca7cd..0a87f5815 100644 --- a/doc/admin_doc/install_doc/installation.rst +++ b/doc/admin_doc/install_doc/installation.rst @@ -87,7 +87,7 @@ As previously said, INGInious needs some specific packages. Those can simply be .. code-block:: bash - sudo apt install git gcc tidy python3-pip python3-dev python3-venv libzmq3-dev apt-transport-https ca-certificates curl software-properties-common + sudo apt install git gcc tidy python3-pip python3-dev python3-venv libzmq3-dev apt-transport-https ca-certificates curl software-properties-common wget gnupg lsb-release For Docker and MongoDB, some specific steps are needed: @@ -95,7 +95,6 @@ First, Docker: .. code-block:: bash - sudo apt install curl gnupg lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update @@ -106,7 +105,6 @@ Then, Mongo: .. code-block:: bash - sudo apt install gnupg wget apt-transport-https ca-certificates software-properties-common curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list sudo apt update @@ -186,15 +184,14 @@ To keep a clean distribution, we recommend to work with a virtualenv: python3 -m venv /path/to/venv/INGInious source /path/to/venv/INGInious/bin/activate -Then install INGInious using the setup.py file +Then install INGInious using the setup.py file (more likely for production purpose) : .. code-block:: bash - pip install setuptools - python3 setup.py install + pip install inginious .. note:: - For development purpose you may want to run this command to remove the scripts from python folder : + For development purpose you might want to run this command to remove the scripts from python folder (ensuring that only ingenious dependencies are installed) : .. code-block:: bash pip uninstall inginious And then run the scripts from the installation folder From 71f5a97f46f37eadfe675a192b141e72a0df551e Mon Sep 17 00:00:00 2001 From: thremilien <51836065+thremilien@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:20:13 +0200 Subject: [PATCH 3/4] Update setup.py --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c21c2c710..367483f15 100644 --- a/setup.py +++ b/setup.py @@ -75,8 +75,7 @@ "saml2": ["python3-saml==1.16.0"], "uwsgi": ["uwsgi==2.0.24"], "test": test_requires, - "doc": test_requires + doc_requires, - "dev": install_requires + "doc": test_requires + doc_requires }, scripts=scripts, include_package_data=True, From 9961ed3795490770afd52b6dcbf3ebfdbeba3e7f Mon Sep 17 00:00:00 2001 From: thremilien <51836065+thremilien@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:22:27 +0200 Subject: [PATCH 4/4] typo --- doc/admin_doc/install_doc/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/admin_doc/install_doc/installation.rst b/doc/admin_doc/install_doc/installation.rst index 0a87f5815..6bcafba00 100644 --- a/doc/admin_doc/install_doc/installation.rst +++ b/doc/admin_doc/install_doc/installation.rst @@ -191,7 +191,7 @@ Then install INGInious using the setup.py file (more likely for production purpo pip install inginious .. note:: - For development purpose you might want to run this command to remove the scripts from python folder (ensuring that only ingenious dependencies are installed) : + For development purpose you might want to run this command to remove the scripts from python folder (ensuring that only inginious dependencies are installed) : .. code-block:: bash pip uninstall inginious And then run the scripts from the installation folder