Giter Club home page Giter Club logo

app-worship-harvester's Introduction

app-worship-harvester


Table of content


Description

Based on the mu-semtech microservice architecture for the backend en Emberjs for the frontend.


List of Services

Service Repository
identifier https://github.com/mu-semtech/mu-identifier
dispatcher https://github.com/mu-semtech/mu-dispatcher
database https://github.com/mu-semtech/mu-authorization
virtuoso https://github.com/tenforce/docker-virtuoso
migrations https://github.com/mu-semtech/mu-migrations-service
cache https://github.com/mu-semtech/mu-cache
delta-notifier https://github.com/mu-semtech/delta-notifier
file https://github.com/mu-semtech/file-service
harvesting-download-url https://hub.docker.com/r/lblod/download-url-service
harvesting-initiation https://github.com/lblod/harvesting-initiation-service
harvest-collector https://github.com/lblod/harvest-collector-service
harvesting-import https://github.com/lblod/harvesting-import-service
harvesting-validator https://github.com/lblod/harvesting-validator
resource https://github.com/mu-semtech/mu-cl-resources

Setup

Clone this repository

git clone https://github.com/lblod/app-worship-harvester.git

Move into the directory

cd app-worship-harvester

Start the system

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d

It takes a minute before everything is up and running. In case there is an error the first time you launch, just stopping and relaunching docker compose should resolve any issues.

Visit the App!

Simply visit http://localhost:80 and you will redirected to the yasgui sparql interface. More info about the frontend in the frontend section below.


Frontend

Technologies

The frontend is what the user actually interacts with. With the use of our addons you are presented with a sparql interface and when visiting different routes with the corresponding , rdf-friendly, data. It is build on top of the Ember.js framework. And server side rendered by Fastboot

Setting up the delta-producers related services

To make sure the app can share data, producers need to be set up. There is an intial sync, that is potentially very expensive, and must be started manually

producers besluiten

  1. make sure the app is up and running, the migrations have run
  2. in docker-compose.override.yml, make sure the following configuration is provided:
  delta-producer-background-jobs-initiator-besluiten:
    environment:
      START_INITIAL_SYNC: 'true'
  1. drc up -d delta-producer-background-jobs-initiator-besluiten
  2. You can follow the status of the job, through the dashboard

Authentication

This app allows you to both add authentication fields to the job & scheduled-jobs request as protect the app from unauthorized access via both the frontend app and api. To allow authentication you need to add an environment variable to the frontend-harvester-self-service service and update the mu-auth config.

Frontend service

Add the EMBER_AUTHENTICATION_ENABLED environment variable to the frontend service and set it to TRUE

frontend:
    image: lblod/frontend-harvesting-self-service:1.9.2
    environment:
      EMBER_AUTHENICATION_ENABLED: 'true'
    volumes:
      - ./config/frontend:/config
    labels:
      - "logging=true"
    restart: always
    logging: *default-loggingEMBER_AUTHENICATION_ENABLED: 'true'

mu-auth

Add the following function to the config:

defmodule Acl.UserGroups.Config do
  ...
  defp logged_in_user() do
    %AccessByQuery{
      vars: [],
      query: "PREFIX session: <http://mu.semte.ch/vocabularies/session/>
              SELECT DISTINCT ?account WHERE {
                  <SESSION_ID> session:account ?account.
        }"
      }
  end
  ...

Set the access function of the harvesting group to the logged_in_user() function:

  ...
  def user_groups do
    [
      # Harvesting
      %GroupSpec{
        name: "harvesting",
        useage: [:write, :read_for_write, :read],
        access: logged_in_user(),
        graphs: [ %GraphSpec{
          ...

Note: make sure you are running a frontend-harvesting-self-service version that has the AUTHENTICATION_ENABLED feature flag

At last you will need to remove the DEFAULT_MU_AUTH_ALLOWED_GROUPS_HEADER & DEFAULT_ACCESS_CONTROL_ALLOW_ORIGIN_HEADER variables from the identifier service.

To have access to the frontend app you will need to create an account through migrations.

Additional notes
Performance
  • The default virtuoso settings might be too weak if you need to ingest the production data. Hence, there is better config, you can take over in your docker-compose.override.yml
  virtuoso:
    volumes:
      - ./data/db:/data
      - ./config/virtuoso/virtuoso-production.ini:/data/virtuoso.ini
      - ./config/virtuoso/:/opt/virtuoso-scripts
delta-producer-report-generator

Not all required parameters are provided, since deploy specific, see report-generator

deliver-email-service

Should have credentials provided, see deliver-email-service

app-worship-harvester's People

Contributors

poltergeistz avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.