view · edit · sidebar · attach · print · history

Index>

20161114-steinwies-rack

Summary

  • Deploy Steinwies with rack based SBSM
  • Convert davaz.com to use SBSM 1.3.1 with rack
  • Keep in Mind

Commits

Index

Finish conversion to use Steinwies with rack based SBSM

Must deply the stack based version of Steinwies.ch. Steps are:

  • Pull changes after fixing permissions via sudo chown -R apache:ywesee /var/www/steinwies.ch/.git@@
  • Create new deamontool for steinwies rack app
    • /var/www/steinwies.ch/svc.rack/log/run
    • /var/www/steinwies.ch/svc.rack/run
    • ln -s /var/www/steinwies.ch/svc.rack/ /service/steinwies.ch.rack
  • Update Ruby gems via cd /var/www/steinwies.ch/ && sudo -u apache /usr/local/bin/bundle install
  • Change Apache config
  • Adapt etc/config.yml by adding the following two lines
log_pattern: '/var/www/steinwies.ch/log/%Y/%m/%d/steinwies.log'
server_port: 8006
  • Fixed permissions on log with sudo chown -R apache:ywesee /var/www/steinwies.ch/log
  • Restart apache2 and deamontools for steinwies and steinwies.rack
  • Check that everything is okay

We have the following two problems:

There is a problem with our apache redirect. I was thinking that ProxyPreserveHost on should correct this.

Found out that I could achieve the same result for a reverse-proxy with the following lines in my private apache config
  RewriteEngine on
  RewriteRule ^/(.*)$ http://localhost:8006/$1 [P]

Corrected with commit Remove server_port. Homepage looks good. Sent a feedback mail.

Full steinwies config on fastpower is Attach:steinwies.ch.conf.txt

Found another solution for the server_port, as I need it for testing under travis. Also it is really convenient to be able to test everything completely separted. Pushed commit Reintroduce server_port for headless testing on travis-CI

Convert davaz.com to use SBSM 1.3.1 with rack

Pushed some changes to allow easier developement/fixing the failing unit tests with the commits Made browser used for test chooseable (Chromium, PhantomJS, FireFox) and Made test runnable

I do not understand why on travis I get the following error

EEEEEEEErrno::EADDRINUSE

Address already in use - bind(2) for "127.0.0.1" port 11081

whereas it works fine here. Does the commit Use phantomjs on Travis-CI fix this problem?

Tests are not fine, but good enough for me for the test. Converting now davaz.com to use Rack. Things start to come up. Problems connecting to yus daemon for davaz on port 12007. This service is missing on oddb-ci2. Tried to use yus of oddb.org on port 9997. This does not work. Added debug info. Yus on oddb-ci2 is still working with ruby 1.8. Trying to update it to Ruby 2.3.1 Added a similar /service/davaz.com-yus/run as on fastpower resolved this problem.

Now having problems with uninitialized variable @db_manager.db_connection. Okay. Is my mysql server and db ready? NO: I had to restart the mysql. Now the db_connection seems to be defined only in bin/davazd but not inside the webrick.

After initialize some variables in src/util/app.rb like

      @drb_uri = DaVaz.config.server_uri
      @yus_server = DRb::DRbObject.new(nil, DaVaz.config.yus_uri)
      @db_manager = DaVaz::Util::DbManager.new

things start to work fine. The animation don't work when accessing http://davaz.ngiger.ch:8007/en/personal/home/. But this is easily explained by the absence of the javascript. Pushing the changes made till now.

Created/changed the /etc/apache2/vhosts.d/davaz.com.conf, /service/davaz.com-yus/run, /service/davaz.com/run and /service/davaz.com.rack/run. Now after an apache restart

Still having problems to display a few javascript items (eg. besides rack in under http://davaz.ngiger.ch/en/works/paintings/#Rack_ADC). See

Looking at the javascript log I find GET http://davaz.ngiger.ch/resources/javascript/davaz.js ReferenceError: toggleShow is not defined

Also must decide tomorrow on howto distinguish static files and how to handle them in the most convenient or efficient way. Possible solutions are Apache config directives, using Rack::Static or adding more cases in the sbsm/app call method.

view · edit · sidebar · attach · print · history
Page last modified on November 14, 2016, at 07:04 PM