From 4c6c6eec6fd3366ec5cf105cd17fca394eb76172 Mon Sep 17 00:00:00 2001 From: Agah Date: Mon, 23 Sep 2024 03:30:23 -0400 Subject: [PATCH] Cleanup archive --- source/FULLSTACK.md | 33 +++++++++++++++++++ source/WORKFLOW_BACKEND.rst | 14 -------- .../{ => archive}/BAREMETAL_TO_BINDERHUB.rst | 0 .../BAREMETAL_TO_DOCKER_REGISTRY.rst | 0 source/{ => archive}/BINDERHUB_TEST_MODE.rst | 0 source/index.rst | 3 -- 6 files changed, 33 insertions(+), 17 deletions(-) delete mode 100644 source/WORKFLOW_BACKEND.rst rename source/{ => archive}/BAREMETAL_TO_BINDERHUB.rst (100%) rename source/{ => archive}/BAREMETAL_TO_DOCKER_REGISTRY.rst (100%) rename source/{ => archive}/BINDERHUB_TEST_MODE.rst (100%) diff --git a/source/FULLSTACK.md b/source/FULLSTACK.md index e8d5803..38bd1a3 100644 --- a/source/FULLSTACK.md +++ b/source/FULLSTACK.md @@ -1,3 +1,36 @@ +# Terraform deployment + +Both `preprint` and `preview` flavors of the full-stack server can be deployed and managed using Terraform. This modular approach allows for easy scaling and customization of the server infrastructure. Currently, the available providers support OpenStack only, yet the modular approach allows for easy integration with other cloud providers. + +## Deploy in 6 steps + +Assuming that you have the terraform CLI installed, have ssh access to the target OpenStack project, and have the necessary permissions to create instances, volumes, and other resources, you can deploy the full-stack server in 6 steps: + +- Clone infralibre: `git clone https://github.com/neurolibre/infralibre.git` +- Copy over the files from `terraform-modules/providers/openstack-neurolibre-server` to a directory on your local machine +- Source the OpenStack credentials and set necessary variables +- Run `terraform init` to initialize the working directory +- Run `terraform plan` to see the execution plan +- Run `terraform apply` to apply the changes + +that's it! + +- Run `terraform destroy` to destroy the infrastructure + +Ability to create/destroy the server easily should not give you license not to understand what you are doing. The rest of this section is dedicated to explaining what each of the server components is responsible for and how they interact with each other. + +The only glitch you may have to deal with is mounting the external-data volume. The volume will be created and attached to the instance if you specified NOT to use an existing volume (by UUID). In this case, it will not be formatted with ext4, so you will have to do that with the following command: + +``` +lsblk # Figure out the name of the volume, e.g. `/dev/vdc` +sudo mkfs.ext4 /dev/vdc # Format the volume +sudo mount /dev/vdc /DATA # Mount the volume +sudo chown -R ubuntu:ubuntu /DATA # Make sure the volume is owned by the user +sudo chmod -R 755 /DATA # Make sure the volume is writable +``` + +# Comprehensive documentation + ## Full-stack server components NeuroLibre operates two servers dedicated to serving static files and API endpoints. These servers are designed to provide essential resources and functionality for various purposes, including testing, technical reviews of NeuroLibre Reproducible Preprints (NRPs), and post-publication access, where the resources are reserved for published NRPs only. diff --git a/source/WORKFLOW_BACKEND.rst b/source/WORKFLOW_BACKEND.rst deleted file mode 100644 index 059567f..0000000 --- a/source/WORKFLOW_BACKEND.rst +++ /dev/null @@ -1,14 +0,0 @@ -Submission workflow backend -=========================== - -The submission workflow backend has several components that are still not part of the terraform installation. -It is divided into multiple parts: -* the data server which serves the jupyter books -* the python API to communicate with the bind, communicate with the API, archive and deal with DOIs. -* front-end for the website design, forked from `JOSS `_ - -Data server and python API -:::::::::::::::::::::::::: - -You will find all instructions in the github repo: https://github.com/neurolibre/neurolibre-data-api -It has two branches: ``main`` for the test server and ``prod`` for the production server. \ No newline at end of file diff --git a/source/BAREMETAL_TO_BINDERHUB.rst b/source/archive/BAREMETAL_TO_BINDERHUB.rst similarity index 100% rename from source/BAREMETAL_TO_BINDERHUB.rst rename to source/archive/BAREMETAL_TO_BINDERHUB.rst diff --git a/source/BAREMETAL_TO_DOCKER_REGISTRY.rst b/source/archive/BAREMETAL_TO_DOCKER_REGISTRY.rst similarity index 100% rename from source/BAREMETAL_TO_DOCKER_REGISTRY.rst rename to source/archive/BAREMETAL_TO_DOCKER_REGISTRY.rst diff --git a/source/BINDERHUB_TEST_MODE.rst b/source/archive/BINDERHUB_TEST_MODE.rst similarity index 100% rename from source/BINDERHUB_TEST_MODE.rst rename to source/archive/BINDERHUB_TEST_MODE.rst diff --git a/source/index.rst b/source/index.rst index bdb20a6..171acdd 100644 --- a/source/index.rst +++ b/source/index.rst @@ -26,9 +26,6 @@ FULLSTACK INFRASTRUCTURE - BAREMETAL_TO_BINDERHUB - BAREMETAL_TO_DOCKER_REGISTRY - BINDERHUB_TEST_MODE WORKFLOW_BACKEND .. toctree::