Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The openbazaar cookbook has been deprecated

Author provided reason for deprecation:

The openbazaar cookbook has been deprecated and is no longer being maintained by its authors. Use of the openbazaar cookbook is no longer recommended.

RSS

openbazaar (20) Versions 0.3.4

Installs/Configures OpenBazaar Server Components

Policyfile
Berkshelf
Knife
cookbook 'openbazaar', '= 0.3.4', :supermarket
cookbook 'openbazaar', '= 0.3.4'
knife supermarket install openbazaar
knife supermarket download openbazaar
README
Dependencies
Changelog
Quality 0%

OpenBazaar Cookbook

This cookbook installs, configures, and maintains the OpenBazaar server components.

Features

  • Installs from either the binary or source distributions of OpenBazaar
  • Supports installation of a standard OpenBazaar server
  • Supports the installation of an OpenBazaar seed server
  • Installs the services as daemons
  • Enables autostarting of daemons
  • Creates a self-signed SSL certificate for secure client to server communications
  • Updates source distributions from git repositories on each chef run (keeps it up to date)

Overview

OpenBazaar is an open source project to create a decentralized network for peer to peer commerce online using Bitcoin.

Platform

  • Tested on
    • Ubuntu 14.04

Requirements

The below cookbooks are dependencies, either direct or indirect.

packages

  • build-essential
  • chef_handler
  • chef-sugar
  • dmg
  • git
  • libsodium
  • openssl
  • poise
  • poise-archive
  • poise-languages
  • poise-python
  • seven_zip
  • windows
  • yum
  • yum-epel
  • zmq

Attributes

Node level defaults provided by the cookbook. (for a sane default environment).

OpenBazaar Installation Flavor Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['deployment_type']</tt></sub></td>
<td><sub>String</sub></td>
<td><sub>The type of deployment to use. possible values <tt>'source'</tt>, <tt>'binary'</tt></sub></td>
<td><sub><tt>'binary'</tt></sub></td>
</tr>
</table>

Binary Deployment Type Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['version']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The version of the binary to download</td></sub>
<td><sub><tt>'1.1.2'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['checksum']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The checksum of the remote binary artifact</td></sub>
<td><sub><tt>'535e67eadd4e044e7c34c0ce056c244c74d0eb18dd7383c38666c14e6987186d'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['source']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The download URL for the binary download</td></sub>
<td><sub><tt>'https://github.com/OpenBazaar/OpenBazaar-Installer/releases/download/'</tt></sub></td>
</tr>

</table>

Source Deployment Type Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['source']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Git Repository for OpenBazaar-Server</td></sub>
<td><sub><tt>'https://github.com/OpenBazaar/OpenBazaar-Server.git'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['CONSTANTS']['DATA_FOLDER']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>OpenBazaar data folder</td></sub>
<td><sub><tt>'/home/openbazaar/.openbazaar'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['CONSTANTS']['KSIZE']</tt></sub></td>
<td><sub>Integer</td></sub>
<td><sub>Kademlia Protocol ksize</td></sub>
<td><sub><tt>20</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['CONSTANTS']['ALPHA']</tt></sub></td>
<td><sub>Integer</td></sub>
<td><sub>Kademlia Protocol alpha</td></sub>
<td><sub><tt>3</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['CONSTANTS']['TRANSACTION_FEE']</tt></sub></td>
<td><sub>Integer</td></sub>
<td><sub>Bitcoin Transaction Fee (in satoshis)</td></sub>
<td><sub><tt>15000</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['CONSTANTS']['RESOLVER']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>BlockStack Resolver API end-point</td></sub>
<td><sub><tt>'https://resolver.onename.com/'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['LIBBITCOIN_SERVERS']['mainnet_server1']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Bitcoind RPC Server (1)</td></sub>
<td><sub><tt>'tcp://libbitcoin1.openbazaar.org:9091'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['LIBBITCOIN_SERVERS']['mainnet_server3']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Bitcoind RPC Server (3)</td></sub>
<td><sub><tt>'tcp://libbitcoin3.openbazaar.org:9091'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['LIBBITCOIN_SERVERS_TESTNET']['testnet_server2']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>TESTNET Bitcoind RPC Server (2)</td></sub>
<td><sub><tt>'tcp://libbitcoin2.openbazaar.org:9091,baihZB[vT(dcVCwkhYLAzah<t2gJ>{3@k?+>T&3'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['LIBBITCOIN_SERVERS_TESTNET']['testnet_server4']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>TESTNET Bitcoind RPC Server (4)</td></sub>
<td><sub><tt>'tcp://libbitcoin4.openbazaar.org:9091,<Z&{.=LJSPySefIKgCu99w.L%b^6VvuVp0+pbnOM'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['AUTHENTICATION']['SSL']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Require SSL between the server and client components</td></sub>
<td><sub><tt>'False'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['AUTHENTICATION']['SSL_CERT']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The public certificate component to generate (Self Signed)</td></sub>
<td><sub><tt>'ob_server_cert.pem'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['AUTHENTICATION']['SSL_KEY']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The private key for the (Self Signed) certificate to generate</td></sub>
<td><sub><tt>'ob_server_cert.key'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['AUTHENTICATION']['USERNAME']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The name of the user account (client to server)</td></sub>
<td><sub><tt>random changing value (each convergence)</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['AUTHENTICATION']['PASSWORD']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>The password for the user account (client to server)</td></sub>
<td><sub><tt>randomly changing value (each convergence)</tt></sub></td>
</tr>
</table>

SSL Certification Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['certificate']['common_name']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Common Name</td></sub>
<td><sub><tt>'www.f00bar.com'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['certificate']['org']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Organization</td></sub>
<td><sub><tt>'Foo Bar'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['certificate']['org_unit']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Organizational Unit</td></sub>
<td><sub><tt>'Lab'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['certificate']['country']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Country</td></sub>
<td><sub><tt>'US'</tt></sub></td>
</tr>

</table>

OpenBazaar Remote Seed Server Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['MAINNET_SEEDS']['mainnet_seed2']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Seed Server (2)</td></sub>
<td><sub><tt>'seed2.openbazaar.org:8080,8b17082a57d648894a5181cb6e1b8a6f5b3b7e1c347c0671abfcd7deb6f105fe'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['MAINNET_SEEDS']['mainnet_seed3']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Seed Server (3)</td></sub>
<td><sub><tt>'seed.obcentral.org:8080,f0ff751b27ddaa86a075aa09785c438cd2cebadb8f0f5a7e16f383911322d4ee'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['TESTNET_SEEDS']['testnet_seed1']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>TESTNET Seed Sever (1)</td></sub>
<td><sub><tt>'seed.openbazaar.org:8080,5b44be5c18ced1bc9400fe5e79c8ab90204f06bebacc04dd9c70a95eaca6e117'</tt></sub></td>
</tr>

</table>

OpenBazaar Service Account Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['ob_service_user']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Name of the service account to run the daemons under</td></sub>
<td><sub><tt>'openbazaar'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['ob_service_group']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Name of the group account to run the daemons under</td></sub>
<td><sub><tt>'openbazaar'</tt></sub></td>
</tr>

</table>

OpenBazaar Remote Administration Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['allowed_admin_ip']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Allowed IP address for remote administration</td></sub>
<td><sub><tt>'127.0.0.1'</tt></sub></td>
</tr>
</table>

OpenBazaar Additional Command Line Options

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['additional_flags']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Catch-all for any additional options that need to be passed to the daemons commandline arguments</td></sub>
<td><sub><tt>''</tt></sub></td>
</tr>
</table>

OpenBazaar Server Port Configuration

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['dht']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port used for DHT</td></sub>
<td><sub><tt>'18467'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['testnet_dht']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port used for TESTNET DHT</td></sub>
<td><sub><tt>'28467'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['rest']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port used for RESET API</td></sub>
<td><sub><tt>'18469'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['websocket']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port used for websocket</td></sub>
<td><sub><tt>'18466'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['heartbeat']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port used for heartbeat</td></sub>
<td><sub><tt>'18470'</tt></sub></td>
</tr>
<tr>
<td><sub><tt>['ob']['server']['config']['ports']['seed']</tt></sub></td>
<td><sub>String</td></sub>
<td><sub>Port use for seed server connections</td></sub>
<td><sub><tt>'8080'</tt></sub></td>
</tr>

</table>

Configuration

Attributes may be over-ridden in the normal node/role/environment level attribute override_attributes.

Additionally if one exists a data bag definition will take precedence over any above attribute declarations. The data bag items can over-ride all or portions of the node level attributes.
The data bag item is configured to be {CHEF ENVIRONMENT}\ob

Example

{
  "name" : "data_bag_item_dev_ob_ob",
  "json_class" : "Chef::DataBagItem",
  "chef_type" : "data_bag_item",
  "data_bag" : "dev_ob",
  "raw_data" : {
    "id" : "ob",
    "version" : "1.1.2",
    "checksum" : "535e67eadd4e044e7c34c0ce056c244c74d0eb18dd7383c38666c14e6987186d",
    "source": "https://github.com/OpenBazaar/OpenBazaar-Installer/releases/download/",
    "deployment_type": "source",
    "certificate": {
      "common_name": "www.f00bar.com",
      "org": "Foo Bar",
      "org_unit": "Lab",
      "country": "US"
    },
    "server": {
      "source": "https://github.com/OpenBazaar/OpenBazaar-Server.git",
      "ob_service_user" : "openbazaar",
      "ob_service_group": "openbazaar",
      "config": {
        "allowed_admin_ip": "127.0.0.1",
        "additional_flags": "",
        "ports": {
          "dht": "18467",
          "testnet_dht": "28467",
          "rest": "18469",
          "websocket": "18466",
          "heartbeat": "18470",
          "seed": "8080"
        },
        "CONSTANTS": {
          "DATA_FOLDER": "/home/openbazaar/.openbazaar",
          "KSIZE": "20",
          "ALPHA": "3",
          "TRANSACTION_FEE": "15000",
          "RESOLVER": "https://resolver.onename.com/"
        },
        "LIBBITCOIN_SERVERS": {
          "mainnet_server1": "tcp://libbitcoin1.openbazaar.org:9091",
          "mainnet_server3": "tcp://libbitcoin3.openbazaar.org:9091"
        },
        "LIBBITCOIN_SERVERS_TESTNET": {
          "testnet_server2": "tcp://libbitcoin2.openbazaar.org:9091,baihZB[vT(dcVCwkhYLAzah<t2gJ>{3@k?+>T&^3",
          "testnet_server4": "tcp://libbitcoin4.openbazaar.org:9091,<Z&{.=LJSPySefIKgCu99w.L%b^6VvuVp0+pbnOM"
        },
        "AUTHENTICATION": {
          "SSL": "True"
        },
        "MAINNET_SEEDS": {
          "mainnet_seed2": "seed2.openbazaar.org:8080,8b17082a57d648894a5181cb6e1b8a6f5b3b7e1c347c0671abfcd7deb6f105fe",
          "mainnet_seed3": "seed.obcentral.org:8080,f0ff751b27ddaa86a075aa09785c438cd2cebadb8f0f5a7e16f383911322d4ee"
        },
        "TESTNET_SEEDS": {
          "testnet_seed1": "seed.openbazaar.org:8080,5b44be5c18ced1bc9400fe5e79c8ab90204f06bebacc04dd9c70a95eaca6e117"
        }
      }
    },
    "client": {
      "source": "https://github.com/OpenBazaar/OpenBazaar-Client.git"
    }
  }
}

Credentials

In addition to the non-secure attributes noted so far there are several encrypted attributes that are required.

Failure to create these credentials will result in randomly generate values being supplied to the ob.cfg for the username and password on every chef run.

The encrypted data bag item is configured to be {CHEF ENVIRONMENT}\ob_secrets.

Example

{
  "id": "ob_secrets",
  "server": {
    "config": {
      "AUTHENTICATION": {
        "USERNAME": "SUPER_SECRET_ADMIN",
        "PASSWORD": "SUPER_SECRET_PASSWORD"
      }
    }
  }
}

Usage

openbazaar::default

Downloads, compiles, and installs OpenBazaar and dependencies.

Just include openbazaar in your node's run_list:

Exmaple Runlist

{
  "name":"my_node",
  "run_list": [
    "recipe[openbazaar]"
  ]
}

openbazaar::server

Configures an OpenBazaar Server to run under a service account as a daemon.
This includes autostarting with the system.

Example Role

{
  "name": "ob_server",
  "description": "OpenBazaar Server",
  "json_class": "Chef::Role",
  "default_attributes": { },
  "override_attributes": { },
  "chef_type": "role",
  "run_list": [
    "recipe[openbazaar::server]"
  ]
}

openbazaar::seed

Configures an OpenBazaar Seed Server to run under a service account as a daemon.
This includes autostarting with the system.

Example Role

{
  "name": "ob_seed",
  "description": "OpenBazaar Seed Server",
  "json_class": "Chef::Role",
  "default_attributes": { },
  "override_attributes": { },
  "chef_type": "role",
  "run_list": [
    "recipe[openbazaar::seed]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

MIT License

Copyright (c) 2016 Joshua C. Burt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Dependent cookbooks

git ~> 4.0
openssl >= 0.0.0
chef-sugar >= 0.0.0
build-essential >= 0.0.0
poise-python >= 0.0.0
zmq >= 0.0.0
libsodium >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

OpenBazaar Cookbook CHANGELOG

This file is used to list changes made in each version of the openbazaar cookbook.

0.3.2

  • Added skeleton for tests
  • updated readme for tested platforms

0.3.1

  • Documentation clean up

0.3.0

  • defaults to the binary installation unless over-ridden.
  • clean up of code base

0.2.3

  • Updated the full list of dependencies (and the sub-dependencies) in the documentation.
  • Added some project related support files

0.2.2

  • Joshua C. Burt - Initial release of openbazaar

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric
            

0.3.4 failed this metric

FC005: Avoid repetition of resource declarations: /tmp/cook/e49a801c982c17d259a99446/openbazaar/libraries/source_helper.rb:15