You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Michael Lygum Olesen 51a2b66350 Stub1 communication 5 years ago
.tx Claaudia Invenio Prototype 5 years ago
claaudia Stub1 communication 5 years ago
docker Claaudia Invenio Prototype 5 years ago
docs Claaudia Invenio Prototype 5 years ago
scripts Claaudia Invenio Prototype 5 years ago
tests Claaudia Invenio Prototype 5 years ago
.dockerignore Claaudia Invenio Prototype 5 years ago
.editorconfig Claaudia Invenio Prototype 5 years ago
.gitignore Claaudia Invenio Prototype 5 years ago
.travis.yml Claaudia Invenio Prototype 5 years ago
AUTHORS.rst Claaudia Invenio Prototype 5 years ago
CHANGES.rst Claaudia Invenio Prototype 5 years ago
CONTRIBUTING.rst Claaudia Invenio Prototype 5 years ago
Dockerfile Claaudia Invenio Prototype 5 years ago
INSTALL.rst Claaudia Invenio Prototype 5 years ago
LICENSE Claaudia Invenio Prototype 5 years ago
MANIFEST.in Add REST endpoints for 'datasets' and 'collections' 5 years ago
Pipfile Relax on python version on Pipfile 5 years ago
README.md Update 'README.md' 5 years ago
README.rst Claaudia Invenio Prototype 5 years ago
babel.ini Claaudia Invenio Prototype 5 years ago
docker-compose.full.yml Claaudia Invenio Prototype 5 years ago
docker-compose.yml Claaudia Invenio Prototype 5 years ago
docker-services.yml Claaudia Invenio Prototype 5 years ago
pytest.ini Claaudia Invenio Prototype 5 years ago
requirements.txt Add pipfile 5 years ago
run-tests.sh Claaudia Invenio Prototype 5 years ago
setup.cfg Claaudia Invenio Prototype 5 years ago
setup.py Add REST endpoints for 'datasets' and 'collections' 5 years ago

README.md

Notes

Prerequisites

# docker - in order to run Invenio infrastructure apps - see official docker docs.
# 
# pipenv (python3) - in order to manage python environments, etc 
# 
# On MAC use Homebrew (https://brew.sh)
brew install pipenv npm
# On Ubuntu (18.04): Check https://pypi.org/project/pipenv/
apt-get install python3-pip npm
pip3 install pipenv

Installation

mkdir -p /tmp/aau
cd /tmp/aau
git clone git@git.its.aau.dk:ca-netic/claaudia.aau.dk.git claaudia.aau.dk
cd claaudia.aau.dk
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
pipenv shell
pip install --editable '.[all]'
cd docker
docker-compose up -d
cd ..
./scripts/bootstrap
./scripts/setup
# Optionally enable github oauth: 
# Go to: https://github.com/settings/applications/new and register application.
# Use 'http://localhost:5000/oauth/authorized/github/' as 'Authorization callback URL'
# Copy 'secret' and 'key'
export GITHUB_APP_CREDENTIALS_SECRET=<secret>
export GITHUB_APP_CREDENTIALS_KEY=<key>
./scripts/server

Workaround logging issue

Workaround to weird flask/invenio-logging bug...

Run this to 'activate' logging!

curl -ks https://localhost:5000/ping

Posting data to REST API

Collection

echo '{
  "title": "Collection X",
  "description": "Desctiption of Collection X",
  "visibility": "public",
  "owner": {
    "id": "uuid",
    "email": "ca@netic.dk",
    "name": "Claus A"
  }
}' | curl -k --header "Content-Type: application/json" --request POST --data @- "https://localhost:5000/api/collections/?prettyprint=1"

Dataset

echo '{
  "title": "Dataset 1 - Collection X",
  "description": "Description of Dataset 1",
  "collection_id": "1",
  "bucket": {
    "volume": "volume_name",
    "id": "rbd_image_id",
    "name": "rbd_image_name",
    "size": "80TB"
  }
}' | curl -k --header "Content-Type: application/json" --request POST --data @- "https://localhost:5000/api/datasets/?prettyprint=1"

Browse: https://localhost:5000/

Cleanup

cd /tmp/aau/claaudia.aau.dk/docker
docker-compose down
cd /tmp/aau/claaudia.aau.dk
pipenv shell
pipenv --rm
cd /tmp/aau
rm -rf /tmp/aau/claaudia.aau.dk