view · edit · sidebar · attach · print · history

20101129-install-win7-update-bbmb

<< Masa.20101130-update-bbmb-ch | 2010 | Masa.20101126-update-rpdf2txt >>


  1. Estimate update spreadsheet
  2. Check code regarding 'grouping' suspend
  3. Set up bbmb.ch

Goal
  • Install Win7, Office / 100%
  • Update bbmb.ch / 80%
Milestones
  1. Install Win7 8:35
  2. Install Office 9:10
  3. Install Ruby 9:10
  4. Estimate update spreadsheet 10:30
  5. Just look at the code around 'grouping' columns and rows suspend
  6. Set up bbmb.ch
Summary
Commits
ToDo Tomorrow
  • Finish setting up bbmb.ch locally
  • Setting DNS, Virtual host
Keep in Mind
  1. Testcase of 'Object Stream' parser (for rpdf2txt/lib/rpdf2txt/parser.rb#rebuild_object_catalogue method) 20101126-update-rpdf2txt
  2. Testcases of lib/oddb/html/state/global.rb#grant_download, lib/oddb/html/view/download.rb#to_html
  3. Debug testcases in test/export/test_server.rb de.oddb.org
  4. A bug import_gkv Tue Nov 16 02:00:10 2010: de.oddb.org Zubef (PDF)
  5. Compression (refer to lib/oddb/export/server.rb), Test cases (grant_download, Logging, Reporting)
  6. Log Error: on production server, de.oddb.org/log/import_dimdi, import_pharmnet
  7. On Ice
  8. emerge --sync

Estimate update spreadsheet

Reference

  1. To keep Macro (VBA) when spreadsheet runs
  2. To use 'grouping' from spreadsheet

Summary

  • Email ETA for the three Spreadsheet tasks
  • It seems that the spreadsheet library reads and writes byte code.
  • That means that I have to understand the byte format of Excel file.
  • Although I have found some document, I guess it is harder than rpdf2txt updating.

Check code regarding 'grouping'

suspend

Set up bbmb.ch

Email install http://gag.bbmb.ch on your local machine

ToDo

  1. git clone and get source bbmb.ch ver 1.0 http://scm.ywesee.com/?p=bbmb.ch/.git;a=summary
    • Check config info and file
  2. Change the domain
    • Check vhost settting
    • Check how to change the domain forwarder
  3. Change shipping setup
  4. Change logo
  5. Run locally

Install pdfinvoice, mnemonic

masa@masa ~/ywesee $ git clone git://scm.ywesee.com/pdfinvoice
masa@masa ~/ywesee/pdfinvoice $ cp ../rpdf2txt/install.rb .
masa@masa ~/ywesee/pdfinvoice $ ruby install.rb config
masa@masa ~/ywesee/pdfinvoice $ ruby install.rb setup
masa@masa ~/ywesee/pdfinvoice $ sudo ruby install.rb install

masa@masa ~/ywesee $ scp XXX@$PRODUCTION_SERVER:src/ruby/mnemonic*.tgz .
masa@masa ~/ywesee $ tar zxvf mnemonic-0.9.tgz
masa@masa ~/ywesee/mnemonic-0.9 $ sudo ruby install.rb 

I have found 'testenvironment'

masa@masa ~/ywesee/bbmb.ch $ tail src/util/bbmbapp.rb 
                }
        end
=end
end

begin
        # Reconfigure Application
        require 'testenvironment'
rescue Exception
end

Note

  • If there is no 'testenvironment' file (script), the mails will be sent to the actual address which is hard-coded in the script

Check mail addresses that are hard-coded

masa@masa ~/ywesee/bbmb.ch $ grep -r RECIP *
masa@masa ~/ywesee/bbmb.ch $ grep -r @g *|grep -v txt|grep pharm
masa@masa ~/ywesee/bbmb.ch $ grep -r @y *|grep -v txt|grep ywesee

put testenvironment.rb under src directory

#!/usr/bin/env ruby

puts 'loading testenvironment'
module BBMB
    class BbmbApp < SBSM::DRbServer
        puts "disabling UPDATER"
        remove_const :RUN_UPDATER
        RUN_UPDATER = false
    end
  class CustomBehaviorGag < CustomBehavior
    remove_const :MAIL_RECIPIENTS, :MAIL_RECIPIENTS_CC, :MAIL_INJECT_RECIPIENTS,
                 :MAIL_PDF_RECIPIENTS, :MAIL_PDF_RECIPIENTS_CC, :MAIL_PDF_FROM
    MAIL_RECIPIENTS = ['mhatakeyama@ywesee.com']
    MAIL_RECIPIENTS_CC = []
    MAIL_INJECT_RECIPIENTS = ['mhatakeyama@ywesee.com']
    MAIL_PDF_RECIPIENTS = ['mhatakeyama@ywesee.com']
    MAIL_PDF_RECIPIENTS_CC = []
    MAIL_PDF_FROM = 'mhatakeyama@ywesee.com'

  end
end

Set a virtual host

masa@masa ~/work $ cat /etc/apache2/vhosts.d/05_bbmbch_vhost.conf 
<Directory /home/masa/ywesee/bbmb.ch/doc>
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<VirtualHost *:80>
DocumentRoot /home/masa/ywesee/bbmb.ch/doc
ServerName masapharm.bbmb.ch
DirectoryIndex index.rbx
RubyAddPath /home/masa/ywesee/bbmb.ch/src
RubyRequire 'sbsm/trans_handler'
SetHandler ruby-object
RubyTransHandler SBSM::FlavoredTransHandler.instance
</VirtualHost>

Restart apache

masa@masa ~/work $ sudo /etc/init.d/apache2 restart
* Stopping apache2...
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                                     [ok]
* Starting apache2...
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                                     [ok]

Run bbmb.ch/bin/bbmbd

masa@masa ~/ywesee/bbmb.ch $ bin/bbmbd 
[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility
             layer which provides a drop-in replacement for Spreadsheet::Excel
             versions <= 0.3.5.1. This code will be removed in Spreadsheet
             version 1.0.0

no such file to load -- /home/masa/ywesee/bbmb.ch/etc/access_gag.rb
loading testenvironment
disabling UPDATER
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:148: warning: Object#type is deprecated; use Object#class
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:148: warning: Object#type is deprecated; use Object#class
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:148: warning: Object#type is deprecated; use Object#class
...
/usr/lib64/ruby/site_ruby/1.8/mnemonic/Mnemonic.rb:163: warning: Object#type is deprecated; use Object#class
running updater thread
running cleaner thread
running statistics thread
running cleaner thread
starting drb-service

Note

  • There are many mnemonic warnings

Access to http://masapharm.bbmb.ch/

Note

  • Looks working but
  • There is no logo shown
  • Looks css is not used
  • Login does not work

Memo

  • bbmb.ch (ver 1.0) does not use yus server for the authentification
  • bbmb.ch uses flat file on a remote server (ftp) for the user authentification
  • I should think this system (bbmb.ch) is totally different from oddb.org (de.oddb.org, yus) system
  • But functions are similar

Change only for my local

src/util/session.rb#http_protocol

        def http_protocol
            #'https'
            'http'
        end

Reboot bbmb.ch/bin/bbmbd

Access to http://masapharm.bbmb.ch/

Notes

  • CSS is used
  • But the authentification does not work
  • Because there is no user files in local

Next

  • Login as
    1. Super user
    2. Admin user
    3. Normal user

Ideas

  • Set up ftpd locally
  • Use the user (customer) files from the production server

Install pure-ftpd

sudo emerge pure-ftpd
... 
 * Messages for package net-ftp/pure-ftpd-1.0.28:

 * 
 * Before starting Pure-FTPd, you have to edit the /etc/conf.d/pure-ftpd file!
 * 
 * It's *really* important to read the README provided with Pure-FTPd!
 * Check out http://download.pureftpd.org/pub/pure-ftpd/doc/README for general info
 * and http://download.pureftpd.org/pub/pure-ftpd/doc/README.TLS for SSL/TLS info.
 * 

Reference

Setting ftpd

masa@masa ~/work $ sudo vim /etc/conf.d/pure-ftpd 
...
AUTH="-lpuredb:/etc/pureftpd.pdb"
MISC_OTHER="-A -E -X -U 177:077 -d -4 -L100:5 -I 15"
...

Start pure-ftpd

masa@masa ~/work $ sudo rc-update -v show
masa@masa ~/work $ sudo rc-update add pure-ftpd default
* service pure-ftpd added to runlevel default
view · edit · sidebar · attach · print · history
Page last modified on July 13, 2011, at 11:53 AM