{"id":19612139,"url":"https://github.com/fnndsc/chris_store","last_synced_at":"2025-04-27T22:34:00.630Z","repository":{"id":40392484,"uuid":"119867165","full_name":"FNNDSC/ChRIS_store","owner":"FNNDSC","description":"Backend for ChRIS plugin apps store","archived":false,"fork":false,"pushed_at":"2023-09-20T22:09:18.000Z","size":561,"stargazers_count":11,"open_issues_count":12,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-05T04:31:51.989Z","etag":null,"topics":["django","django-rest-framework","docker","kubernetes","medical","openshift","pipelines","python3","swift-storage"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FNNDSC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-01T17:08:51.000Z","updated_at":"2022-10-28T03:03:59.000Z","dependencies_parsed_at":"2024-11-11T10:56:19.689Z","dependency_job_id":null,"html_url":"https://github.com/FNNDSC/ChRIS_store","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FNNDSC","download_url":"https://codeload.github.com/FNNDSC/ChRIS_store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251219600,"owners_count":21554444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","docker","kubernetes","medical","openshift","pipelines","python3","swift-storage"],"created_at":"2024-11-11T10:46:09.340Z","updated_at":"2025-04-27T22:33:55.617Z","avatar_url":"https://github.com/FNNDSC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![ChRIS logo](https://github.com/FNNDSC/ChRIS_store/blob/master/docs/assets/logo_chris.png) ChRIS_store\n[![Build Status](https://travis-ci.org/FNNDSC/ChRIS_store.svg?branch=master)](https://travis-ci.org/FNNDSC/ChRIS_store)\n![License][license-badge]\n![Last Commit][last-commit-badge]\n\nBackend for the ChRIS store. This is a Django-PostgreSQL project that houses descriptions of ChRIS plugin-apps and workflows for registering to a ChRIS CUBE instance.\n\n## ChRIS store development, testing and deployment\n\n### Abstract\n\nThis page describes how to quickly get the set of services comprising the backend up and running for development and how to run the automated tests. A production deployment of the ChRIS store backend services is also explained.\n\n### Preconditions\n\n#### Install latest Docker and Docker Compose \n\nCurrently tested platforms:\n* ``Ubuntu 18.04+ and MAC OS X 10.14+ and Fedora 31+`` ([Additional instructions for Fedora](https://github.com/mairin/ChRIS_store/wiki/Getting-the-ChRIS-Store-to-work-on-Fedora))\n* ``Docker 18.06.0+``\n* ``Docker Compose 1.27.0+``\n\n#### On a Linux machine make sure to add your computer user to the ``docker`` group \n\nConsult this page: https://docs.docker.com/engine/install/linux-postinstall/\n\n### TL;DR\n\nIf you read nothing else on this page, and just want to get an instance of the ChRIS store backend services up and \nrunning with no mess, no fuss:\n\n```bash\ngit clone https://github.com/FNNDSC/ChRIS_store.git\ncd ChRIS_store\n./make.sh down ; ./make.sh up\n```\n\nThe resulting instance uses the default Django development server and therefore is not suitable for production.\n\n### Production deployment on a single-machine Docker Swarm cluster\n\n#### To get the production system up:\n\nStart a local Docker Swarm cluster if not already started:\n\n```bash\ndocker swarm init --advertise-addr 127.0.0.1\n```\n\nFetch source code:\n\n```bash\ngit clone https://github.com/FNNDSC/ChRIS_store\ncd ChRIS_store\n```\n\nCreate ``secrets`` directory:\n\n```bash\nmkdir swarm/prod/secrets\n```\n\nNow copy all the required secret configuration files into the ``secrets`` directory, please take a look at \n[this](https://github.com/FNNDSC/ChRIS_store/wiki/ChRIS-store-backend-production-services-secret-configuration-files) \nwiki page to learn more about these files \n\nDeploy ChRIS store backend containers:\n\n```bash\n./deploy.sh up\n```\n\n#### To tear down:\n\nRemove ChRIS store backend containers:\n\n```bash\ncd ChRIS_store\n./deploy.sh down\n```\n\nRemove the local Docker Swarm cluster if desired:\n\n```bash\ndocker swarm leave --force\n```\n\n\n### Development\n\n### Instantiate ChRIS Store dev environment\n\nStart ChRIS Store services by running the make bash script from the repository source directory\n\n```bash\ngit clone https://github.com/FNNDSC/ChRIS_store.git\n./make.sh up\n```\nAll the steps performed by the above script are properly documented in the script itself. \n\nAfter running this script all the automated tests should have successfully run and a Django development server should be running in interactive mode in this terminal.\n\n#### Rerun automated tests after modifying source code\n\nOpen another terminal and run the Unit and Integration tests within the container running the Django server:\n\nTo run only the Unit tests:\n\n```bash\ncd ChRIS_store\ndocker-compose -f docker-compose_dev.yml exec chris_store_dev python manage.py test --exclude-tag integration\n```\n\nTo run only the Integration tests:\n\n```bash\ndocker-compose -f docker-compose_dev.yml exec chris_store_dev python manage.py test --tag integration\n```\n\nTo run all the tests:\n\n```bash\ndocker-compose -f docker-compose_dev.yml exec chris_store_dev python manage.py test \n```\n\n\n#### Check code coverage of the automated tests\nMake sure the ``store_backend/`` dir is world writable. Then type:\n\n```bash\ndocker-compose -f docker-compose_dev.yml exec chris_store_dev coverage run --source=plugins,pipelines,users manage.py test\ndocker-compose -f docker-compose_dev.yml exec chris_store_dev coverage report\n```\n\n### Using [HTTPie](https://httpie.org/) to play with the REST API \n\n#### A simple GET request:\n```bash\nhttp http://localhost:8010/api/v1/\n```\n\n#### A simple POST request to register a new plugin app in the store:\nFirst save the plugin representation json file by running the plugin with the `--savejson` flag:\n```bash\ndocker run --rm -v /tmp/json:/json fnndsc/pl-simplefsapp simplefsapp --savejson /json\n```\nThen upload the plugin representation json file to the ChRIS Store as part of the `POST` request:\n```bash\nhttp -a cubeadmin:cubeadmin1234 -f POST http://localhost:8010/api/v1/plugins/ dock_image=fnndsc/pl-simplefsapp descriptor_file@/tmp/json/SimpleFSApp.json public_repo=https://github.com/FNNDSC/pl-simplefsapp name=pl-simplefsapp\n```\n\n#### An unauthenticated POST request to create a new ChRIS store user account:\n```bash\nhttp POST http://localhost:8010/api/v1/users/ Content-Type:application/vnd.collection+json Accept:application/vnd.collection+json template:='{\"data\":[{\"name\":\"email\",\"value\":\"developer@babymri.org\"}, {\"name\":\"password\",\"value\":\"newstoreuser1234\"}, {\"name\":\"username\",\"value\":\"newstoreuser\"}]}'\n```\n\n### Destroy ChRIS Store dev environment\n\nStop and remove ChRIS Store services by running the make bash script from the repository source directory\n\n```bash\n./make.sh down\n```\n\n### REST API Documentation\n\nAvailable [here](https://fnndsc.github.io/ChRIS_store).\n\nInstall Sphinx and the http extension (useful to document the REST API)\n```\npip install Sphinx\npip install sphinxcontrib-httpdomain\n```\n\nBuild the html documentation\n```\ncd docs/\nmake html\n```\n\n\n[license-badge]: https://img.shields.io/github/license/fnndsc/chris_store.svg\n[last-commit-badge]: https://img.shields.io/github/last-commit/fnndsc/chris_store.svg\n\n### Learn More\n\nIf you are interested in contributing or joining us, Check [here](http://chrisproject.org/join-us).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fchris_store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnndsc%2Fchris_store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fchris_store/lists"}