You are here: Foswiki>Main Web>EagleDB (13 Jul 2018, OliverBock)Edit Attach


Development environment

  • Installed latest rbenv and ruby-build
  • Installed ruby, rubygems and rails (same versions as on current production server)
    • Ruby 1.8.7-p302 2.1.2
    • Rubygems 1.3.7 2.2.2
    • Rails 2.3.8 4.1.5
    • Ferret 0.11.6
  • Selected 1.8.7-p302 via rbenv in local eagledb repo checkout
  • Fixed issue that prevented the tracked codebase from running elsewhere
  • Improved dynamic environment settings to use temporary data/index storage while in development mode


Milestone 1: fix/improve the search for Eagle project files

  • alert The BASENAME of a project is given solely by its *.sch or *.brd, whichever exists and is found first! The BASENAME is not given by the parent directory! There might be more than one project per directory!
  • DoneGiven the current seach interface, the search results should include Eagle projects that are stored using the current XML-based project files
    • Indexing of BRD/SCH files can almost be done like indexing the binary files: the start/stop markers are similar (XML tag vs. raw marker/zero-char), the content in between is the same
    • Note: the original marker was incorrect because parts of it could change (info.ulp vs. plot.ulp vs. *.ulp)! Solution: just use fixed part
    • Pay attention to file encoding: XML is utf8, binaries are latin1
  • Done Remove "(" and ")" from search strings: they are part of the Ferret Query Language (FQL) but are also a vital part of the indexed content so users might include them in their search terms but they are not aware of the FQL semantics.
  • Done Given that project/*.[sch|brd] exists in the index, the index should not include project/brd/boardhouse/*.[sch|brd] files which usually are similar copies of the parent project files.
  • Done The index should not include BASENAME-multi.brd files which usually are similar copies of the parent project files for PCB manufacturing.
  • Done "Score" should be the default sort order
  • Done Make sure only the actual info section of *.sch and *.brd files are index, not their entire string content.
  • Done Make sure projects can be found by their respective path (components) alone, in case no other info/details could be found.
  • Done Add the project's revision info to the details block
  • Done Given the current search, the results should contain links to the documentation, actual board designs and schematics as well as display any available PCB preview images.
    • alert All paths used in links have to be properly escaped
    • Done Board and schematic files
    • Done Documentation
      • Exists (optionally) as doc/latex/BASENAME-documentation.pdf, parallel to the indexed BASENAME.[brd|sch] files
      • alert Note: due to compatibility reasons BASENAME can be sanitized/normalized:
        • Replace SPACE with underscore
        • Replace German umlauts (ä->ae, Ä->AE, ß->ss)
        • Replace parentheses by underscores
        • Take the filename without extension and replace all dots by underscores
        • Replace dual underscores by single ones
        • In order to support files that don't yet adhere to the current name normalisation, documentation should be search for like this:
          1. BASENAME fully sanitised
          2. BASENAME sanitised, retaining parentheses
          3. BASENAME sanitised, retaining periods
          4. BASENAME sanitised, retaining parentheses and periods
          5. BASENAME sanitised, retaining parentheses, periods and umlauts
          6. BASENAME with whitespace sanitisation only
          • first match wins
          • The files should be search in doc/latex as well as doc/ itself
      • Should be linked as "Documentation", as the first item in the "Files" result section
    • Done Preview images
      • Preview images should be displayed on a separate page, referenced from each search result
      • Preview images live in doc/preview, parallel to the indexed BASENAME.[brd|sch] files
      • PCB previews are named BASENAME-boardbottom.png and BASENAME-boardtop.png
      • Schematic previews are named BASENAME-sheetPAGENUMBER.png
        • There might be file names like BASENAME.sheetPAGENUMBER.png which should also be supported (if both formats exist, use hyphenated version)
        • PAGENUMBER is always in a range between 1 and 255 and increases in a continuous sequence. That means, stop searching when no more sheet can be found.
      • The page layout of the preview images should follow Eagle's current presentation style (attached)
    • Done Add modification date and file type info to all downloadable files (Doc, Board, Schematic)
  • Done Provide a link to download all (relevant) project files as a ZIP archive (created on the fly)

Milestone 2: infrastructure upgrade

  • Done Port the application from Rails 2.3.8 to Rails 3.0.20 (Ruby 1.8.7 -> Ruby 1.9.3)
  • Done Port the application from Rails 3.0.20 to Rails 3.1.12 (Ruby 1.9.3)
  • Done Port the application from Rails 3.1.12 to Rails 3.2.19 (Ruby 1.9.3)
  • Done Port the application from Rails 3.2.19 to Rails 4.0.9 (Ruby 1.9.3)
  • Done Port the application from Rails 4.0.9 to Rails 4.1.5 (Ruby 1.9.3 -> Ruby 2.1.2)
  • Done Deploy application on existing Debian Squeeze VM until new VM (see below) becomes available
    • Done Update current VM (ensure correct sources.list for security patches)
    • Done Install Ruby
      • Installed required packages: libssl-dev, build-essential
      • Installed rbenv using rbenv-installer in /opt/rbenv (installed as root, just move ~/.rbenv)
      • Installed Ruby 2.1.2 (set it as global version)
      • Added gem config to /root/.gemrc
      • Installed bundler gem
    • Done Install and prepare a Nginx instance with Phusion Passenger on port 80 (Debian Squeeze repo available)
      • Installed following the steps above
      • Overriding passenger_ruby with path of Ruby 2.1.2 installed above (/opt/rbenv/shims/ruby) in /etc/nginx/nginx.conf
      • Added basic server config to /etc/nginx/sites-available/e-portal (symlinked to sites-enabled, removed default site)
        • Sets listen, server_name, root and enables passenger
        • Sets passenger_user and passenger_group to eportal (verify user switching works!)
    • Done Deploy application
      • Created new user: eportal
      • Add rbenv shebang to /home/eportal/.bashrc setting RBENV_ROOT to /opt/rbenv (make sure ~/.bash_profile doesn't exist!)
      • Added personal account to eportal group
      • Created new app root (owned by eportal, SGID set): /srv/e-portal
      • Checked out app into app root (with personal account)
      • Installed application bundle in app root: bundle install --deployment --without development test
      • Generate new secret token with bundle exec rake secret and export it as SECRET_KEY_BASE in /home/eportal/.bashrc
      • Precompiled assets: RAILS_ENV=production bundle exec rake assets:precompile
      • Created symlink APPROOT/public/projects pointing to /mnt/data/eagleprojects
      • Added admin credentials
    • Done Added daily cron job to rebuild the project index: /etc/cron.daily/e-portal
    • Done Remove old mongrel init/rc-scripts and rerun dpkg-reconfigure sysv-rc
  • TODO Investigate whether it would be useful to use Capistrano for deployment

Milestone 3: GUI overhaul

  • Done Port the application from ERB to Haml
  • Done Given the website front-page, it should be made more appealing and improved in terms of usability (intuitive handling)
  • Done Given the website front-page, it should make available all searches (including the device database below)

Milestone 4: add indexing of / searching for datasheet files

  • New Given the current website, it should offer a search over all datasheets (PDF) of electronic devices
    • Index all PDF filenames (each path component as a separate term) underneath a predefined path
    • Results: absolute filenames, linking to the file itself
      • Ff there's only a single result, open the PDF file in the browser

Milestone 5: database of electronic devices in the field

  • New Given the website, it should offer a new search over a database of devices to facilitate device handling in the field (labs)
    • The devices are to be stored in a database
    • alerthelp All devices share a common set of attributes (to be defined)
    • Devices are to be searched by a unique identifier
    • Search results show all the details of the selected device
    • CRUD operations on devices need to be provided to selected users (admins)

Milestone 6: new production VM

  • Set up new production VM based on Debian Wheezy (standard AEI image, maintained via FAI/Chef/etc)
Topic attachments
I Attachment Action Size Date Who Comment
2014-08-20_05.42.20_pm.pngpng 2014-08-20_05.42.20_pm.png manage 127 K 20 Aug 2014 - 15:56 UnknownUser Screenshot of design mockup (search results)
EAGLEVorschaubilder.pngpng EAGLEVorschaubilder.png manage 27 K 22 Jul 2014 - 09:14 UnknownUser  
Topic revision: r34 - 13 Jul 2018, OliverBock
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback