frontend

Meta package for the HIP Frontend: Gateway and web application

https://github.com/hip-infrastructure/frontend

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Meta package for the HIP Frontend: Gateway and web application

Basic Info
  • Host: GitHub
  • Owner: HIP-infrastructure
  • License: apache-2.0
  • Language: Makefile
  • Default Branch: master
  • Homepage:
  • Size: 1.23 MB
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 1
  • Open Issues: 18
  • Releases: 0
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme License Zenodo

README.md

HIP Frontend

Meta package for NextCloud, HIP web app and gateway API

This is the install for the HIP frontend

Includes

  • Nextcloud install nextcloud-docker
  • Nextcloud HIP app hip
  • HIP Gateway gateway
  • https://github.com/HIP-infrastructure/bids-converter
  • https://github.com/HIP-infrastructure/nextcloud-social-login

The install is based on make and git submodules. As the package will migrate to K8s, everything is build on the host

Prerequisite

  • Ubuntu 22.04
  • A Keycloak instance
    • as in https://github.com/HIP-infrastructure/keycloak
    • as well as the collab backend install_keycloak_backend.sh
  • Nextcloud 24.0.x installed, as in Nextcloud install
  • Configured Nextcloud for the HIP: NextcloudConfig.md)

Deploy, production

  • Clone this repo, git clone --recurse-submodules https://github.com/HIP-infrastructure/frontend.git
  • cd frontend
  • git checkout master
  • You can checkout the submodules to the desired branch, default is the latest version
  • Copy .env.template to .env and edit the variables according to your needs.

First time install

  • install all the dependencies by calling
  • ./hip-required_ubuntu-22.04.sh
  • You might want to logout and login again, in order to gain access to the docker command for your current user

GhostFS

  • a distributed file system tailored to the HIP
  • make install-ghostfs
  • You will need to provide a user/password for the server, that you will need to install on the backend)
  • pm2 cannot start ghostfs at this time, as Nextcloud data storage doesn't exist yet. A pm2 error for the service is ok at this time.

Nextcloud

if you want to migrate an existing install to a new location, here are a few tips Nextcloud-migration.md

Create a folder named secrets and add the following txt files to nextcloud-docker/secrets : - nextcloudadminpassword.txt # put admin password to this file - nextcloudadminuser.txt # put admin username to this file - postgresdb.txt # put postgresql db name to this file - postgrespassword.txt # put postgresql password to this file - postgres_user.txt # put postgresql username to this file

  • make install-nextcloud Nextcloud will fail. Don't bother
  • Once Nextcloud is installed, we need to replace the created php-settings by our own in order to parametrize it for docker etc.

    • sudo rm -rf /mnt/nextcloud-dp/php-settings
    • sudo cp -r php-settings /mnt/nextcloud-dp
  • make install-nextcloud It will fail, again.

    • make occ c=maintenance:install
    • Nextcloud install asks fo a password for admin, use the one provided in secrets in [nextcloudadminpassword.txt]
  • Add some params to the Nextcloud php config in /mnt/nextcloud-dp/nextcloud/config/config.php 'htaccess.RewriteBase' => '/', 'htaccess.IgnoreFrontController' => true, 'defaultapp' => 'hip', 'trusted_domains' => ['hip.local'],

  • make install

  • Open your browser to your ip or hostname

  • Access NextCloud with admin/[nextcloudadminpassword.txt]

  • NextCloud could complain about Access through untrusted domain, and in that case, re-add your domain to the /mnt/nextcloud-dp/nextcloud/config/config.php file again. This yhould fix it.

  • sudo pm2 restart all to restart ghostfs

Social-login app, OIDC client, groups

Social login is a Nextcloud app, customized for our need, helping the OIDC login process for users.

  • With the current Keycloak setup, you need an EBRAINS account.
    • Either on production https://iam.ebrains.eu/register or development, https://[iam-provider-url]/register
  • Center will be mapped to EBRAINS keycloak groups, we will need to add you there manually on EBRAINS for authorization purposes.
  • Create a group for your Center via the NC api.

    • make occ c="group:add --display-name CHUV chuv"
  • Open settings under you profile, on the top right.

  • Choose "Social Login" under the administration menu, in the left sidebar

    • [x] Update user profile every login
    • [x] Hide default login
    • [x] Button text without prefix
  • Add a Custom OpenID Connect client.

| Key | Value | | --- | --- | | Internal name | dev.thehip.app | | Title | EBRAINS-INT | | Authorize url | https://[iam-provider-url]/auth/realms/hbp/protocol/openid-connect/auth | | Token url | https://[iam-provider-url]/auth/realms/hbp/protocol/openid-connect/token | | Display name claim (optional) | name | | Username claim (optional) | preferredusername | | User info URL (optional) | https://[iam-provider-url]/auth/realms/hbp/protocol/openid-connect/userinfo | | Client Id | [iam-clientid] | | Client Secret | [iam-client_secret] | | Scope | openid group profile email roles team | | Groups claim (optional) | roles.group |

Add group mapping

| Key | Value | | --- | --- | | group-HIP-dev-CHUV | chuv |

Save everything, logout, and try to login with your EBBRAINS credentials

Deploy, dev

Change the NODE_ENV to development in the .env file

make dev-install

deploy/reload gateway make dev-install-gateway

Quick summary for make (after install)

install-ghostfs Stop, update and install GhostFS only status Show the status of the HIP install-web Build & install the webapp and the gateway start Start all services (-GhostFS) stop Stop all services (-GhostFS) maintenance Enable/disable maintenance mode (make maintenance-on/maintenance-off) dc Run docker-compose (make dc c="ps") dev-install Install dev stack for frontend & gateway, use update branch=dev to switch branch, you should have NODE_ENV=development dev-install-gateway Restart the dev gateway help List available tasks on this project

Acknowledgement

This project has received funding from the European Union's Horizon Europe research and innovation program under grant agreement No 101147319 and from the Swiss State Secretariat for Education, Research and Innovation (SERI) under contract number 23.00638, as part of the Horizon Europe project “EBRAINS 2.0”.

This research was supported by the EBRAINS research infrastructure, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).

Owner

  • Name: HIP Infrastructure
  • Login: HIP-infrastructure
  • Kind: organization

GitHub Events

Total
  • Delete event: 6
  • Issue comment event: 5
  • Push event: 37
  • Pull request review comment event: 1
  • Pull request review event: 5
  • Pull request event: 36
  • Create event: 8
Last Year
  • Delete event: 6
  • Issue comment event: 5
  • Push event: 37
  • Pull request review comment event: 1
  • Pull request review event: 5
  • Pull request event: 36
  • Create event: 8

Dependencies

.github/workflows/gitlab-sync.yml actions
  • actions/checkout v2 composite
  • wangchucheng/git-repo-sync v0.1.0 composite
docker-compose-dev.yml docker
docker-compose.yml docker
pm2/package-lock.json npm
  • dotenv 10.0.0
pm2/package.json npm
  • dotenv ^10.0.0