Go to file
Aníbal Limón feab3b1a85 rrs/tools/rrs_{distros,upstream_history}: Add path for poky meta lib
Due to bitbake client/server changes now the meta path isn't included
to sys.path when load tinfoil.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-08-22 16:59:03 -05:00
conf conf/local.con: Add RRS configuration commented. 2015-07-14 10:51:40 -05:00
docker Docker based environment setup 2016-06-22 16:35:06 -05:00
layerindex layerindex/update_layer: fix update src_uri from new recipe 2017-08-18 10:59:03 -05:00
oe-classic/conf Add support for importing OE-Classic recipes 2013-09-05 00:31:22 +01:00
rrs rrs/tools/rrs_{distros,upstream_history}: Add path for poky meta lib 2017-08-22 16:59:03 -05:00
templates templates/rrs/recipedetail.html: Change Maintainer to Committer 2017-05-09 10:21:04 -05:00
__init__.py Initial commit of layerindex-web 2013-02-13 12:09:57 +00:00
.gitignore adding environment description for virtualenv 2014-09-24 11:32:34 +01:00
COPYING.MIT Initial commit of layerindex-web 2013-02-13 12:09:57 +00:00
Dockerfile Docker based environment setup 2016-06-22 16:35:06 -05:00
Dockerfile.web Docker based environment setup 2016-06-22 16:35:06 -05:00
manage.py Upgrade to Django 1.6+ 2016-06-22 16:38:45 -05:00
README Use python3 commands in README 2017-01-04 14:15:49 -06:00
README.rrs rrs/tools: Add daily_run.sh script for provide updates. 2015-07-14 17:38:16 -05:00
requirements-rrs.txt requeriments: Add GitPython and RRS own file with tabular. 2015-07-14 10:51:40 -05:00
requirements.txt Upgrade to Django 1.6+ 2016-06-22 16:38:45 -05:00
settings.py Upgrade to Django 1.6+ 2016-06-22 16:38:45 -05:00
TODO Increase size of Recipe provides and license fields 2016-06-22 16:36:17 -05:00
TODO.rrs rrs/views: Fix mismatch in summary and recipe list 2015-08-28 13:24:39 -05:00
urls.py Fix for changes to auth views in Django 1.6 2017-01-04 14:16:29 -06:00
wsgi.py Docker based environment setup 2016-06-22 16:35:06 -05:00

OE Layer Index web interface

This is a small Django-based web application that provides a way to manage an index of OpenEmbedded metadata layers for use on top of OE-Core.

Setup

In order to make use of this application you will need:

  • Python 3.4+
  • Django 1.6.x - tested with 1.6.10; newer versions may work, but the application has not been tested with 1.7 or newer.
  • For production usage, a web server set up to host Django applications (not needed for local-only testing)
  • A database supported by Django (SQLite, MySQL, etc.). Django takes care of creating the database itself, you just need to ensure that the database server (if not using SQLite) is configured and running.
  • The following third-party Django modules (tested versions listed):
    • django-south (1.0.2)
    • django-registration (1.0)
    • django-reversion (1.8.7)
    • django-reversion-compare (0.4.0)
    • django-simple-captcha (0.4.6)
    • django-nvd3 (0.9.7)
    • djangorestframework (3.2.5)
    • django-cors-headers (1.1.0)
  • On the machine that will run the backend update script (which does not have to be the same machine as the web server, however it does still have to have Django installed, have the same or similar configuration in settings.py and have access to the database used by the web application):
    • Python 2.7.6+ / Python 3.4+ to match with the version of BitBake for the OpenEmbedded branch being parsed
    • GitPython (python-git) version 2.0 or later

Setup instructions:

  1. Edit settings.py to specify a database, EMAIL_HOST, SECRET_KEY and other settings specific to your installation. Ensure you set LAYER_FETCH_DIR to an absolute path to a location with sufficient space for fetching layer repositories.

  2. Run the following commands within the layerindex-web directory to initialise the database:

    python3 manage.py syncdb python3 manage.py migrate

    You should answer "yes" when asked to create an admin account.

  3. You can test the web application locally by setting DEBUG = True in settings.py and running the following:

    python3 manage.py runserver

    Then visit http://127.0.0.1:8000/layerindex/ with your browser. As with all Django applications there is an admin interface available at http://127.0.0.1:8000/admin/ also. The initial login and password will be those you entered in the step above when creating an admin account.

    NOTE: This local server should only be used for testing - for production you need to use a proper web server and have DEBUG set to False.

  4. You'll need to add at least the openembedded-core layer to the database, or some equivalent that contains conf/bitbake.conf for the base system configuration. To add this, follow these steps:

    4.1. With the server running, go to the main page (see above) and click on the "Log in" button on the top right. Use the login/password you added in step 2 above.

    4.2. Click on the "Submit Layer" button in the top right and enter the details for the core layer. To use the real openembedded-core layer, use these values:

     Layer name:               openembedded-core
     Layer type:               Base
     Summary:                  Core metadata
     Description:              Core metadata
     Repository URL:           git://git.openembedded.org/openembedded-core
     Repository subdirectory:  meta
    
     Once you have filled in the required values, click on the
     "Submit Layer" button.
    
     NOTE: The name of the layer must be "openembedded-core",
     unless you change CORE_LAYER_NAME in settings.py to match
     whatever alternative name you use here.
    

    4.3. The layer has been added but is not yet published. (For the public index this provides some protection against spam and malformed entries.) To publish it, click on the orange number next to your login name at the top right, click on the newly added layer entry, and then click on "Publish Layer".

  5. If you need to support multiple branches of OpenEmbedded/BitBake where some require Python 2.x and others require Python 3.x, then you will need to set up "Python environment" records through the admin interface to correspond to these so that the right Python version gets used to parse the branch, and then set the "Update environment" field on each branch record to point to the appropriate environment. If you're using virtualenv you will need separate virtual environments set up for Python 2 and 3 which you should point to in the Python environment record.

  6. Set the site name (as displayed in the top bar and page titles) by going into the admin interface (http://127.0.0.1:8000/admin/), clicking on "Sites" at the bottom, and editing the first entry, setting "Display name" to the desired name.

  7. You may wish to customise some of the page templates to suit your installation, in particular:

    • templates/base.html
    • templates/layerindex/about.html
  8. To use layerindex-web with Docker containers, refer to docker/README keeping in mind you'll need to set up Docker properly as part of the setup process.

Usage

On a regular basis you need to run the update script:

path/to/layerindex/update.py

This will fetch all of the layer repositories, analyse their contents and update the database with the results. Run the script with --help for further information on available options.

Maintenance

The code for this application is maintained by the Yocto Project.

The latest version of the code can always be found here:

http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/

Contributions are welcome. Please send patches / pull requests to yocto@yoctoproject.org with '[layerindex-web]' in the subject.

License

This application is based upon the Django project template, whose files are covered by the BSD license and are copyright (c) Django Software Foundation and individual contributors.

Bundled Twitter Bootstrap (including Glyphicons) is redistributed under the Apache License 2.0.

Bundled jQuery is redistributed under the MIT license.

Bundled uitablefilter.js is redistributed under the MIT license.

Bundled nv.d3.js is redistributed under the Apache License 2.0.

Bundled d3.js is redistributed under the BSD License.

All other content is copyright (C) 2013-2016 Intel Corporation and licensed under the MIT license (unless otherwise noted) - see COPYING.MIT for details.