Import large archives

Archives exported from Codar can be imported to install artifacts or update existing artifacts in Codar. Archives can be imported using the Codar Content Archive Tool, the Codar Console, or the REST API.

The default configuration for importing archives supports an archive up to 2 MB in size. When an archive larger than 2 MB is imported (typically, a catalog), the import operation may hang or take a very long time to complete. If an archive is larger than 2 MB, HPE recommends using the Content Archive Tool and increasing the JVM heap size.

Import large archives using Codar Content Archive Tool

If you want to import an archive larger than 2 MB, HPE recommends using the Content Archive Tool because the tool uses its own JVM heap (it does not share the JVM heap used by Codar). When you reconfigure the JVM heap size for the tool, you do not need to restart Codar and Codar performance is not affected by the import.

To increase the JVM heap size when running the Content Archive Tool, add the
‑Xms<heap_size>M ‑Xmx<heap_size>M options to the command line. For example, to increase the JVM heap size to 3 GB, type:

"CSA_JRE_HOME\bin\java -Xms3072M -Xmx3072M -jar content-archive-tool.jar -i -z catalog_archive.zip

Note By default, the JVM heap size used by the Content Archive Tool is 2 GB. If you want to use a larger JVM heap size, you must always specify the two options listed above when running the Content Archive Tool.

For more information about the Content Archive Tool, see the  Codar Content Archive Tool guide.

Import large archives from Codar Console or through the REST API

If you want to import an archive larger than 1.5 MB, HPE recommends using the Content Archive Tool. If you must use the Codar Console or REST API to import a large archive, you must update the JVM heap size for Codar which requires Codar to be restarted. Also, importing a large archive from the Codar Console or through the REST API may slow the performance of Codar.

To increase the JVM heap size before importing a large archive from the Codar Console or through the REST API, complete the following steps:

  1. If  Codar is running, stop Codar. See Stop Codar.

    To stop Codar on Windows, complete the following steps:

    1. On the server that hosts Codar, navigate to Start > Administrative Tools > Services.

    2. Right-click on the Codar service and select Stop.

    3. Right-click on the Codar Execution Service service and select Stop.

    4. If you installed an embedded Operations Orchestration instance, right-click on the Operations Orchestration Central service and select Stop.

       

    To stop Codar on Linux, complete the following steps:

    1. Type the following command on the server that hosts Codar:

      service codar stop

    2. If you installed an embedded Operations Orchestration instance, as the root user, type:

      <embeddedOOinstallation>/central/bin/central stop.

      For example, type /usr/local/hpe/codar/OO/central/bin/central stop

  2. Increase the JVM heap size for Codar.

    1. Open the CSA_HOME\jboss-as\bin\standalone.conf.bat file in a text editor.

    2. Locate the following line:

      set "JAVA_OPTS=%JAVA_OPTS%$JAVA_OPT -Xms2048M -Xmx2048M -XX:ReservedCodeCacheSize=256M
      -XX:MaxPermSize=256M"

    3. Increase the JVM heap size (by default, the JVM heap size is 1 GB). For example, to change the JVM heap size to 3 GB, change the line to:

      set "JAVA_OPTS=%JAVA_OPTS%$JAVA_OPT -Xms3072M -Xmx3072M -XX:ReservedCodeCacheSize=256M"

    4. Save and close the file.
  3. Start Codar, see Start Codar.

    To start Codar on Windows, complete the following steps:

    1. If you have configured Codar to be FIPS 140-2 compliant, create a Codar encryption keystore password file. The name and location of this file must match the value configured for the keystorePasswordFile property in the CSA_HOME\jboss-as\
      standalone\deployments\csa.war\WEB-INF\classes\csa.properties
      file.

      The password file must contain only the following content: keystorePassword=<Codar encryption keystore password>

      where <Codar encryption keystore password> is the Codar encryption keystore password in clear text.

      This file is automatically deleted when the Codar service is started.

    2. On the server that hosts Codar, navigate to Start > Administrative Tools > Services.

    3. Right-click on the Codar service and select Start.

    4. If you installed an embedded Operations Orchestration instance, right-click on the Operations Orchestration Central service and select Start.

For more information about importing archives from the Codar Console, see the Codar Console Help. For more information about importing archives through the REST API, see the  Codar API Reference guide.