Creating Component Assets

Component assets are developed by you and other CONS3RT users, and imported into CONS3RT for use in your Systems. The three categories of Component Assets are:

  • Software Assets
  • Source Code Assets
  • Test Case Assets

There are 2 options for creating component assets:

  1. Use the Software Asset Builder. You can use this method for software application and source code assets.
  2. Create and import and asset zip file. This method is described below and can be used for all component asset types, including test cases.

Create an Asset Zip File

  1. Create your asset with the files and directory structure as shown below for each type
  2. Zip the contents of the asset directory. NOTE: Do not include the top-level directory in the zip file. Be sure to highlight the asset contents for zipping.
  3. Import it into CONS3RT using these instructions

Asset Directory Structure

Each component asset type has this required directory structure, not all items are required for each asset type. Some specific types of assets have additional required files, please see the examples on Github listed below.

  • Required items are shown with: *
  • The asset.properties file contains basic information about the asset including name, description, and metadata, click here for a sample.
  • At least one script in the scripts directory must exist, and specified in the asset.properties file by the installScript property
  • The primary install script can use any language executable by on the OS (e.g. if you want to use Python, ensure it is installed and configured first)
  • README and LICENSE files are only required if specified in the asset.properties file with the licenseFile and documentationFile properties
ASSET_DIR/
    asset.properties*
    README
    LICENSE
    scripts/*
        install.sh, install.py or install.ps1*
        checkout.sh
        build.sh
        deploy.sh
        additional_scripts
    media/
        media_files
    config/
        config_files

Software Application Assets

Most assets fall into this category. Software application assets are extremely flexible and can be used to install software applications, perform OS configuration, enforce STIG rules, apply firewalls, load data, execute Puppet manifests, Chef cookbooks, Ansible playbooks, or Salt stacks.

ASSET_DIR/
    asset.properties*
    README
    LICENSE
    scripts/*
        install.sh, install.py or install.ps1*
        additional_scripts
    media/
        media_files

Sample Software Application Assets:

Media File Assets

Assets are the easiest way to copy files to your VMs. You can upload media files up to 3GB in size as assets, and have the files automatically copied to your VM while the VM is provisioning. Use the following Github examples and follow the instructions to create assets that simply copy files to your machines for you:

Source Code Assets

Source code assets are useful if you need to checkout or clone source code from a remote source code repository, especial from DI2E or Software Forge. These assets include 3 additional required scripts in the scripts directory, these scripts execute on the CONS3RT Sourcebuilder Service (not your system), so they must be shell scripts:

  • The checkout script checkout.sh checks out or clones source code from your source code repository
  • The build script build.sh performs a Maven/Ant build of your source code
  • The deploy script deploy.sh assembles build artifacts into the media directory of the software asset, ready for installation on your system
ASSET_DIR/
    asset.properties*
    README
    LICENSE
    scripts/*
        install.sh, install.py or install.ps1*
        checkout.sh*
        build.sh*
        deploy.sh*
        additional_scripts
    media/
        media_files

A sample Source Code Asset:

Test Case Assets

Each test tool has a slightly different set of files required for a test asset. See the samples below for specific example assets for each test tool type.

ASSET_DIR/
    asset.properties*
    README
    LICENSE
    scripts/
        tool_specific_scripts
    media/
        media_files
    config/
        tool_specific_config_files

Sample Test Case Assets: