Created
November 14, 2014 13:01
-
-
Save MSeven/810d25b18568c3f9d7c0 to your computer and use it in GitHub Desktop.
Bitcoin Node Salt State (for Saltstack)
This file contains hidden or 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
| server=1 | |
| daemon=1 | |
| maxconnections={{ pillar['btc_node']['maxconnections'] }} | |
| rpcuser={{ pillar['btc_node']['rpc_user'] }} | |
| rpcpassword={{ pillar['btc_node']['rpc_password'] }} | |
| disablewallet={{ pillar['btc_node']['disablewallet'] }} |
This file contains hidden or 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
| [program:bitcoind] | |
| command=bitcoind -datadir=/home/bitcoinuser/.bitcoin -daemon=0 | |
| user=bitcoinuser | |
| group=bitcoinuser | |
| process_name=%(program_name)s | |
| stdout_logfile=/var/log/bitcoind.log | |
| redirect_stderr=true | |
| stdout_logfile_maxbytes=5MB | |
| stdout_logfile_backups=5 | |
| stdout_capture_maxbytes=5MB | |
| stopasgroup=true | |
| autostart=true | |
| autorestart=true | |
| startretries=10 | |
| startsecs=10 | |
| stopwaitsecs=10 |
This file contains hidden or 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
| bitcoin-repo: | |
| pkgrepo.managed: | |
| - ppa: bitcoin/bitcoin | |
| bitcoin-pkg: | |
| pkg.latest: | |
| - name: bitcoind | |
| - require: | |
| - pkgrepo: bitcoin-repo | |
| btc-supervisor-pkg: | |
| pkg: | |
| - name: supervisor | |
| - installed | |
| service: | |
| - name: supervisor | |
| - running | |
| - enable: True | |
| - watch: | |
| - pkg: supervisor | |
| - file: btc-supervisor-conf | |
| bitcoin-user: | |
| user.present: | |
| - name: bitcoinuser | |
| - home: /home/bitcoinuser | |
| - shell: '/bin/bash' | |
| - password: '!' | |
| /home/bitcoinuser/.bitcoin/bitcoin.conf: | |
| file.managed: | |
| - source: salt://btc_node/bitcoin.conf | |
| - user: bitcoinuser | |
| - group: bitcoinuser | |
| - mode: 600 | |
| - makedirs: True | |
| - template: jinja | |
| - require: | |
| - user: bitcoin-user | |
| btc-supervisor-conf: | |
| file.managed: | |
| - name: /etc/supervisor/conf.d/bitcoin.conf | |
| - source: salt://btc_node/btc_supervisor.conf | |
| - require: | |
| - user: bitcoin-user | |
| supervisorctl_reload: | |
| cmd.wait: | |
| - name: supervisorctl reload | |
| - watch: | |
| - file: btc-supervisor-conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment