Difference between revisions of "Replikwando/Installation"

From ISoft Wiki
Jump to navigationJump to search
Line 11: Line 11:
#:SSL Certs can be found in <svndir>\itrack2\trunk\Certificates\<companyname>-cert.  If certs don't exist for the company, ask Dayton or Brian to generate them.
#:SSL Certs can be found in <svndir>\itrack2\trunk\Certificates\<companyname>-cert.  If certs don't exist for the company, ask Dayton or Brian to generate them.
#Edit Replication.ini file
#Edit Replication.ini file
##This is a long section, found [#Host_INI_Configuration lower down]
#*This is a long section, found [[#Configuring the replication.ini file|lower down]]
#Edit my.ini file (default location %PROGRAMFILES%\MySQL\MySQL server 5.1\my.ini)
#Edit my.ini file (default location %PROGRAMFILES%\MySQL\MySQL server 5.1\my.ini)
##Add the following under [mysqld]:
##Add the following under [mysqld]:
Line 19: Line 19:
#:Either
#:Either
##Restart service in control panel -> Admin tools -> services
##Restart service in control panel -> Admin tools -> services
##:OR
##in command prompt:  
##in command prompt:  
##:net stop mysql
##:net stop mysql
##:net start mysql
##:net start mysql
#Set up Task Schedule to run Replikwando once after business hours.
#Run replikwando_service_install.bat
#:Only need to set up schedule if installing during business hours so that you don't lock up clients database
#:This will install replikwando as a service and start it up (which does NOT start the initial push immediately)
#Tell Brian user and Product code so he can set up triggers on HTP.net
#:If you wish to do an initial push sooner, use the Replikwando Message Interface
 
*Note: Replikwando will lock up the entire database during the initial push, so it may be a good idea to run it at the end of the work day.


==Linux Sever==
==Linux Sever==
Line 32: Line 31:
Replikwando on Linux using Wine
Replikwando on Linux using Wine


#Connect to the customer's server using sftp (it's a *nix app, may need to install Cygwin-X)
#Connect to the customer's server using sftp (Filezilla and others support this, and it comes with cygwin and linux)
#:Do `put “Replikwando with Wine.tar.gz” .` to put the install files on their server
#:Do `put “Replikwando with Wine.tar.gz” .` to put the install files on their server
#:You can also put the customer's key and cert now, as well
#:You should also put the customer's key and cert over as well (ca-cert.pem is included in the gz)
#Connect to the customer's server using SSH/putty
#Connect to the customer's server using SSH/putty
#:Extract the files using `tar -zxf “Repikwando with Wine.tar.gz”`
#:Extract the files using `tar -zxf “Repikwando with Wine.tar.gz”`
Line 43: Line 42:
#:The script will tell you when it is done running.
#:The script will tell you when it is done running.
#Navigate to ~/.wine/drive_c/Program\ Files/Replikwando
#Navigate to ~/.wine/drive_c/Program\ Files/Replikwando
#:This directory will contain the error logs, sqlite file, and so on.
#:This directory will contain the error logs, sqlite file, and so on when Replikwando is started.
#:Put in the required values for replication.ini (see above)
#:Put in the required values for replication.ini (see above)
#Type `vi replication.ini` to edit the replication file`
#*This is a long section, found [[#Configuring the replication.ini file|lower down]]
#Type ~/replikwando_startup.sh to start Replikwando for the first time.
#Type ~/replikwando_startup.sh to start Replikwando for the first time.
#:Confirm that Replikwando is running correctly using the error logs here
#:Confirm that Replikwando is running correctly using the error logs here
Line 51: Line 52:
#:You'll have to type a 'use <database>' command before running queries
#:You'll have to type a 'use <database>' command before running queries
#Once Replikwando is confirmed running, type `sudo vi /etc/rc.local` and place the following lines just above the last line that says 'exit 0':
#Once Replikwando is confirmed running, type `sudo vi /etc/rc.local` and place the following lines just above the last line that says 'exit 0':
# start replikwando
#:<nowiki># start replikwando</nowiki>
#sudo -H -u isoft /home/isoft/replikwando_startup.sh
#:<nowiki>sudo -H -u isoft /home/isoft/replikwando_startup.sh</nowiki>
#Done!
#Done!
<br>
<br>
*Some quick tips:<br>
Quick linux commands:
Quick linux commands:
:ls : shows you what is in the directory
*ls : shows you what is in the directory
:sudo : lets you run powerful & dangerous commands (requires password)
*sudo : lets you run powerful & dangerous commands (requires password)
:cd : change directory
*cd : change directory
:rm : deletes a file (use rm -r to delete a folder)
*rm : deletes a file (use rm -r to delete a folder)
:deletes cannot be undone!
**deletes cannot be undone!<br>
:You can't open Replikwando's UI to see if it's pushing data, so you have to rely on the error logs and test database changes.
You can't open Replikwando's UI to see if it's pushing data, so you have to rely on the error logs and test database changes.<br>
:All normal Replikwando caveats apply (initial push db lock, query error logs, so on so forth)
All normal Replikwando caveats apply (initial push db lock, query error logs, so on so forth)


After the initial push, be sure to copy over functions and stored procedures as necessary, as replikwando doesn't do this automatically.
== Configuring the replication.ini file ==
Use ITEncrypter Frontend.exe to generate an encrypted username and password (Get it from File::Tech Support)
#[FromServer]
#:Host
#:Database
#:Username
#:Password
#:binlogpath - Should be the path to their MySQL 'data' directory
#:mysqlbinpath - Should be the path to their MySQL 'bin' directory
#Set Username and Password for [ToDatabase] with same account info setup on Replikwando Records
#:Use Frontend to convert pass to hash
#:Add "Z" in front of hash
#Set database = product code (Company product code can be found in their companyinfo table.  If one doesn't exist there, you can create a new one when you create their account.)
#[SSL]
#:Set path = path to the folder where the SSL Certificates are stored
#:Set prefix = everything before -cert
#*:Ex. for ABC-Company-cert.pem, prefix=ABC-Company
#[Heartbeat]
#:Set the Process ID (for heartbeat) to the company's product code
#Set use_compression=True if the connection uses the internet, False if it's on the local network (or same machine)


If you have any additional questions, ask Justin.
If you have any additional questions, ask Justin.

Revision as of 19:21, 8 November 2010

Windows Server

Service version of Replikwando, which will copy a customers database to ISoft's server so their inventory can eventually be updated on heavytruckparts.net.

  1. Connect to the server thru VNC
  2. Check their local itrackpro/itrackenterprise database for their company produce code (companyinfo.productcode or settings.location=CompanyInfo) and use it when creating their account
  3. Create Replikwando account on Replikwando Records - Add New Company website
    Update Kungfu to include the new HTP account information
  4. Download Replikwando Install pack from tools.isoftdata.com
  5. Copy SSL Certificates over to %PROGRAMFILES%\Isoft Data Systems\Certificates
    SSL Certs can be found in <svndir>\itrack2\trunk\Certificates\<companyname>-cert. If certs don't exist for the company, ask Dayton or Brian to generate them.
  6. Edit Replication.ini file
  7. Edit my.ini file (default location %PROGRAMFILES%\MySQL\MySQL server 5.1\my.ini)
    1. Add the following under [mysqld]:
      log-bin
      expire-logs-days=10
  8. Stop and Start the MySQL service
    Either
    1. Restart service in control panel -> Admin tools -> services
      OR
    2. in command prompt:
      net stop mysql
      net start mysql
  9. Run replikwando_service_install.bat
    This will install replikwando as a service and start it up (which does NOT start the initial push immediately)
    If you wish to do an initial push sooner, use the Replikwando Message Interface

Linux Sever

Replikwando on Linux using Wine

  1. Connect to the customer's server using sftp (Filezilla and others support this, and it comes with cygwin and linux)
    Do `put “Replikwando with Wine.tar.gz” .` to put the install files on their server
    You should also put the customer's key and cert over as well (ca-cert.pem is included in the gz)
  2. Connect to the customer's server using SSH/putty
    Extract the files using `tar -zxf “Repikwando with Wine.tar.gz”`
    If that fails, use `gunzip “Replikwando with Wine.tar.gz”`, `tar -xf “Replikwando with Wine.tar”
  3. You will now have two new files in your directory, replikwando_install.sh and ISoft/*
    Type ./replikwando_install.sh
    Depending on the system configuration, several prompts may show up. Just read them and follow what they tell you to do.
    The script will tell you when it is done running.
  4. Navigate to ~/.wine/drive_c/Program\ Files/Replikwando
    This directory will contain the error logs, sqlite file, and so on when Replikwando is started.
    Put in the required values for replication.ini (see above)
  5. Type `vi replication.ini` to edit the replication file`
  6. Type ~/replikwando_startup.sh to start Replikwando for the first time.
    Confirm that Replikwando is running correctly using the error logs here
    Type `vi <filename>` to open the file in an editor to read it. Type :q<enter> to quit.
  7. To connect to the mysql server, type `mysql -utestuser -hlocalhost -p`
    You'll have to type a 'use <database>' command before running queries
  8. Once Replikwando is confirmed running, type `sudo vi /etc/rc.local` and place the following lines just above the last line that says 'exit 0':
    # start replikwando
    sudo -H -u isoft /home/isoft/replikwando_startup.sh
  9. Done!


Quick linux commands:

  • ls : shows you what is in the directory
  • sudo : lets you run powerful & dangerous commands (requires password)
  • cd : change directory
  • rm : deletes a file (use rm -r to delete a folder)
    • deletes cannot be undone!

You can't open Replikwando's UI to see if it's pushing data, so you have to rely on the error logs and test database changes.
All normal Replikwando caveats apply (initial push db lock, query error logs, so on so forth)

Configuring the replication.ini file

Use ITEncrypter Frontend.exe to generate an encrypted username and password (Get it from File::Tech Support)

  1. [FromServer]
    Host
    Database
    Username
    Password
    binlogpath - Should be the path to their MySQL 'data' directory
    mysqlbinpath - Should be the path to their MySQL 'bin' directory
  2. Set Username and Password for [ToDatabase] with same account info setup on Replikwando Records
    Use Frontend to convert pass to hash
    Add "Z" in front of hash
  3. Set database = product code (Company product code can be found in their companyinfo table. If one doesn't exist there, you can create a new one when you create their account.)
  4. [SSL]
    Set path = path to the folder where the SSL Certificates are stored
    Set prefix = everything before -cert
    • Ex. for ABC-Company-cert.pem, prefix=ABC-Company
  5. [Heartbeat]
    Set the Process ID (for heartbeat) to the company's product code
  6. Set use_compression=True if the connection uses the internet, False if it's on the local network (or same machine)

If you have any additional questions, ask Justin.