Skip to content

Commit

Permalink
README and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
perdy committed Oct 9, 2017
1 parent 4e6da33 commit 2ec797a
Show file tree
Hide file tree
Showing 15 changed files with 816 additions and 29 deletions.
30 changes: 3 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,8 @@ coverage.xml
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/build/

# PyBuilder
target/
Expand All @@ -76,9 +65,6 @@ target/
# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

Expand All @@ -87,15 +73,5 @@ celerybeat-schedule
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
# IDEA
.idea/
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

89 changes: 89 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
=========
Barrenero
=========

A set of services and tools for effective mining cryptocurrencies.

:Version: 1.0.0
:Status: final
:Author: José Antonio Perdiguero López

This projects aims to create a platform to develop and use cryptocurrency miners such as Ether, Storj... The main goal
is to provide a flexible and robust set of services and tools for effective mining cryptocurrencies and performs real
time checks over these miners.

Full `documentation <http://barrenero.readthedocs.io>`_ for Barrenero project.

Help us Donating
----------------

This project is free and open sourced, you can use it, spread the word, contribute to the codebase and help us donating:

:Ether: 0x566d41b925ed1d9f643748d652f4e66593cba9c9
:Bitcoin: 1Jtj2m65DN2UsUzxXhr355x38T6pPGhqiA

Requirements
------------

* Python 3.5 or newer. Download `here <https://www.python.org/>`_.
* Docker. `Official docs <https://docs.docker.com/engine/installation/>`_.

Quick start
-----------

1. Install services:

.. code:: console
sudo ./make install
2. Configure barrenero services as explained in `documentation <http://barrenero.readthedocs.io>`_.

3. Build the service:

.. code:: console
./make build
4. Reboot or restart barrenero:

.. code:: console
./make restart
Services
--------

Barrenero Miner
^^^^^^^^^^^^^^^

This service aims to create a platform that provides an easy way of adding miners for different cryptocurrencies,
isolating each miner into a docker container, easy to build, update and independent of the system.

Miners currently supported:

* Ether (`ethminer <https://github.com/ethereum-mining/ethminer>`_).
* Storj (`storj <https://storj.io/>`_).

Barrenero API
^^^^^^^^^^^^^

This service defines a lightweight REST API on top of Barrenero Miner, providing an easy and simple way to interact
with all miners. This API exposes methods for:

* Query current machine status, such as active services, GPU stats...
* Query Ether miner and pool status.
* Restart Ether miner service.
* Query Storj miner status.
* Restart Storj miner service.
* Query Ethereum wallet value and last transactions.

Barrenero Telegram
^^^^^^^^^^^^^^^^^^

Telegram bot for Barrenero that serves information and provides interactive methods through Barrenero API.

This bot provides a real time interaction with Barrenero through its API, allowing a simple way to register an user in
the API and link it to a Telegram chat. Once the registration is done, it's possible to query for Barrenero status,
restart services and performs any action allowed in the API.

52 changes: 52 additions & 0 deletions doc/source/api/configuration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
..
Barrenero, a set of services and tools for effective mining cryptocurrencies.
Copyright (C) 2017 José Antonio Perdiguero López
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Configuration
=============

To properly configure Barrenero API you must define the following keys in `.env` file:

Django Secret Key
-----------------
Put the Django secret key in `DJANGO_SECRET_KEY` variable.

More info `here <https://docs.djangoproject.com/en/1.11/ref/settings/#secret-key>`_.

API superuser password
----------------------
To create an API superuser password that allows users to do actions such restarting services you must define a password
and encrypt it using Django tools:

.. code:: python
from django.contrib.auth.hashers import make_password
password = make_password('foo_password')
You should put the result in `DJANGO_API_SUPERUSER` variable.

Etherscan token
---------------
Put your Etherscan API token in `DJANGO_ETHERSCAN_TOKEN` variable.

More info `here <https://etherscan.io/apis>`_.

Ethplorer token
---------------
Put your Ethplorer API token in `DJANGO_ETHPLORER_TOKEN` variable.

More info `here <https://github.com/EverexIO/Ethplorer/wiki/Ethplorer-API>`_.
39 changes: 39 additions & 0 deletions doc/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
..
Barrenero, a set of services and tools for effective mining cryptocurrencies.
Copyright (C) 2017 José Antonio Perdiguero López
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Miner
=====

.. toctree::
:maxdepth: 1
:caption: Contents

Installation<installation.rst>
Configuration<configuration.rst>

Overview
--------

This service defines a lightweight REST API on top of Barrenero Miner, providing an easy and simple way to interact
with all miners. This API exposes methods for:

* Query current machine status, such as active services, GPU stats...
* Query Ether miner and pool status.
* Restart Ether miner service.
* Query Storj miner status.
* Restart Storj miner service.
* Query Ethereum wallet value and last transactions.
65 changes: 65 additions & 0 deletions doc/source/api/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
..
Barrenero, a set of services and tools for effective mining cryptocurrencies.
Copyright (C) 2017 José Antonio Perdiguero López
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Installation
============

1. Install services:

.. code:: console
sudo ./make install
2. Move to installation folder:

.. code:: console
cd /usr/local/lib/barrenero/barrenero-api/
3. Configure api parameters in *.env* file. Parameters explained below.

4. Build the service:

.. code:: console
./make build
5. Reboot or restart Systemd unit:

.. code:: console
sudo service barrenero_api restart
Systemd
-------
The project provides a service file for Systemd that will be installed. These service files gives a reliable way to run
each miner, as well as overclocking scripts.

To check a miner service status:

.. code:: bash
service barrenero_api status
Run manually
------------
As well as using systemd services you can run miners manually using:

.. code:: bash
./make run passenger

0 comments on commit 2ec797a

Please sign in to comment.