HowTo: Configure A Custom Installer Repository

From SCInterface Wiki

Jump to: navigation, search

The following article describes how to configure a custom installer repository:

Contents

Setup Your Repository

  1. Install a web server (such as Apache). Your UI's web server would be perfect for this.
  2. Copy your .zip, .rar or .tar.gz compressed installer archives to the root of your apache server. You must contact SCInterface Support if you want to get a copy of all of the contents of the SCInterface repository for your servers (licensed customers only).
    1. .zip files - Windows Installations.
    2. .rar files - Windows Installations.
    3. .tar.gz files - Linux Installations.
  3. Make sure that the address of your web server resolves to a DNS address (i.e. myrepository.scinterface.com).
  4. Add a file onto your web server (approximately 200kb) called testfile. It doesn't matter what this file is... SCInterface will just discard it. This file is required so that the SCInterface installer can determine which download repository is the fastest by downloading it and seeing how long it takes to download.

Additional Background Information:

  1. The file name of each compressed installer archives is defined within each SConnector's Installer Path variable. The file extension (i.e. .zip, .rar or .tar.gz) is not needed in the name of the Installer Path.
  2. The installer will automatically choose whatever the fastest repository is with respect to the download speed of the nearest server.
  3. Custom .zip, .rar or .tar.gz compressed installer archives can also be created by creating new SConnectors.

Configuring the Address of the Repository within the SCM Database

  1. Access the console (via SSH is good) of the system that contains the SCM's PostgreSQL database. This is usually on the same system as the SCM.
  2. Login as root.
  3. From the console type:
    su - scmuser
    psql SCM_ServerDB
  4. You should see:
    SCM_ServerDB=>
  5. At the SCM_ServerDB=>, type:
    SELECT * from default_params WHERE paramname='downloadHosts';
  6. You should see something like this returned:
    95 | 0 | 0 | 0 | downloadHosts | http://files1.scinterface.com ...
  7. Now determine whether or not you want your repository to be added to the list of SCInterface's repositories OR if you want only your repository to be listed.
    1. To use your repository http://myrepository.scinterface.com along with SCInterface's repository, run:
      UPDATE default_params SET paramvalue='http://myrepository.scinterface.com http://files1.scinterface.com http://files2.scinterface.com http://files3.scinterface.com http://files4.scinterface.com http://files5.scinterface.com' WHERE paramname='downloadHosts';
    2. To only use your repository http://myrepository.scinterface.com, type:
      UPDATE default_params SET paramvalue='http://myrepository.scinterface.com' WHERE paramname='downloadHosts';
    3. If you wanted to setup multiple http://myrepository.scinterface.com repositories, simply add additional hosts to this query. Remember, each repository must have the files on their web server.
      UPDATE default_params SET paramvalue='http://myrepository1.scinterface.com http://myrepository2.scinterface.com' WHERE paramname='downloadHosts';
    4. If you need to restore to the SCInterface default repositories, run:
      UPDATE default_params SET paramvalue='http://files1.scinterface.com http://files2.scinterface.com http://files3.scinterface.com http://files4.scinterface.com http://files5.scinterface.com' WHERE paramname='downloadHosts';
  8. To confirm that these values are set to what you need, from the SCM_ServerDB=>, type:
    SELECT * from default_params WHERE paramname='downloadHosts';
  9. To quit from psql, from the SCM_ServerDB=>, type:
    \q
  10. Your new repositories are now updated within the SCM's PostgreSQL database.

Required Files on the Repository

Download the following files from the SCInterface master repository:

Required Files

  1. filelist.php
    1. You'll need to get the actual source of the PHP file. Please contact SCInterface support at http://support.scinterface.com for more information
    2. Change the IP addresses restriction at the top of the PHP file to the IP of the server where the PHP file is hosted.

Optional Files

  1. update.sh
    1. SCInterface must add your IP address to it's master update list. Please contact SCInterface support at http://support.scinterface.com for more information
    2. Update the IP address to the new server within update.sh
    3. If you want the respository to stay in sync with SCInterface's master servers, add the call to this file every day or so to 'rsync' to the SCInterface master servers.
  2. file_splitter.sh
    1. This is used to split 2GB or greater files into multiple files since many web servers do not allow greater than 2GB files to be downloaded.

Local Cache Repository

A local cache repository provides cached installers on each SC that has the feature enabled. This feature enable your SCs to download installer (in tarball format in Linux or the RAR file on Windows) once. The installer will also be automatically re-downloaded if the installer is updated on your primary repository. For more information, view the HowTo: Configure a Local Cache Installer Repository.

Personal tools