Beginning to put together tasks for ETH mining.
This commit is contained in:
parent
b318d6a6a6
commit
2a6edcb788
27
local.yml
27
local.yml
@ -63,6 +63,33 @@
|
|||||||
- include: tasks/workstation/settings/gnome.yml
|
- include: tasks/workstation/settings/gnome.yml
|
||||||
|
|
||||||
|
|
||||||
|
# Additional setup for miners!
|
||||||
|
- name: Main | Workstation UI Setup
|
||||||
|
hosts: miner
|
||||||
|
connection: local
|
||||||
|
become: true
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- include: tasks/miner/acct_mgmt/mfn.yml
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
# Monero
|
||||||
|
- include: tasks/miner/cpu/xmr.yml
|
||||||
|
become_user: mfn
|
||||||
|
when: mine.xmr is defined
|
||||||
|
|
||||||
|
# Ethereum
|
||||||
|
- include: tasks/miner/driver/amdgpu.yml
|
||||||
|
when: ansible_distribution == "Ubuntu" and mine.eth is defined
|
||||||
|
|
||||||
|
- include: tasks/miner/gpu/eth/ethminer.yml
|
||||||
|
become_user: mfn
|
||||||
|
when: ansible_distribution == "Ubuntu" and mine.eth is defined
|
||||||
|
|
||||||
|
post_tasks:
|
||||||
|
- include: tasks/miner/cron/ansible.yml
|
||||||
|
|
||||||
|
|
||||||
# Create reports to analyze security.
|
# Create reports to analyze security.
|
||||||
- name: Main | Hardness Tests
|
- name: Main | Hardness Tests
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
8
tasks/miner/acct_mgmt/mfn.yml
Normal file
8
tasks/miner/acct_mgmt/mfn.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
# Account to do mining tasks.
|
||||||
|
|
||||||
|
- name: Miner | Account Management | User | Miner Forty Niner
|
||||||
|
user:
|
||||||
|
name: mfn
|
||||||
|
comment: Miner Forty Niner
|
||||||
|
system: yes
|
11
tasks/miner/cron/ansible.yml
Normal file
11
tasks/miner/cron/ansible.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
# Jobs for miners.
|
||||||
|
|
||||||
|
- name: Cron | XMR
|
||||||
|
shell: ""
|
||||||
|
when: mine.xmr is defined
|
||||||
|
|
||||||
|
#- name: Cron | ETH
|
||||||
|
# cron:
|
||||||
|
# name: Mine Ethereum
|
||||||
|
# when: mine.eth is defined
|
17
tasks/miner/driver/amdgpu.yml
Normal file
17
tasks/miner/driver/amdgpu.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
# Install OpenCL drivers.
|
||||||
|
|
||||||
|
- name: Folder
|
||||||
|
shell: 'mkdir -p Downloads'
|
||||||
|
|
||||||
|
- name: Download
|
||||||
|
shell: 'scp ling@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz Downloads/'
|
||||||
|
|
||||||
|
- name: Extract
|
||||||
|
shell: 'cd Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
|
||||||
|
|
||||||
|
- name: Install 1 - All
|
||||||
|
shell: 'cd Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; amdgpu-install -y'
|
||||||
|
|
||||||
|
- name: Install 2 - Pro
|
||||||
|
shell: 'cd Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; amdgpu-pro-install -y --opencl=pal,legacy'
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
# Mine Ethereum with GPU!
|
|
48
tasks/miner/gpu/ethminer.yml
Normal file
48
tasks/miner/gpu/ethminer.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
# Mine Ethereum with GPU!
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
package:
|
||||||
|
name: build-essential dkms cmake perl libdbus-1-dev mesa-common-dev
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Add PPA
|
||||||
|
shell: 'add-apt-repository ppa:ethereum/ethereum; apt update'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Install Ethereum
|
||||||
|
package:
|
||||||
|
name: ethereum
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Clone Git Repo
|
||||||
|
shell: 'git clone https://github.com/ethereum-mining/ethminer.git'
|
||||||
|
|
||||||
|
- name: Update Repo's Repos
|
||||||
|
shell: 'cd ethminer; git submodule update --init --recursive'
|
||||||
|
|
||||||
|
- name: Create Build Folder
|
||||||
|
shell: 'cd ethminer; mkdir -p build'
|
||||||
|
|
||||||
|
- name: cmake Flags
|
||||||
|
shell: 'cd ethminer/build; cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF -DAPICORE=ON -DBINKERN=ON -DETHDBUS=ON -DUSE_SYS_OPENCL=ON -ETHASHCPU=ON -DEVBUILD=ON'
|
||||||
|
|
||||||
|
- name: cmake Build
|
||||||
|
shell: 'cd ethminer/build; cmake --build .'
|
||||||
|
|
||||||
|
- name: cmake Build
|
||||||
|
shell: 'cd /home/mfn/ethminer/build; make install'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Download Script
|
||||||
|
shell: 'scp ling@leet:InstallFiles/Miners/ETH/ethminer.sh /home/mfn/; chmod 755 /home/mfn/ethminer.sh'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Kill Current Jobs
|
||||||
|
shell: 'killall ethminer.sh'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Start Mining
|
||||||
|
shell: 'time ethminer.sh'
|
Loading…
x
Reference in New Issue
Block a user