Giter VIP home page Giter VIP logo

himanshuraja / bodhi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fedora-infra/bodhi

1.0 1.0 0.0 34.53 MB

Bodhi is a web-system that facilitates the process of publishing updates for a Fedora-based software distribution.

Home Page: https://bodhi.fedoraproject.org

License: GNU General Public License v2.0

Python 62.37% Mako 0.03% CSS 6.28% JavaScript 22.75% HTML 8.53% Shell 0.04%

bodhi's Introduction

bodhi v2.0 development environment

There are two ways to bootstrap a Bodhi development environment. You can use Vagrant, or you can use virtualenv on an existing host.

Vagrant

To use Vagrant, please read the instructions at https://pagure.io/fedora-apps-vagrantfiles/blob/master/f/bodhi/README.md

The code from your development host will be mounted in /vagrant in the guest, and you can run the unit tests with nosetests:

cd /vagrant
nosetests

Virtualenv

Virtualenv is another option for building a development environment.

Dependencies

sudo dnf install libffi-devel openssl-devel koji pcaro-hermit-fonts freetype-devel libjpeg-turbo-devel python-pillow

Setup virtualenvwrapper

sudo dnf -y install python-virtualenvwrapper python-createrepo_c

Add the following to your ~/.bashrc:

export WORKON_HOME=$HOME/.virtualenvs
source /usr/bin/virtualenvwrapper.sh

Set PYTHONPATH

Add the following to your ~/.bashrc

export PYTHONPATH=$PYTHONPATH:$HOME/.virtualenv

Then on the terminal

source ~/.bashrc

Clone the source

git clone https://github.com/fedora-infra/bodhi.git
cd bodhi

Bootstrap the virtualenv

./bootstrap.py
workon bodhi-python2.7

Setting up

python setup.py develop

pip install psycopg2

Run the test suite

python setup.py test

Import the bodhi2 database

curl -O https://infrastructure.fedoraproject.org/infra/db-dumps/bodhi2.dump.xz
sudo -u postgres createdb bodhi2
xzcat bodhi2.dump.xz | sudo -u postgres psql bodhi2

Note

If you do not have a PostgreSQL server running, please see the instructions at the bottom of the file.

Create and adjust the development.ini file

Copy development.ini.example to development.ini:

cp development.ini.example development.ini

Now adjust the configuration key sqlalchemy.url to point to the postgresql database. Something like:

sqlalchemy.url = postgresql://postgres:anypasswordworkslocally@localhost/bodhi2

Run the web app

pserve development.ini --reload

Setup the postgresql server

1. Install postgresql

dnf install postgresql-server

2. Setup the Database

As a privileged user on a Fedora system run the following:

sudo postgresql-setup initdb

3. Adjust Postgresql Connection Settings

As a privileged user on a Fedora system modify the pg_hba.conf file:

vi /var/lib/pgsql/data/pg_hba.conf

Then adjust the content at the bottom of the file to match the following.

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections are *trusted*, any password will work.
host    all             all             127.0.0.1/32            trust
# IPv6 local connections are *trusted*, any password will work.
host    all             all             ::1/128                 trust

If you need to make other modifications to postgresql please make them now.

4. Start Postgresql

As a privileged user on a Fedora system run the following:

sudo systemctl start postgresql.service

bodhi's People

Contributors

lmacken avatar ralphbean avatar pypingou avatar trishnaguha avatar tyll avatar relrod avatar farhaanbukhsh avatar abadger avatar ashcrow avatar ignatenkobrain avatar ausil avatar jkeating avatar bowlofeggs avatar remicollet avatar kalev avatar bitlord avatar tchollingsworth avatar rickyz avatar 0xken avatar adamwill avatar wenottingham avatar vivekanand1101 avatar scop avatar tmzullinger avatar ppisar avatar puiterwijk avatar pcreech avatar conan-kudo avatar michel-slm avatar bochecha avatar

Stargazers

himanshu avatar

Watchers

himanshu 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.