team19hackathon2021 / issues-chris

0 stars 0 forks source link

define the Ansible tasks to install the queue application as a container in podman #59

Closed computate closed 3 years ago

computate commented 3 years ago

Mission define the Ansible tasks to install the queue application as a container in podman

Mission

Your mission, should you choose to accept it, is define the Ansible tasks to install the queue application as a container in podman.

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:

Setup the RabbitMQ data directory.

Create a new file: /usr/local/src/ChRIS_ultron_backEnd/ansible/roles/chris_queue/tasks/main.yml

---
# Setup the RabbitMQ data directory. 
- name: Create the {{ APP_NAME }} data directory {{ APP_QUEUE_DATA }}. 
  file:
    name: "{{ APP_QUEUE_DATA }}"
    state: directory
    owner: "{{ APP_USER }}"
    mode: 0777
  become: true
- name: set SELinux permissions on {{ APP_QUEUE_DATA }}
  sefcontext:
    target: "{{ APP_QUEUE_DATA }}(/.*)?"
    setype: container_file_t
  become: true
  vars:
    ansible_python_interpreter: "{{ APP_PYTHON }}"
- name: reload SELinux policy to ensure that {{ APP_NAME }} is executable
  command: "restorecon -irv {{ APP_QUEUE_DATA }}"
  become: true

Automate the deployment of RabbitMQ as a Podman container running as a Systemd service.


# Automate the deployment of RabbitMQ as a Podman container running as a Systemd service. 
- name: Create the {{ QUEUE_NAME }} systemd service {{ QUEUE_SYSTEMD }}. 
  template:
    src: chris_queue.service
    dest: "{{ QUEUE_SYSTEMD }}"
  become: true
  when: ansible_pkg_mgr != 'homebrew'
- name: Reload the services. 
  systemd:
    daemon_reload: true
  become: true
  when: ansible_pkg_mgr != 'homebrew'
- name: Start and enable the {{ QUEUE_SERVICE }} service. 
  service:
    name: "{{ QUEUE_SERVICE }}"
    enabled: true
    state: restarted
  become: true
  when: ansible_pkg_mgr != 'homebrew'

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/35/files