Project:Infrastructure/Service Catalog/Packages-v5
From Gentoo Wiki
Jump to:navigation
Jump to:search
Service details
A website detailing up to date package information for the Gentoo Linux main tree.
Service development
packages.gentoo.org has 7 components:
- nginx frontend: Handles SSL termination and proxies request to app backend, also handles caching content.
- thin.packages: Thin ruby server that handles users requests. Runs behind nginx.
- Sidekiq: A ruby workqueue, this queue works on re-indexing.
- Elasticsearch: Holds the actual search index; sidekiq keeps the indices updated and the thin.packages server sends elasticsearch queries.
- redis: A small dependency for sidekiq to store its workqueue.
- memcache: In addition to nginx, the rails app also relies on memcache to avoid expensive computations.
- Cron: A cronjob runs every N minutes, grabs the most up to date copy of the rsync tree (w/generated metadata) and inserts items into the sidekiq queue for processing.
Service deployment
The service has a test suite:
bundle install --deployment
bundle exec rake test
The above should be sufficient to run the tests. They should pass before deployment.
The app can be 90% deployed from puppet. There are additional requirements once puppet has installed of the dependencies. Change directory into your checkout of the git source code and run:
su gpackages # if you run it as some other user, change users.
RAILS_ENV=production bin/first-time
It should do all the things to make the site work.
The code lives at:
- Git: sites/packages.git
- GitWeb: https://gitweb.gentoo.org/sites/packages.git/
Support
Email: gpackages@gentoo.org
This site is not critical to Gentoo Operations.