Giter VIP home page Giter VIP logo

ofn-install's Introduction

Deploying Open Food Network

These are Ansible playbooks (scripts) for managing an Open Food Network app server. This is not for your local development environment. Head to the OFN getting started guide to run the OFN locally.

The Open Food Network is an online marketplace for local food. Instructions for configuring a development environment can be found on the project's GitHub repository.

Start with our deployment tutorial to learn how to setup your own Open Food Network server with Ansible.

For deploying OFN versions below v4.x.x, please use the ofn-v3 branch of this repo.

Playbooks

These playbooks will install the Open Food Network app onto a server running an apt-compatible OS like Debian or Ubuntu. It has currently been tested on Ubuntu 16.04 and 18.04 (64 bit) on AWS, DigitalOcean and Scaleway cloud servers.

The playbooks take information from the inventory. Make sure that your host's information is up to date before running a playbook. Make also sure to include your host's secrets file.

These are the main playbooks:

  • setup.yml - Use a root login to ensure python is installed and create a default user (defined in inventory/group_vars/all.yml) on the server for installation (mandatory the first time you provision a server).
  • provision.yml - Install and configure all required software on the server.
  • deploy.yml - Deploy OFN to the server by copying a git repo to the server and using ruby/rake/rails tasks to configure and migrate.
  • backup.yml - Backup database and image files on the server to the local machine.
  • rollback.yml - Rollback the database and codebase to the previous version.

You may want to use the anisble option "checkrun" to do a dry-run of the playbooks. With this option, Ansible will run the playbooks, but not actually make changes on the server.

Setup

  • Fork the ofn-install repository.
  • Clone the forked copy:
    git clone https://github.com/<your-namespace>/ofn-install.git
    

Python

It's recommended you set up your Python environment using Pyenv.

  • Install and configure pyenv
  • Install and configure pyenv-virtualenv
  • Install the required Python version:
    $ pyenv install 3.8.2
    
  • Create the virtualenv:
    $ pyenv virtualenv 3.8.2 ofn-install
    

Dependencies

You will need to install Ansible, alongside other dependencies, on your machine to run the playbooks. You can do so with:

pip install -r requirements.txt

Ansible Galaxy Roles

Some playbooks require third-party roles, which are specified in bin/requirements.yml. You can install with the included script:

$ bin/setup

Code quality

Run the ansible-lint checks using:

ansible-lint site.yml --exclude=community

This is also run in CI.


ofn-install's People

Contributors

matt-yorkley avatar sauloperez avatar mkllnk avatar rafaqz avatar pmackay avatar luisramos0 avatar enricostano avatar rohanm avatar jibees avatar andrewpbrett avatar danypr92 avatar mcmpp avatar weedyseadragon avatar kristinalim avatar rachl avatar rafamanzo avatar elf-pavlik avatar lin-d-hop avatar filipefurtad0 avatar pragai avatar rafaelbbraz avatar mllocs avatar rngkll avatar cillian avatar dacook avatar frattezi avatar achauve avatar hugsdaniel avatar jefferson-faseler avatar jeronimo avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.