team19hackathon2021 / issues-chris

0 stars 0 forks source link

define the ChRIS store systemd service file. #53

Closed computate closed 3 years ago

computate commented 3 years ago

Mission define the ChRIS store systemd service file.

Mission

Your mission, should you choose to accept it, is define the ChRIS store systemd service file. .

The day of the operation is October 26th, 2021

You will have 4 hours to complete your mission.

ChRIS is a pervasively open source platform that utilizes cloud technologies to democratize medical analytics application development. It enables healthcare organizations to keep owning their data while benefiting from public cloud processing capabilities. ChRIS is developed as part of a collaborative effort between Boston Children’s Hospital, Red Hat, Boston University, and the Mass Open Cloud (MOC). ChRIS allows researchers the ability to simply deploy their applications in a cloud infrastructure with access to more data, more compute, and more collaboration to drive medical innovation. ChRIS uses leading open source technologies to standardize cloud-based healthcare application development, taking care of the infrastructure so medical researchers can focus on their data.

You will be joining a team of the boldest

of all Red Hatters for this mission, who will be at your service developing the code and automating the deployment to OpenShift.

How to get started:

Follow the instructions here to setup the project: https://github.com/team19hackathon2021/ChRIS_ultron_backEnd/tree/master/ansible

The details of your mission:

create the code

Create a new file: /usr/local/src/ChRIS_ultron_backEnd/ansible/roles/chris_store/templates/chris_store.service

[Unit]
Description=
After=network.service

[Service]
Type=simple
User={{ APP_USER }}
ExecStart=/usr/bin/podman run --name {{ STORE_NAME }}\{\% if APP_POD_NETWORK is defined \%\} --pod {{ STORE_POD }}\{\% endif \%\}\{\% if APP_CONTAINER_NETWORK is defined \%\} --network {{ APP_CONTAINER_NETWORK }}\{\% endif \%\} --rm -e "DJANGO_SETTINGS_MODULE=config.settings.production" -e "DJANGO_DB_MIGRATE=on" -e "DJANGO_ALLOWED_HOSTS=*" -e 'DJANGO_SECRET_KEY={{ APP_SECRET_KEY }}' -e "DJANGO_CORS_ORIGIN_ALLOW_ALL=true" -e "DJANGO_CORS_ORIGIN_WHITELIST=babymri.org" -e "DJANGO_SECURE_PROXY_SSL_HEADER=" -e "DJANGO_USE_X_FORWARDED_HOST=false" -e "DATABASE_HOST={{ STORE_HOSTNAME }}" -e "DATABASE_PORT={{ DEV_DB_PORT }}" -e "SWIFT_AUTH_URL=http://{{ SWIFT_HOSTNAME }}:{{ SWIFT_PORT }}/auth/v1.0" -e "POSTGRES_DB={{ STORE_DB_DATABASE }}" -e "POSTGRES_USER={{ STORE_DB_USER }}" -e "POSTGRES_PASSWORD={{ STORE_DB_PASSWORD }}" -e "SWIFT_USERNAME={{ SWIFT_USERNAME }}" -e "SWIFT_KEY={{ SWIFT_KEY }}" -e "SWIFT_CONTAINER_NAME=store_users" {{ STORE_IMAGE }}:{{ STORE_VERSION }} python manage.py runserver 0.0.0.0:{{ STORE_PORT }}
ExecStop=/usr/bin/podman rm {{ STORE_NAME }} -f
Restart=on-failure

[Install]
WantedBy=multi-user.target

This message will not self-destruct.

This message will not self destruct, because this project is open source.

pcunning-rh commented 3 years ago

Closed with https://github.com/team19hackathon2021/ChRIS_ultron_backEnd/pull/34