forked from ca-netic/claaudia.aau.dk
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.
|
5 years ago | |
---|---|---|
.tx | 5 years ago | |
claaudia | 5 years ago | |
docker | 5 years ago | |
docs | 5 years ago | |
scripts | 5 years ago | |
tests | 5 years ago | |
.dockerignore | 5 years ago | |
.editorconfig | 5 years ago | |
.gitignore | 5 years ago | |
.travis.yml | 5 years ago | |
AUTHORS.rst | 5 years ago | |
CHANGES.rst | 5 years ago | |
CONTRIBUTING.rst | 5 years ago | |
Dockerfile | 5 years ago | |
INSTALL.rst | 5 years ago | |
LICENSE | 5 years ago | |
MANIFEST.in | 5 years ago | |
Pipfile | 5 years ago | |
README.md | 5 years ago | |
README.rst | 5 years ago | |
babel.ini | 5 years ago | |
docker-compose.full.yml | 5 years ago | |
docker-compose.yml | 5 years ago | |
docker-services.yml | 5 years ago | |
pytest.ini | 5 years ago | |
requirements.txt | 5 years ago | |
run-tests.sh | 5 years ago | |
setup.cfg | 5 years ago | |
setup.py | 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