Populating Database with OS Packages

Open source operating system versions are taken from the official repository mirror or the UForge repository cache. Proprietary operating systems such as RedHat are not; therefore it is the responsibility of the end customer (or reseller if they have correct agreements in place to re-distribute an operating system) to have the original ISO images of the operating system in questions. Refer to Hosting Proprietary Packages.

To enable UForge to generate images based on the operating system it needs all the meta-data of the packages comprising the operating system. This meta-data includes the location in the storage of the package as well as dependency information that is used during generation. Furthermore, certain specific UShareSoft packages must be populated for this operating system.

Note

Custom repositories are supported in UForge. They are treated like other OS packages.

For information specific about Windows, refer to First Installation of Windows.

Note

When installing a major version, all minor versions will be included. If you want to restrict to only a few minor versions, you will have to follow this procedure for each minor version you want to install.

In order to add an operation system in your UForge platform you must:

  1. Create the OS in the organization.
  2. Create the repository. This includes the official repository as well as the specific UShareSoft tool repository.
  3. Link the distribution to the repository.
  4. Launch spider to fill the repository with the packages.

The following is a concrete example to begin the population of CentOS 6.5 32bit:

  1. In order for the following commands to be generic you can set some variables in your environment:

    . /etc/UShareSoft/uforge/uforge.conf
    ADMIN=$UFORGE_WEBSVC_LOGIN ; PASS=$UFORGE_WEBSVC_PASSWORD
    
  2. Run the following CLI command in order to create the distribution:

    uforge org os add --name CentOS --arch i386 --version 6.5 -u $ADMIN -p $PASS
    
  3. Enable the new operating system for the organization. The following command enables CentOS 6.5 32bit in the default organization:

    uforge org os enable --name CentOS --version 6.5 --arch i386 -u $ADMIN -p $PASS
    
  4. Enable the user to use the operating system. The user must be a member of the organization. This step can be done later.:

    uforge user os enable --account root --name CentOS --version 6.5 --arch i386 -u $ADMIN -p $PASS
    
  5. Create the distribution repository. The following example shows the creation of an official Centos repository. However, you can also create a repository based on the UShareSoft official repository as shown later.

    Centos 6.5 repository:

    uforge org repo create --name "CentOS 6.5 os" --repoUrl http://vault.centos.org/6.5/os/i386/ --type RPM --officiallySupported -u $ADMIN -p $PASS
    
    Success: Created repository with url [http://vault.centos.org/6.5/os/i386/] to default organization
    

    The –-name specified here is the “tagname” that will be shown in the UI when creating an appliance. The --repoUrl can be either http:// or file://

    Only use --officiallySupported for distributions that are part of the core distribution. For example, epel or vmwatools are not officially part of the distribution, therefore you should not use the variable --officiallySupported.

    The syntax of the repoURL for Debian based OSes follows that of the sources.list file.

    See https://wiki.debian.org/SourcesList and https://wiki.debian.org/Multiarch/HOWTO (section Setting up apt sources)

    Typically, a correct value for the repoURL parameter is either

    Users may also want to restrict per architecture. For example:

    [arch=amd64] http://distros-repository.usharesoft.com/ubuntu/ ...
    

    http://distros-repository.usharesoft.com/ is an official public repository that users can use to populate the distributions. Official repositories such as Ubuntu and Debian periodically delete some package versions. In the http://distros-repository.usharesoft.com/ repository, package versions are never deleted. This can facilitate investigations on older systems.

    To populate the distribution using the official UShareSoft repository for Centos:

    uforge org repo create --name "CentOS 6.5 os" --repoUrl http://distros-repository.usharesoft.com/centos/6/os/x86_64 --type RPM --officiallySupported -u $ADMIN -p $PASS
    

    The following is a list for all the other distributions:

    Ubuntu (exemple 10.04)

    Debian (exemple version 6)

    CentOS (exemple centOS 6.7)

    OpenSUSE (exemple version 12.2)

    http://distros-repository.usharesoft.com/usharesoft/opensuse/12.2/x86_64

    Scientific (exemple version 6.6)

    http://distros-repository.usharesoft.com/usharesoft/scientificlinux/6.6/x86_64

  6. You must then add the specific UShareSoft tool repository. The repository to attach is one of the following:

    For example:

    uforge org repo create --name "CentOS 6.5 os" --repoUrl http://distros-repository.usharesoft.com/usharesoft/centos/6/x86_64 --type RPM -u $ADMIN -p $PASS
    
  7. Attach repository to the distribution as follows:

    uforge org repo os attach --name CentOS --arch i386 --version 6.5 --repoIds 354 -u $ADMIN -p $PASS
    
  8. Populate repository packages:

    /opt/UShareSoft/uforge/cron/update_repos_pkgs.sh
    
    Note: This procedure may take a long time.
    
  9. To verify if the procedure is terminated, run the following command:

    tail -f /tmp/USER_DATA/FactoryContainer/logs/repos/spider/<directory name with date>/spider.stdout
    
    Note: The procedure is terminated when you see the line: INFO  CheckForRepositoriesUpdates:275 - Entering CheckForRepositoriesUpdates->terminate()
    
  10. Create OS profile based on packages (minimal, server, etc.):

    /opt/UShareSoft/uforge/bin/runjob.py sorter_low_prio -d CentOS -v 6.5 -a i386
    
  11. Populate the UShareSoft packages for the new operating system:

    ARCHS=i386 DEBUG=y COS_VERS=6.5 /opt/UShareSoft/uforge/bin/exec_uploads.sh -w UssPkgs -p <uforge port> -U $ADMIN -P $PASS /tmp/DISTROS/USS/usspkgs