Official UForge Tool Repositories

The following is a list for all the distributions that can be used to create an official repository. These will be used in step 6 of the examples below.

Ubuntu (example 10.04)

Debian (example version 6)

CentOS (example CentOS 6.7)

OpenSUSE (example version 12.2)

Scientific Linux (example version 6.6)

RedHat Enterprise Linux

  • You need to use your own repository.

Specific UForge Tool Repositories

The following is a list of specific UForge tool repositories that can be added. These will be used in step 7 of the examples below.

CentOS (example version 6, arch x86_64):

Red Hat Enterprise Linux (example version 6.2, arch x86_64):

Oracle Linux (example version 6, arch x86_64)

OpenSUSE (example version 12.1, arch x86_64):

Scientific Linux (example version 6, arch x86_64):

Debian (example version 8, arch x86_64) [arch=amd64]:

Ubuntu (example version 14.04, arch x86_64) [arch=amd64]:

Adding RPM Type OSes Using CLI

The following sections give examples for adding CentOS and RedHat Enterprise Linux using the CLI. They can be adjusted for your particular version, and are applicable to OpenSUSE and Scientific Linux.

Example for Adding CentOS

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

  1. Connect to UForge:

    $ ssh root@<your UForge instance>
    
  2. 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
    
  3. Run the following CLI command in order to create the distribution:

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

    $ uforge org os enable --name CentOS --version 6.5 --arch x86_64 -u $ADMIN -p $PASS
    
  5. 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 x86_64 -u $ADMIN -p $PASS
    
  6. 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 UForge official repository as shown later.

    For example, for the CentOS 6.5 repository:

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

    The --name specified does not need to be an official name. It is the repository name that will be shown in the UI when pinning an appliance. The --repoUrl can be either http:// or file://.

    Warning

    You must use the --coreRepository flag for all the default repositories of officially supported OSes (for a list of supported OSes, refer to :ref: uforge-supported-os-formats). Do not use --coreRepository for repositories that are not part of the core distribution, such as epel or VMware tools. When generating a machine image, packages tagged as --coreRepository are installed first, before other packages.

    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.

  7. You must then add the specific UForge tool repository. The repository to attach for CentOS (example version 6, arch x86_64) is 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
    

Note

For a complete list of the different repositories that can be attached, refer to Specific UForge Tool Repositories.

  1. Attach repository to the distribution as follows for each repository (your own repository and the UShareSoft tool repository):

    $ uforge org repo os attach --name CentOS --arch x86_64 --version 6.5 --repoIds 354 -u $ADMIN -p $PASS
    

    The --repoIds specified here are the space-separated “id” of previously created repositories, shown by command uforge org repo list -u $ADMIN -p $PASS.

  2. Populate repository packages:

    $ /opt/UShareSoft/uforge/cron/update_repos_pkgs.sh
    

    Note

    This procedure may take a long time.

  3. 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
    

    The procedure is complete when you see the line INFO ends with Entering CheckForRepositoriesUpdates->terminate()

  4. Create OS profile based on packages (minimal, server, etc.):

    $ /opt/UShareSoft/uforge/bin/distro_sorter.sh -d CentOS -v 6.5 -a x86_64
    

Example for Adding Red Hat Enterprise Linux

Note

Before populating Red Hat Enterprise Linux, you should complete the steps in Hosting Proprietary Packages, unless you have a Red Hat Satellite, in which case you should contact your Red Hat Satellite administrator for the Satellite repo URL.

The following is a concrete example to begin the population of Red Hat Enterprise Linux version 7, 64bit:

  1. Connect to UForge:

    $ ssh root@<your UForge instance>
    
  2. 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
    
  3. Run the following CLI command in order to create the distribution:

    $ uforge org os add --name "RedHat Enterprise Linux" --arch x86_64 --version 7 -u $ADMIN -p $PASS
    
  4. Enable the new operating system for the organization. The following command enables Red Hat Enterprise Linux version 7 in the default organization:

    $ uforge org os enable --name "RedHat Enterprise Linux" --arch x86_64 --version 7 -u $ADMIN -p $PASS
    
  5. 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 "RedHat Enterprise Linux" --arch x86_64 --version 7 -u $ADMIN -p $PASS
    
  6. Create the distribution repository. The following example shows the creation of an official RedHat Enterprise Linux repository.

    $ uforge org repo create --name "RedHat 7" --repoUrl http://<your-repo> --type RPM --coreRepository -u $ADMIN -p $PASS
    

    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://.

    Warning

    You must use the --coreRepository flag for all officially supported OSes. If you do not include this argument the packages will not appear in the install profile of appliances built with the corresponding operating system. Do not use --coreRepository 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 --coreRepository when adding such repositories.

  7. You must then add the specific UForge tool repository. The repository to attach for RedHat Enterprise Linux version 7 arch x86_64 is the following:

    For example:

    $ uforge org repo create --name "UShareSoft RedHat 7" --repoUrl http://distros-repository.usharesoft.com/usharesoft/rhel/7/x86_64/ --type RPM -u $ADMIN -p $PASS
    

Note

For a complete list of the different repositories that can be attached, refer to Specific UForge Tool Repositories.

  1. Attach repository to the distribution as follows for each repository (your own repository and the UShareSoft tool repository):

    $ uforge org repo os attach --name "RedHat Enterprise Linux" --arch x86_64 --version 7 --repoIds 432 -u $ADMIN -p $PASS
    

    The --repoIds specified here are the space-separated “id” of previously created repositories, shown by command uforge org repo list -u $ADMIN -p $PASS.

  2. Populate repository packages:

    $ /opt/UShareSoft/uforge/cron/update_repos_pkgs.sh
    

    Note

    This procedure may take a long time.

  3. 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
    

    The procedure is complete when you see the line INFO ends with Entering CheckForRepositoriesUpdates->terminate()

  4. Create OS profile based on packages (minimal, server, etc.):

    $ /opt/UShareSoft/uforge/bin/distro_sorter.sh -d RedHat -v 7 -a x86_64
    

Adding DEB Type OSes Using CLI

The following section give a CLI example for adding Ubuntu. It is also applicable for Debian.

Example for Adding Ubuntu

The following is a concrete example to begin the population of Ubuntu 10.04 64bit:

  1. Connect to UForge:

    $ ssh root@<your UForge instance>
    
  2. 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
    
  3. Run the following CLI command in order to create the distribution:

    $ uforge org os add --name Ubuntu --arch x86_64 --version 10.04 -u $ADMIN -p $PASS
    
  4. Enable the new operating system for the organization. The following command enables Ubuntu 10.04 in the default organization:

    $ uforge org os enable --name Unbuntu --version 10.04 --arch x86_64 -u $ADMIN -p $PASS
    
  5. 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 Unbuntu --version 10.04 --arch x86_64 -u $ADMIN -p $PASS
    
  6. Create the distribution repository. The following example shows the creation of an official Ubuntu repository.

    $ uforge org repo create --name "Ubuntu x86_64 lucid-main" --repoUrl "[arch=amd64] http://distros-repository.usharesoft.com/ubuntu/lucid/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/ lucid multiverse restricted universe main" --type DEB --coreRepository -u $ADMIN -p $PASS
    
    $ uforge org repo create --name "Ubuntu x86_64 lucid-security" --repoUrl "[arch=amd64] http://distros-repository.usharesoft.com/ubuntu/lucid-security/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/ lucid-security multiverse restricted universe main" --type DEB --coreRepository -u $ADMIN -p $PASS
    
    $ uforge org repo create --name "Ubuntu x86_64 lucid-backports" --repoUrl "[arch=amd64] http://distros-repository.usharesoft.com/ubuntu/lucid-backports/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/ lucid-backports multiverse restricted universe main" --type DEB --coreRepository -u $ADMIN -p $PASS
    
    $ uforge org repo create --name "Ubuntu x86_64 lucid-updates" --repoUrl "[arch=amd64] http://distros-repository.usharesoft.com/ubuntu/lucid-updates/mirror/bouyguestelecom.ubuntu.lafibre.info/ubuntu/ lucid-updates multiverse restricted universe main" --type DEB --coreRepository -u $ADMIN -p $PASS
    

    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://.

    Warning

    You must use the --coreRepository flag for all officially supported OSes. If you do not include this argument the packages will not appear in the install profile of appliances built with the corresponding operating system. Do not use --coreRepository 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 --coreRepository when adding such repositories.

    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.

  7. You must then add the specific UForge tool repository. The repository to attach for Ubuntu (example version 6, arch x86_64) is the following:

    For example:

    $ uforge org repo create --name "UShareSoft Ubuntu x86_64 lucid" --repoUrl "[arch=amd64] http://distros-repository.usharesoft.com/usharesoft/ubuntu/ lucid main" --type DEB -u $ADMIN -p $PASS
    

Note

For a complete list of the different repositories that can be attached, refer to Specific UForge Tool Repositories.

  1. Attach repository to the distribution as follows for each repository (your own repository and the UShareSoft tool repository):

    $ uforge org repo os attach --name Ubuntu --arch x86_64 --version 10.04 --repoIds 354 -u $ADMIN -p $PASS
    

    The --repoIds specified here are the space-separated “id” of previously created repositories, shown by command uforge org repo list -u $ADMIN -p $PASS.

  2. Populate repository packages:

    $ /opt/UShareSoft/uforge/cron/update_repos_pkgs.sh
    

    Note

    This procedure may take a long time.

  3. To verify if the procedure is finished, run the following command:

    $ tail -f /tmp/USER_DATA/FactoryContainer/logs/repos/spider/<directory name with date>/spider.stdout
    

    The procedure is done when you see the line INFO ends with Entering CheckForRepositoriesUpdates->terminate()

  4. Create OS profile based on packages (minimal, server, etc.):

    $ /opt/UShareSoft/uforge/bin/distro_sorter.sh -d Ubuntu -v 10.04 -a x86_64