added all new content authored by Paul's avatar Paul
**Table of Contents**
---
## System requirements
For detailed information about the VM / system requirements, check the ["System Requirements" page](/system/deployment/System-Requirements).
⚠️ The linked page also contains the nginx and docker setup. Both are needed in order to use the ReSeeD, so make sure to check it out.
## ReSeeD deployment
⚠️ We build the container images on a dedicated `builder` VM. For details, see the ["Image Building" page](/system/deployment/2_Image_Building).
The images are moved to the production instance. To continue the deployment we need the following files from the ReSeeD [source tree](https://gitlab.ruhr-uni-bochum.de/researchdata/rdms.git):
```
./create_volume_directories.sh
./docker-compose.yml
./hyrax/solr/*
.env
```
⚠️ Use the same branch from which the container images were built!
### Setup the ReSeeD config (.env)
```shell
git clone https://gitlab.ruhr-uni-bochum.de/researchdata/rdms.git
cd rdms/
cp .env.template .env
editor .env
```
When editing the `.env` file, set the values for following variables to unique random values (generated using something like `pwgen -s 64 1`):
```
SECRET_KEY_BASE_PRODUCTION=""
DEVISE_SECRET_KEY="" # Use long key, at least 50 characters or smth for both secret keys
```
Other variables to be set (this example is not for production, only for testing):
```
HYRAX_ANALYTICS=false
USE_SAML=false
REGISTER_DOI=false
USE_ORCID=false
```
Further details on the configuration parameters can be found [here](https://github.com/samvera/hyku#environment-variables).
⚠️ ReSeeD currently **cannot** be set up without S3!
ℹ The following is **generic** documentation about setting up S3. For detailed information about RUB-specific configuration, see [this internal-only page](https://gitlab.ruhr-uni-bochum.de/ITsFoWi/infrastructure/Rezepte/-/wikis/ReSeeD/S3_RUB).
```
# S3 configuration
USE_S3=true
S3_ENDPOINT="https://s3.example.net"
S3_ACCESS_KEY="some_example_access_key"
S3_SECRET_KEY="secret_change_me"
S3_REGION="us-east-1"
# S3_BUCKET_PREFIX needs to be unique to allow identical bucket names for different ReSeeD instances on Ceph S3
S3_BUCKET_PREFIX="prod-20240401-v1"
```
You can reach the new ReSeeD instance from your Docker host (for example by using SSH tunneling) by using the following URL: http://localhost:3000/users/sign_in
Using the latter URL, you won't be able to login. To log in to the instance, use the following URL: http://localhost:3000/users/system_sign_in -> **Noticed** the `system_`?
---
## Misc
⚠ Before executing the following commands, change into the `web-container`:
```shell
docker exec -u root -it reseed-web-1 /bin/bash
```
### Change / Set the password for the admin user
```
bash-5.1# rails c
irb(main):001:0> u1 = User.find_by(email: ENV['SYSTEM_ADMINISTRATOR'])
irb(main):001:0> u1.password = "example_password"
irb(main):001:0> u1.save
```
### Change / Set the password for the publication manager
```
bash-5.1# rails c
irb(main):001:0> u2 = User.find_by(email: ENV['SYSTEM_PUBLICATION_MANAGER'])
irb(main):001:0> u2.password = "example_password"
irb(main):001:0> u2.save
```
### Completely wipe everything, including the data
```shell
# Wipe containers and data
docker compose --file docker-compose.yml down --volumes
# Rebuild the containers
docker compose --file docker-compose.yml up --detach
sudo rm -rf volumes/
chmod u+x create_volume_directories.sh
./create_volume_directories.sh
```
ℹ You probably also want to delete the S3 buckets and their contents.