Skip to content

Commit

Permalink
infra: Update the dash-explorer.yml to use the explorer role
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexITC committed May 11, 2019
1 parent fdf4fc1 commit 3fdfa2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 95 deletions.
File renamed without changes.
100 changes: 5 additions & 95 deletions infra/deployment/dash-explorer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,99 +3,9 @@
gather_facts: no
roles:
- ubuntu-16-04
- explorer

tasks:
- name: Install java8
become: yes
apt:
name: default-jre
state: latest

- name: Build the application
shell: ./scripts/build-server.sh
delegate_to: 127.0.0.1

- name: Upload the application
synchronize:
src: app.zip
dest: app.zip

- name: Create the play group
become: yes
group:
name: play
state: present

- name: Create the play user
become: yes
user:
name: play
group: play
state: present
system: yes

- name: Create the app directory
become: yes
file:
path: /home/play/app
state: directory
owner: play
group: play

- name: Unpack the application
become: yes
unarchive:
remote_src: yes
src: app.zip
dest: /home/play/app
owner: play
group: play

- name: Set the application config
become: yes
copy:
src: config/dash-explorer.env
dest: /home/play/app/.env
owner: play
group: play

# - name: Set the sentry config
# become: yes
# copy:
# src: config/sentry-bitcoin.properties
# dest: /home/play/app/xsn-block-explorer-0.1.0-SNAPSHOT/conf/sentry.properties
# owner: play
# group: play

- name: Set the application files permissions
become: yes
file:
dest: /home/play/app
owner: play
group: play
recurse: yes

- name: Add the systemd service
become: yes
copy:
src: systemd-services/dash-explorer.service
dest: /etc/systemd/system/
owner: root
group: root

- name: Pick up systemd changes
become: yes
systemd:
daemon_reload: yes

- name: Restart the application
become: yes
systemd:
name: dash-explorer
state: restarted

- name: Enable the application to run on system startup
become: yes
systemd:
name: dash-explorer
enabled: yes
vars:
explorer_config_file: 'config/explorer/dash-explorer.env'
explorer_systemd_service: 'systemd-services/dash-explorer.service'
explorer_service_name: 'dash-explorer'

0 comments on commit 3fdfa2d

Please sign in to comment.