Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EPF Wiki Installation Guide"
Line 1: | Line 1: | ||
− | This guide describes how to install EPF Wiki 1.6 | + | This guide describes how to install EPF Wiki 1.6 using the Windows Web Server 2008 with IIS. EPF Wiki 1.6 |
+ | is based on [http://rubyonrails.org/| Rails 3.1.4]. This guide can be used as starting point for creating | ||
+ | a production environment for EPF Wiki based on IIS. Any edition of Windows Server 2008 may be installed | ||
+ | without activation and evaluated for 240 days. | ||
− | If you have any questions about this guide or EPF Wiki please use the [mailto:epf-dev@eclipse.org Eclipse Process Framework Project Developers List]. | + | ---- |
+ | The recommended production environment for Rails (and so for EPF Wiki) is Linux/Ubuntu, see | ||
+ | [[EPF Wiki Installation Guide for Ubuntu]]. Linux/Ubuntu will give you a much smoother | ||
+ | experience when it comes to running Rails applications. | ||
+ | ---- | ||
+ | |||
+ | If you have any questions about this guide or EPF Wiki please use the | ||
+ | [mailto:epf-dev@eclipse.org Eclipse Process Framework Project Developers List]. | ||
− | More on information on EPF Wiki | + | More on information on EPF Wiki is in the [[EPF Wiki User Guide]. |
== Requirements == | == Requirements == | ||
− | + | This installation guide was tested using the trial edition of Windows Web Server 2008 that can be downloaded | |
+ | from [http://www.microsoft.com/en-us/download/details.aspx?id=20407 | Microsoft.com]. | ||
+ | Using the Web Platform Installer (WPI) that is part of IIS we can easily install most of the required | ||
+ | components for running EPF Wiki by selecting the Ruby Hosting package provided by | ||
+ | [http://www.helicontech.com/zoo/ Helicon Zoo]. [http://www.helicontech.com/zoo/ Helicon Zoo] is a repository | ||
+ | of web frameworks and applications for Microsoft IIS. | ||
− | + | {| cellspacing="1" cellpadding="1" border="1" width="100%" | |
− | + | |- | |
− | + | | VirtualBox (optional, recommended) | |
− | + | | Ubuntu Software Centre | |
+ | |- | ||
+ | | Windows Web Server 2008 | ||
+ | | [http://www.microsoft.com/en-us/download/details.aspx?id=20407] | ||
+ | |- | ||
+ | | EPF Wiki 1.6 | ||
+ | | [http://www.eclipse.org/epf/downloads/epfwiki/downloads.php epfwiki_r1_6_20120916_0722.zip] | ||
+ | |- | ||
+ | | Web Platform Installer (WPI) | ||
+ | | [http://www.microsoft.com/web/downloads/platform.aspx wpilauncher.exe] | ||
+ | |- | ||
+ | | UnxUtils | ||
+ | | [http://sourceforge.net/projects/unxutils/ UnxUtils.zip] | ||
+ | |- | ||
+ | | MySQL Server 5.5 | ||
+ | | [mysql-5.5.24-win32.msi] | ||
+ | |} | ||
− | For your convenience most of the install files can be found in one location on [https://www.dropbox.com/sh/e11016pthwjxxpe/GRAX3rnx80 Dropbox] | + | For your convenience most of the install files can be found in one location on |
+ | [https://www.dropbox.com/sh/e11016pthwjxxpe/GRAX3rnx80 Dropbox] | ||
− | == | + | == VirtualBox (optional) == |
− | === | + | Installing EPF Wiki as a [http://en.wikipedia.org/wiki/Virtual_appliance virtual appliance] is a |
+ | convenient way to use or evaluate EPF Wiki. For the purpose of creating this guide | ||
+ | [https://www.virtualbox.org/wiki/Downloads VirtualBox 4.1.12] was used. | ||
+ | This can be installed using '''Ubuntu Software Centre'''. | ||
+ | |||
+ | Of course you can use any other virtualizer: [http://www.vmware.com VMWare], [www.parallels.com Parallels] | ||
+ | on any other platform. | ||
+ | |||
+ | == Windows Web Server 2008 == | ||
+ | |||
+ | Create a VM for MS Windows 2008 with following properties: 1024MB, 20Gb, enable PAE/NX, | ||
+ | enable VT-x/AMD-V, enable Nested Paging. [http://www.sysprobs.com/install-run-windows-2008-r2-x86-sun-virtualbox More...] | ||
+ | |||
+ | Add a dynamically expanding D-drive of 15GB to hold EPF Wiki sources and the process descriptions you will deploy. | ||
+ | |||
+ | Download [http://www.microsoft.com/en-us/download/details.aspx?id=20407 Windows Web Server 2008 iso]. In | ||
+ | VirtualBox mount the ISO as CD/DVD and boot and install Windows Web Server 2008. | ||
+ | |||
+ | === IIS === | ||
+ | |||
+ | After installation finishes, boot the machine and Logon as Administrator and add IIS as a server role using Server Manager. | ||
+ | [http://learn.iis.net/page.aspx/29/installing-iis-7-and-above-on-windows-server-2008-or-windows-server-2008-r2/ More...] | ||
+ | |||
+ | === Wwwroot to D === | ||
+ | |||
+ | This step is optional but the remainder of this guide assumes you will put wwwroot directory on the D drive. So | ||
+ | EPF Wiki will end up in D:\wwwroot\epfwiki_r1_6_20120916_0722 (rather than C:\inetpub\wwwroot\epfwiki_r1_6_20120916_0722). | ||
+ | |||
+ | * Logon to the VM and shutdown IIS. | ||
+ | * Copy C:\inetpub\wwwroot naar D:\wwwroot | ||
+ | * Rename C:\inetpub\wwwroot to wwwroot-renamed | ||
+ | * Open '''Administrator: Command Prompt''' and make a symbolic link | ||
+ | |||
+ | mklink /D "C:\inetpub\wwwroot" "D:\wwwroot" | ||
+ | |||
+ | * Start IIS and check that the default site http://localhost is still working. | ||
+ | |||
+ | == UnxUtils == | ||
UnxUtils is used to unzip uploaded zip files with content. To install it: | UnxUtils is used to unzip uploaded zip files with content. To install it: | ||
− | # Creat folder with path '''C:\UnxUtils''' and download and extract | + | # Creat folder with path '''C:\UnxUtils''' and download and extract there |
# Add the entry '''C:\UnxUtils\usr\local\wbin;''' for UnxUtils to your PATH variable | # Add the entry '''C:\UnxUtils\usr\local\wbin;''' for UnxUtils to your PATH variable | ||
Line 32: | Line 101: | ||
C:\Documents and Settings\Vmware> | C:\Documents and Settings\Vmware> | ||
− | + | Note: if you intend to upload via FTP rather than the web interface and there will be no | |
+ | uploaded zip files to extract, this step is still required. This is because UnxUtils is also | ||
+ | used when the first administration account is created. | ||
− | == | + | == Install MySQL Server 5.5 == |
− | + | I used mysql-5.5.24-win32.msi with '''Typical''' as the setup type. '''Standard Configuration''' | |
− | + | as the configuration type. Installed as Windows Service and I included bin directory in Windows PATH. | |
− | + | ||
− | + | ||
− | + | ||
== Helicon Zoo == | == Helicon Zoo == | ||
− | [http://www.helicontech.com/zoo/ Helicon Zoo] is a repository of web frameworks and applications for Microsoft IIS. We use this the Ruby Hosting Package and the WebMatrix Templates. These components are installed using WPI | + | [http://www.helicontech.com/zoo/ Helicon Zoo] is a repository of web frameworks and applications for Microsoft IIS. |
+ | We use this the Ruby Hosting Package and the WebMatrix Templates. These components are installed using | ||
+ | [http://www.microsoft.com/web/downloads/platform.aspx Web Platform Installer] (WPI) by Microsoft. | ||
− | * Start WPI | + | * Logon to the VM as Administrator |
− | * Select '''Options''' | + | * Start IIS Manager en de site and select WPI. |
− | + | * Select '''Options''' and enter the Helicon Zoo feed http://www.helicontech.com/zoo/feed/ as '''Custom Feed''' and check '''Enable configuration of all web application parameters''' | |
+ | * select '''Add feed''' and '''OK'''. | ||
* You should now see a tab '''Zoo'''. Select that and '''Add''' the following components | * You should now see a tab '''Zoo'''. Select that and '''Add''' the following components | ||
** Ruby Hosting Package | ** Ruby Hosting Package | ||
Line 54: | Line 125: | ||
[[Image:Epfwf-wpi-change-options.png]] | [[Image:Epfwf-wpi-change-options.png]] | ||
− | |||
− | |||
− | |||
− | |||
== Install EPF Wiki == | == Install EPF Wiki == | ||
− | + | Download [http://www.eclipse.org/epf/downloads/epfwiki/downloads.php epfwiki_r1_6_20120916_0722.zip] and install it by | |
− | + | extracting it to the folder D:\wwwroot\epfwiki_r1_6_20120916_0722 | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Download | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=== Create the MySQL Database User === | === Create the MySQL Database User === | ||
Line 161: | Line 169: | ||
password: ikiwpur | password: ikiwpur | ||
encoding: utf8 | encoding: utf8 | ||
+ | |||
+ | === Vendor Gems === | ||
+ | |||
+ | Deployment using IIS is less straightforward compared to for example Ubuntu as a result of the security model | ||
+ | of IIS. For this reason HeliconTech recommends you put the package the required gems in vendor cache. | ||
+ | [http://www.helicontech.com/articles/ruby-on-rails-on-windows-in-production/ More...] | ||
+ | |||
+ | For you convience all files that are required for IIS deployment are in a separate download | ||
+ | [http://www.eclipse.org/epf/downloads/epfwiki/downloads.php epfwiki_r1_6_20120916_0722_iis.zip]. You | ||
+ | can download that file and merge it with EPF Wiki sources to complete this step. | ||
+ | |||
+ | '''The following steps in this section are not required. There are provide in case you need to | ||
+ | recreate the vendor gems''' | ||
+ | |||
+ | In case you need/want to package gems yourself, the procedure advised by HeliconTech is as follows. Install Ruby | ||
+ | and EPF Wiki on a separate MS Windows box. Install bundler. | ||
+ | gem install bundler -v=1.1.4 | ||
+ | |||
+ | Install gems by opening command prompt and navigating to EPF Wiki folder. | ||
+ | bundle install | ||
+ | Package the gems. | ||
+ | bundle package | ||
+ | |||
+ | Now the gems will be in a special folder <tt>vendor/cache</tt>. HeliconTech you put those gems | ||
+ | in a folder <tt>vendor/gems</tt> and upload to the IIS server to the <tt>vendor/gems</tt> directory. | ||
+ | Now these/any gems will be installed automatically when you | ||
+ | (re)start because the <tt>deploy.rb</tt> contains a line to install them. | ||
+ | bundle install --local --path vendor/gems | ||
+ | |||
+ | === Bundle Install === | ||
+ | |||
+ | Via '''Start''' > '''All Programs''' > '''Ruby 1.9.3-p0''' > '''Start Command Prompt with Ruby'''. Navigate to the application folder and | ||
+ | enter | ||
+ | bundle install --local --path vendor/gems | ||
+ | |||
+ | Note that this command will also run each time you restart the server. | ||
+ | |||
+ | [[Image:Epfw-r1.6-bundle-install.png]] | ||
+ | |||
+ | ==== MySQL Connector/C ==== | ||
+ | |||
+ | <tt>bundle install</tt> at the outputs a message similar to below, with instructions to download and put <tt>libmysql.dll</tt> in Ruby bin directory. I downloaded my version of the connector <tt>mysql-connector-c-noinstall-6.0.2-win32.zip</tt> from [http://dev.mysql.com/downloads/connector/c/#downloads dev.mysql.com downloads]. | ||
+ | |||
+ | ====================================================================================================== | ||
+ | |||
+ | You've installed the binary version of mysql2. | ||
+ | It was built using MySQL Connector/C version 6.0.2. | ||
+ | It's recommended to use the exact same version to avoid potential issues. | ||
+ | |||
+ | At the time of building this gem, the necessary DLL files where available | ||
+ | in the following download: | ||
+ | |||
+ | http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick | ||
+ | |||
+ | And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\bin | ||
+ | |||
+ | ====================================================================================================== | ||
=== Create the database schema === | === Create the database schema === | ||
Line 192: | Line 257: | ||
C:\Users\Administrator\Documents\My Web Sites\EPFW> | C:\Users\Administrator\Documents\My Web Sites\EPFW> | ||
+ | |||
+ | |||
+ | === TinyMCE === | ||
+ | |||
+ | EPF Wiki uses the rich text editor TinyMCE which is a separate download and install. To integrate TinyMCE with EPF Wiki: | ||
+ | |||
+ | # Download '''TinyMCE 3.2.0.2''' from [http://tinymce.moxiecode.com/download.php tinymce.moxiecode.com]. | ||
+ | # Extract the contents and copy the folder '''tinymce\jscripts\tiny_mce''' to '''[application install dir]\public\javascripts'''. The folder '''javascripts\tiny_mce''' should now contain Javascript library '''tiny_mce.js''' | ||
+ | |||
+ | ---- | ||
+ | The 1.6 release of EPF Wiki was tested against TinyMCE 3.2.0.2. If you can't find that download, you can also download from | ||
+ | my [https://www.dropbox.com/sh/e11016pthwjxxpe/-Xz2mQXkMR/tiny_mce-3.2.0.2.zip dropbox] share. | ||
+ | |||
+ | === production.rb === | ||
+ | |||
+ | In EPF Wiki folder you might want to edit the configuration file for the production environment <tt>production.rb</tt>. At this point the three three configuration settings at the are the most important. | ||
+ | |||
+ | ENV['EPFWIKI_APP_NAME'] = 'EPF Wiki' | ||
+ | ENV['EPFWIKI_REPLY_ADDRESS'] = "no-reply@epf.eclipse.org" | ||
+ | ENV['EPFWIKI_HOST'] = "localhost" # used for jobs, when there is no host variable in the environment | ||
+ | |||
+ | The no-reply address is rendered in every email as the from address. | ||
+ | |||
+ | EPF Wiki uses jobs (Scheduled Tasks on Windows) to send reports and update Wiki sites. Such a job is unaware of the Web server | ||
+ | configuration as no Web server is involved in the operation, so we have to tell EPF Wiki the host and port the Web server is using. | ||
+ | Note: include a port number if you are not using the default port 80 e.g. '''ENV['EPFWIKI_HOST'] = "myepfwiki:8080"''' | ||
+ | |||
+ | |||
== Configure EPF Wiki == | == Configure EPF Wiki == | ||
Line 212: | Line 305: | ||
ActionMailer::Base.delivery_method = :test | ActionMailer::Base.delivery_method = :test | ||
− | === Start EPF Wiki === | + | === Start EPF Wiki using WebRick === |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Before we run EPF Wiki using IIS, we run EPF Wiki using the embedded WEBrick webserver. If something is wrong the | |
+ | WEBRick console will give us more clues what needs to be fixed. Open command prompt and navigate to EPF Wiki folder | ||
+ | rails console production | ||
− | If | + | If something is wrong the log file <tt>log/production.log</tt> will have more detailed information about errors. |
=== Add Scheduled Task(s) === | === Add Scheduled Task(s) === |
Revision as of 23:16, 18 September 2012
This guide describes how to install EPF Wiki 1.6 using the Windows Web Server 2008 with IIS. EPF Wiki 1.6 is based on Rails 3.1.4. This guide can be used as starting point for creating a production environment for EPF Wiki based on IIS. Any edition of Windows Server 2008 may be installed without activation and evaluated for 240 days.
The recommended production environment for Rails (and so for EPF Wiki) is Linux/Ubuntu, see EPF Wiki Installation Guide for Ubuntu. Linux/Ubuntu will give you a much smoother experience when it comes to running Rails applications.
If you have any questions about this guide or EPF Wiki please use the Eclipse Process Framework Project Developers List.
More on information on EPF Wiki is in the [[EPF Wiki User Guide].
Contents
Requirements
This installation guide was tested using the trial edition of Windows Web Server 2008 that can be downloaded from | Microsoft.com. Using the Web Platform Installer (WPI) that is part of IIS we can easily install most of the required components for running EPF Wiki by selecting the Ruby Hosting package provided by Helicon Zoo. Helicon Zoo is a repository of web frameworks and applications for Microsoft IIS.
VirtualBox (optional, recommended) | Ubuntu Software Centre |
Windows Web Server 2008 | [1] |
EPF Wiki 1.6 | epfwiki_r1_6_20120916_0722.zip |
Web Platform Installer (WPI) | wpilauncher.exe |
UnxUtils | UnxUtils.zip |
MySQL Server 5.5 | [mysql-5.5.24-win32.msi] |
For your convenience most of the install files can be found in one location on Dropbox
VirtualBox (optional)
Installing EPF Wiki as a virtual appliance is a convenient way to use or evaluate EPF Wiki. For the purpose of creating this guide VirtualBox 4.1.12 was used. This can be installed using Ubuntu Software Centre.
Of course you can use any other virtualizer: VMWare, [www.parallels.com Parallels] on any other platform.
Windows Web Server 2008
Create a VM for MS Windows 2008 with following properties: 1024MB, 20Gb, enable PAE/NX, enable VT-x/AMD-V, enable Nested Paging. More...
Add a dynamically expanding D-drive of 15GB to hold EPF Wiki sources and the process descriptions you will deploy.
Download Windows Web Server 2008 iso. In VirtualBox mount the ISO as CD/DVD and boot and install Windows Web Server 2008.
IIS
After installation finishes, boot the machine and Logon as Administrator and add IIS as a server role using Server Manager. More...
Wwwroot to D
This step is optional but the remainder of this guide assumes you will put wwwroot directory on the D drive. So EPF Wiki will end up in D:\wwwroot\epfwiki_r1_6_20120916_0722 (rather than C:\inetpub\wwwroot\epfwiki_r1_6_20120916_0722).
- Logon to the VM and shutdown IIS.
- Copy C:\inetpub\wwwroot naar D:\wwwroot
- Rename C:\inetpub\wwwroot to wwwroot-renamed
- Open Administrator: Command Prompt and make a symbolic link
mklink /D "C:\inetpub\wwwroot" "D:\wwwroot"
- Start IIS and check that the default site http://localhost is still working.
UnxUtils
UnxUtils is used to unzip uploaded zip files with content. To install it:
- Creat folder with path C:\UnxUtils and download and extract there
- Add the entry C:\UnxUtils\usr\local\wbin; for UnxUtils to your PATH variable
After these steps you should be able to run unzip from any folder. To test it:
C:\Documents and Settings\Vmware>unzip --help UnZip 5.42 of 14 January 2001, by Info-ZIP. Maintained by C. Spieler. ... C:\Documents and Settings\Vmware>
Note: if you intend to upload via FTP rather than the web interface and there will be no uploaded zip files to extract, this step is still required. This is because UnxUtils is also used when the first administration account is created.
Install MySQL Server 5.5
I used mysql-5.5.24-win32.msi with Typical as the setup type. Standard Configuration as the configuration type. Installed as Windows Service and I included bin directory in Windows PATH.
Helicon Zoo
Helicon Zoo is a repository of web frameworks and applications for Microsoft IIS. We use this the Ruby Hosting Package and the WebMatrix Templates. These components are installed using Web Platform Installer (WPI) by Microsoft.
- Logon to the VM as Administrator
- Start IIS Manager en de site and select WPI.
- Select Options and enter the Helicon Zoo feed http://www.helicontech.com/zoo/feed/ as Custom Feed and check Enable configuration of all web application parameters
- select Add feed and OK.
- You should now see a tab Zoo. Select that and Add the following components
- Ruby Hosting Package
- WebMatrix Templates
Install EPF Wiki
Download epfwiki_r1_6_20120916_0722.zip and install it by extracting it to the folder D:\wwwroot\epfwiki_r1_6_20120916_0722
Create the MySQL Database User
From the same command prompt window as used in the previous step you can now create the MySQL Database User Account.
- In the Command Prompt logon to MySQL as root
- Create the user epfwiki with the password ikiwpur.
- Grant privileges and usage to this database user.
Of course you can use a different database user and password, you should change the database config file config/database.yml accordingly.
Example:
C:\Users\Administrator\Documents\My Web Sites\EPFW>mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.27-community Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create user 'epfwiki'@'localhost' identified by 'ikiwpur'; Query OK, 0 rows affected (0.08 sec) mysql> grant all privileges on *.* to 'epfwiki'@'localhost'; Query OK, 0 rows affected (0.05 sec) mysql> grant usage on *.* to 'epfwiki'@'localhost'; Query OK, 0 rows affected (0.00 sec)
database.yml
Edit the database configuration file config/database.yml. Make sure that the production entry matches your username and password from the previous step.
production: adapter: mysql2 database: epfwiki host: 127.0.0.1 username: epfwiki password: ikiwpur encoding: utf8
Vendor Gems
Deployment using IIS is less straightforward compared to for example Ubuntu as a result of the security model of IIS. For this reason HeliconTech recommends you put the package the required gems in vendor cache. More...
For you convience all files that are required for IIS deployment are in a separate download epfwiki_r1_6_20120916_0722_iis.zip. You can download that file and merge it with EPF Wiki sources to complete this step.
The following steps in this section are not required. There are provide in case you need to recreate the vendor gems
In case you need/want to package gems yourself, the procedure advised by HeliconTech is as follows. Install Ruby and EPF Wiki on a separate MS Windows box. Install bundler.
gem install bundler -v=1.1.4
Install gems by opening command prompt and navigating to EPF Wiki folder.
bundle install
Package the gems.
bundle package
Now the gems will be in a special folder vendor/cache. HeliconTech you put those gems in a folder vendor/gems and upload to the IIS server to the vendor/gems directory.
Now these/any gems will be installed automatically when you
(re)start because the deploy.rb contains a line to install them.
bundle install --local --path vendor/gems
Bundle Install
Via Start > All Programs > Ruby 1.9.3-p0 > Start Command Prompt with Ruby. Navigate to the application folder and enter
bundle install --local --path vendor/gems
Note that this command will also run each time you restart the server.
MySQL Connector/C
bundle install at the outputs a message similar to below, with instructions to download and put libmysql.dll in Ruby bin directory. I downloaded my version of the connector mysql-connector-c-noinstall-6.0.2-win32.zip from dev.mysql.com downloads.
====================================================================================================== You've installed the binary version of mysql2. It was built using MySQL Connector/C version 6.0.2. It's recommended to use the exact same version to avoid potential issues. At the time of building this gem, the necessary DLL files where available in the following download: http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick And put lib\libmysql.dll file in your Ruby bin directory, for example C:\Ruby\bin ======================================================================================================
Create the database schema
Start Command Prompt with Ruby as in previous step and navigate to the application folder. Issue the following commands to create the database schema.
set RAILS_ENV=production rake db:create db:migrate
Note: if you need or want to recreate the database you can run the command rake rake db:drop db:create db:migrate
Example:
C:\Users\Administrator\Documents\My Web Sites\EPFW>set RAILS_ENV=production C:\Users\Administrator\Documents\My Web Sites\EPFW>rake db:create db:migrate (in C:/InstantRails2.0/rails_apps/EPFWiki) == 1 Initial: migrating ======================================================= -- create_table("checkouts", {:force=>true}) -> 0.0160s -- add_index("checkouts", ["user_id"], {:name=>"checkouts_user_id_index"}) -> 0.0160s ... (lines deleted) ... == 8 AdminMessages: migrating ================================================= == 8 AdminMessages: migrated (0.1250s) ======================================== == 9 CreateUpdates: migrating ================================================= -- create_table(:updates) -> 0.0160s == 9 CreateUpdates: migrated (0.0160s) ======================================== C:\Users\Administrator\Documents\My Web Sites\EPFW>
TinyMCE
EPF Wiki uses the rich text editor TinyMCE which is a separate download and install. To integrate TinyMCE with EPF Wiki:
- Download TinyMCE 3.2.0.2 from tinymce.moxiecode.com.
- Extract the contents and copy the folder tinymce\jscripts\tiny_mce to [application install dir]\public\javascripts. The folder javascripts\tiny_mce should now contain Javascript library tiny_mce.js
The 1.6 release of EPF Wiki was tested against TinyMCE 3.2.0.2. If you can't find that download, you can also download from my dropbox share.
production.rb
In EPF Wiki folder you might want to edit the configuration file for the production environment production.rb. At this point the three three configuration settings at the are the most important.
ENV['EPFWIKI_APP_NAME'] = 'EPF Wiki' ENV['EPFWIKI_REPLY_ADDRESS'] = "no-reply@epf.eclipse.org" ENV['EPFWIKI_HOST'] = "localhost" # used for jobs, when there is no host variable in the environment
The no-reply address is rendered in every email as the from address.
EPF Wiki uses jobs (Scheduled Tasks on Windows) to send reports and update Wiki sites. Such a job is unaware of the Web server configuration as no Web server is involved in the operation, so we have to tell EPF Wiki the host and port the Web server is using. Note: include a port number if you are not using the default port 80 e.g. ENV['EPFWIKI_HOST'] = "myepfwiki:8080"
Configure EPF Wiki
Specify the details of your SMTP server
EPF Wiki uses email extensively (for registration of new users, change reports), so an important step for any production environment is to add the details of your SMTP server. To do this edit the file config/initializers/setup_mail.rb. Change the file to match your SMTP server settings. An example for the Gmail SMTP server is
ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => "epf.eclipse.org", :user_name => "onno.van.der.straaten@gmail.com", :password => "****", :authentication => "plain", :enable_starttls_auto => true }
If you don't have a SMTP server you could also use the following line in that file. That way you can use EPF Wiki without error messages being generated. In the log file log/production.log you will find extracts of email message send. There you should be able to find for example the sign up links send to users to create an account.
ActionMailer::Base.delivery_method = :test
Start EPF Wiki using WebRick
Before we run EPF Wiki using IIS, we run EPF Wiki using the embedded WEBrick webserver. If something is wrong the WEBRick console will give us more clues what needs to be fixed. Open command prompt and navigate to EPF Wiki folder
rails console production
If something is wrong the log file log/production.log will have more detailed information about errors.
Add Scheduled Task(s)
There are two jobs you can run using a scheduled task. One is used to update Wiki sites with new baselines which you can run as often as you like. One is used to send reports which is meant to be run once a day. If you run it more often, users who subscribed for a daily report will get multiple daily reports.
To update Wiki site with new baselines you execute the following command from EPF Wiki application root:
rake epfw:update RAILS_ENV=production
To send reports you run
rake epfw:reports RAILS_ENV=production
Or you could run both jobs as one task, updating first and then sending reports
rake epfw:update epfw:reports RAILS_ENV=production