-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/openhie/facility-recon in…
…to facility-recon-datim
- Loading branch information
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Ansible (CentOS only) | ||
|
||
To use Ansible, your SSH public key should be in `.ssh/authorized_keys` on the remote host and you must also create an /etc/ansible/hosts or similar with the IP address or hostname of the remote host. An `ansible/hosts` file that has an entry for localhost and one server would be: | ||
|
||
```sh | ||
[local] | ||
localhost ansible_connection=local | ||
|
||
[servers] | ||
172.16.174.137 | ||
``` | ||
The above example includes a working example for localhost configuration. | ||
|
||
## Installation | ||
|
||
Prerequisites (designed for CentoOS only): | ||
```sh | ||
ansible-playbook -i /usr/local/etc/ansible/hosts prep_centos.yaml | ||
``` | ||
|
||
Install the backend, frontend, and prepare the DHIS2 web application (in-progress): | ||
```sh | ||
ansible-playbook --ask-become-pass -i /usr/local/etc/ansible/hosts install.yaml | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
- name: Install facility reconciliation tool | ||
hosts: all | ||
remote_user: "{{ user }}" | ||
tags: install | ||
|
||
vars_prompt: | ||
- name: "user" | ||
prompt: "Please enter the username (without sudo)" | ||
private: no | ||
|
||
tasks: | ||
|
||
- git: | ||
repo: 'https://github.com/intrahealth/hearth.git' | ||
dest: $HOME/hearth | ||
clone: yes | ||
update: yes | ||
|
||
- git: | ||
repo: 'https://github.com/openhie/facility-recon.git' | ||
dest: $HOME/facility-recon | ||
clone: yes | ||
update: yes | ||
|
||
- name: Backend - Update packages based on package.json. | ||
npm: | ||
path: $HOME/facility-recon/facility-recon-backend | ||
state: latest | ||
|
||
# run | ||
|
||
- name: Frontend - Update packages based on package.json. | ||
npm: | ||
path: $HOME/facility-recon/facility-recon-gui | ||
state: latest | ||
|
||
# run | ||
|
||
|
||
|
||
# cp -r facility-recon/facility-recon-gui/dist/* facility-reco/dhis2App/ | ||
# cd facility-recon/dhis2App | ||
# zip GOFR.zip ./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
- name: Preparation for facility reconciliation | ||
hosts: all | ||
remote_user: "{{ user }}" | ||
become: true | ||
tags: prep | ||
|
||
vars_prompt: | ||
- name: "user" | ||
prompt: "Please enter the username (with sudo)" | ||
private: no | ||
|
||
tasks: | ||
|
||
- name: Ensure git | ||
yum: | ||
name: git | ||
state: present | ||
|
||
|
||
- name: Ensure wget | ||
yum: | ||
name: wget | ||
state: present | ||
|
||
|
||
- name: Ensure unzip | ||
yum: | ||
name: unzip | ||
state: present | ||
|
||
|
||
- name: Download nodesource script for node v8 | ||
get_url: | ||
url: https://rpm.nodesource.com/setup_8.x | ||
dest: $HOME/nodesource.sh | ||
mode: 0644 | ||
|
||
|
||
- name: Install nodesource and node 8 | ||
command: bash $HOME/nodesource.sh | ||
register: hello | ||
|
||
|
||
- debug: msg="{{ hello.stdout_lines }}" | ||
|
||
|
||
- name: Ensure node | ||
yum: | ||
name: nodejs | ||
state: present | ||
|
||
|
||
# this ties the version to 3.6 | ||
# see https://docs.mongodb.com/v3.6/tutorial/install-mongodb-on-red-hat/ | ||
- name: Add repository for mongo | ||
yum_repository: | ||
name: mongodb-org-3.6 | ||
description: MongoDB Repository | ||
baseurl: https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/ | ||
gpgcheck: yes | ||
gpgkey: https://www.mongodb.org/static/pgp/server-3.6.asc | ||
enabled: yes | ||
|
||
|
||
- name: install mongodb | ||
yum: | ||
name: mongodb-org | ||
state: present | ||
|
||
|
||
- name: run mongodb | ||
service: | ||
name: mongod | ||
state: started | ||
enabled: yes |