Skip to content

theSociableme/chef-altcointip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

altcointip Cookbook

This cookbook installs and configures Reddit ALTcointip bot and its dependencies - such as MySQL (with optional phpMyAdmin), and cryptocoins (Bitcoin, Litecoin, etc).

Requirements

Cookbooks

Attributes

altcointip::default

Key Type Description Default
user String Linux user with ownership of ALTcointip directory. This user should run ALTcointip process. root
user_password String Password for Linux user. Generate the value with `openssl passwd -1 'mypassword'`. root
user_group String Linux group with ownership of ALTcointip directory root
install_dir String Target directory to install ALTcointip into /opt
mysql_db_name String Name of the MySQL database to be created for ALTcointip altcointip
mysql_username String Name of the MySQL user to be created for ALTcointip altcointip
mysql_password String MySQL user's password to be created for ALTcointip altcointip123
reddit_username String Reddit username to be used for Reddit access myaltcointip
reddit_password String Reddit password to be used for Reddit access myaltcointip123
www_root_dir String Root directory to point Apache httpd to. Symlink to phpMyAdmin will be created in it. /var/www/altcointip

Usage

Create a role similar to the one below and include it - role[altcointip] - in your node's run_list. The role specifies some of the attributes you should manage, then calls the altcointip cookbook.

name 'altcointip'
description 'Role to set up altcointip, Reddit altcoin tip bot'

default_attributes(
  # Use this section to control MySQL installation
  # Attributes are defined in mysql cookbook
  :mysql => {
    :bind_address => '127.0.0.1',
    :tunable => {
      :wait_timeout => 3600
    }
  },
  # Use this section to control phpMyAdmin installation
  # Attributes are defined in phpmyadmin cookbook
  :phpmyadmin => {
    :fpm => false,
    :version => '4.0.7',
    :checksum => ''
  },
  :altcointip => {
    # Use this section to control cryptocoin installation
    # as well as add cryptocoins not defined in the cookbook
    # Attributes are defined in altcointip cookbook
    :cryptocoins => {
      :bitcoin => {
        :enabled => false
      },
      :litecoin => {
        :enabled => false
      },
      :namecoin => {
        :enabled => false
      },
      :ppcoin => {
        :enabled => false
      },
      :primecoin => {
        :enabled => false
      },
      :feathercoin => {
        :enabled => false
      },
      :megacoin => {
        :enabled => false
      }
    },
    # Use this section to control cron jobs
    # Attributes are defined in altcointip cookbook
    :cron => {
      :stats => {
        :enabled => false
      },
      :backup_config => {
        :enabled => true
      },
      :backup_db => {
        :enabled => true
      },
      :backup_wallets => {
        :enabled => true
      }
    }
  }
)

run_list(
  # Run list specifies what Chef should install
  # You can exclude coins, database, and phpmyadmin recipes if you're installing these elsewhere
  'recipe[altcointip::default]',
  'recipe[altcointip::coins]',
  'recipe[altcointip::database]',
  'recipe[altcointip::phpmyadmin]'
)

To reinstall ALTcointip bot or restart a failed installation, delete the #{node[:altcointip][:install_dir]}/altcointip (default is /opt/altcointip/altcointip) directory and run chef-client (don't forget to save a copy of config.yml if you need to preserve it).

License and Authors

Authors:

About

Chef cookbook and role for ALTcointip, a Reddit altcoin tip bot

Resources

License

Stars

Watchers

Forks

Packages

No packages published