Skip to content

Commit

Permalink
infra: The bitcoin script uses the explorer role
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexITC committed May 12, 2019
1 parent 2b3c3e7 commit d01f3b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 121 deletions.
107 changes: 4 additions & 103 deletions infra/deployment/bitcoin-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,107 +3,8 @@
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/bitcoin-backend.env
dest: /home/play/app/.env
owner: play
group: play

- name: Set the application routes
become: yes
copy:
src: config/ltc-routes
dest: /home/play/app/xsn-block-explorer-0.1.0-SNAPSHOT/conf/routes
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/bitcoin-backend.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: bitcoin-backend
state: restarted

- name: Enable the application to run on system startup
become: yes
systemd:
name: bitcoin-backend
enabled: yes
vars:
explorer_config_file: 'config/explorer/bitcoin-explorer.env'
explorer_service_name: 'bitcoin-backend'
File renamed without changes.
2 changes: 0 additions & 2 deletions infra/deployment/config/sentry-bitcoin.properties

This file was deleted.

16 changes: 0 additions & 16 deletions infra/deployment/systemd-services/bitcoin-backend.service

This file was deleted.

0 comments on commit d01f3b4

Please sign in to comment.