Skip to content

bsc-networks/farnsworth-cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Farnsworth Cookbook

A cookbook to setup Farnsworth, the upcoming house-level BSC website.

For more information about Farnsworth itself can be found here

Requirements

This cookbook depends on the following cookbooks:

  • python
  • java
  • database
  • postgresql
  • elasticsearch
  • apache2
  • selinux
  • application_python
  • git
  • simple_iptables

This cookbook (when complete) should work on Ubuntu and CentOS.

Attributes and Data Bags

farnsworth::default

Key Type Description
[:farnsworth][:house_name] String Full name of house, e.g. Davis House
[:farnsworth][:short_house_name] String Shortened name of house, e.g. Davis
[:farnsworth][:house_abbrev] String 3 letter abbreviation of house name, e.g. dav
[:farnsworth][:site_domain] String Domain of site, e.g. www.davishouse.com
[:farnsworth][:enable_oauth] Boolean Whether or not to use OAuth, defaults to false if omitted
[:farnsworth][:oauth_providers] Array (Strings) List of providers to use w/ OAuth, e.g. ['facebook','google']
[:farnsworth][:repo] String URL from which to fetch the Farnsworth app
[:farnsworth][:key_path] String Path on host to find the encrypted data bag secret, default: '/etc/chef/keys/farnsworth_private.key'
[:farnsworth][:site_root] String Base path to install the app into, e.g. /usr/local/farnsworth

An encrypted data bag is needed for use with this cookbook. The data bag should be called farnsworth, and the data bag item within it should be named private. The following keys need to be defined:

Key Name Description
postgres_password Password to access the database as the admin user (you define this, the cookbook sets it)
secret_key Some long string of your choosing (try `openssl rand -base64 50`)
network_manager_password Password to the XXXnm@bsc.coop e-mail address

Installation

Running the following commands is the easiest way to install this cookbook at the moment:

gem install knife-github-cookbooks
knife cookbook github install bsc-networks/farnsworth-cookbook

Usage

farnsworth::default

Include farnsworth in your node's run_list.

If this is a fresh install, you will need to manually create an admin site user. To do this, first let the node converge successfully. Then, inside node[:site_root]/current, run ./manage.py createsuperuser and follow the instructions, filling out the information as you choose.

TODO

  • Implement an attribute to choose either nginx or apache.
  • Include HTTPS support/toggle
  • Allow specifying the exact data bag and item names in which private bits are stored
  • Attribute for version of farnsworth to install

License and Authors

Authors: Nicholas Herson

Thanks to Nader Morshed and Karandeep Singh Nagra for developing Farnsworth

About

A Chef Cookbook to install the Farnsworth Django application

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages