Skip to main content

Build Content Bundle

Content bundles are archives of all the required container images required for one or more cluster profiles. The content bundle includes Helm charts, Packs, and manifest files needed to deploy your Edge host cluster. In addition to core container images, the content bundle can include artifacts from your applications that you wish to deploy to the Edge cluster. Cluster Profiles are the primary source for building these content bundles.

warning

Currently, the content bundles include Helm charts and Packs. However, keep in mind that the container images of the Helm Charts and Packs are extracted and pre-deployed into the container runtime containerd for optimization.

The diagram below displays the overarching steps to build the Edge installer ISO using a content bundle. The diagram also highlights the primary prerequisites to create a content bundle.

An overarching diagram displaying the workflow in the current guide.

Benefits of Content Bundle

Creating a content bundle provides several benefits that may address common use cases related to deploying Edge hosts.

  • Preloading required software dependencies removes the need to download assets during cluster deployment.

  • If connectivity to a container registry is unstable or bandwidth limited, preloading the software dependencies can address these concerns.

  • Preloading required software dependencies optimizes the Edge host deployment process when the Edge host is in an internet bandwidth-constrained environment.

  • Organizations that want better control over the software used by their Edge hosts can use content bundles to ensure that only approved software is consumed.

Prerequisites

  • Linux Machine (Physical or VM) with an AMD64 architecture.

  • Palette API key. Refer to the User Authentication resource to learn how to create a Palette API key.

  • An Edge Native cluster profile. Refer to Create Edge Native Cluster Profile guide to learn how to create an Edge Native cluster profile. You may also have other add-on profiles that you wish to attach to your cluster.

  • Content tags in your profiles highlight the exact location of container images to be downloaded.

Create Content Bundle

  1. Download Palette Edge Content CLI and assign the executable bit to the CLI.

    VERSION=4.3.0
    wget https://software.spectrocloud.com/stylus/v$VERSION/cli/linux/palette-edge
    chmod +x palette-edge
  2. Use the following command to move the palette-edge binary to the /usr/local/bin directory to make the binary available in your system $PATH. This will allow you to issue the palette-edge command from any directory in your development environment.

    mv palette-edge /usr/local/bin
  3. Verify the installation of the Palette Edge CLI by issuing the following command. The output will display a list of available commands and flags for the CLI.

    palette-edge --help
     Usage:
    palette-edge-cli [command]

    Available Commands:
    build Build the content
    build-from-local
    deploy
    help Help about any command
    show Display all the preset default values and supported OS and K8S flavors
    upload

    Flags:
    --config string config file (default is $HOME/.palette-edge-cli.yaml)
    --debug set to enable debug logging [default: false]
    -h, --help help for palette-edge-cli
    --logfile string log file name
    --trace set to enable trace logging [default: false]

    Use "palette-edge-cli [command] --help" for more information about a command.
  4. Log in to Palette.

  5. Select the project you want to deploy the Edge host to and copy down the Project ID. You can find the project id at the top right side corner of the landing page below the User drop-down Menu.

  6. Navigate to the left Main Menu and select Profiles.

  7. Use the Cloud Types drop-down Menu and select Edge Native.

  8. Click on the cluster profile you want to include in the content bundle.

  9. You can find the cluster profile ID by reviewing the URL of the current page. The cluster profile ID is the last value in the URL. Refer to the Project page for details. Repeat this step for all the cluster profiles you want to specify in the content bundle.

    https://console.spectrocloud.com/projects/yourProjectId/profiles/cluster/<YourClusterProfileHere>
  10. (Optional) If your cluster profile uses images or helm charts that are hosted on private registries that require authentication, you must provide a JSON file that contains the necessary credentials to access the registry.

    For authenticated access to Helm charts, your must provide credentials with the following schema. Use a key at the root level of the JSON object named "helm" and set its value to a list. The list is a list of credentials for each Helm chart repository. For each set of credentials, use an object in the list with the keys "endpoint", "username", and "password".

    {
    "helm": [
    {
    "endpoint": <Registry URL>,
    "username": <Registry username>,
    "password": <Password>
    }
    ]
    }

    For example, the following JSON code is a valid set of credentials.

    {
    "helm": [
    {
    "endpoint": "harbor.abcd.com",
    "username": "admin",
    "password": "xxxxxxxx"
    }
    ]
    }

    After creating the file, use the -cred-file-path filepath flag to include the credentials in the command.

  11. Navigate back to your terminal window and issue the following command to create the content bundle. Replace the placeholder values with your actual values.

    ./palette-edge build --api-key <API_KEY> \
    --project-id <PROJECT_ID> \
    --cluster-profile-ids <CLUSTER_PROFILE_ID1,CLUSTER_PROFILE_ID2...> \
    --palette-endpoint <PALETTE_API_ENDPOINT> \
    --outfile <BUNDLE_NAME> \
    --cred-file-path <FILE_PATH> \
    --include-palette-content
    FlagDescription
    --api-keyYour Palette API key.
    --cluster-profile-idsComma-separated list of cluster profile IDs to download content for.
    --cred-file-pathPath to the JSON file storing registry credentials if you are using a private registry.
    --include-palette-contentWhether to include content necessary for Palette itself. Required for airgap installations.
    --outfileName of your content bundle. The final file name should have the following pattern: core-<bundle-name>-random-string.
    --palette-endpointAPI endpoint for your Palette instance.
    --project-idThe ID of your Palette project.

    The result is a content bundle that you can use to preload into your installer. The content bundle will be a zst file in a folder that starts with content- followed by a random string. For more information about how to use a content bundles, Build Installer ISO or Upload Content Bundle through Local UI.

    Alternatively, you can use the ISO version of the content bundle and transfer it to a USB drive to be used separately at the time of Edge host installation using the -iso flag in your build command. Doing so will override the file extension you provide using the --outfile flag.

  12. (Optional) You can download the cluster definition and the content bundle in a single step. A cluster definition contains one or more cluster profiles, including the profile variables used in the profiles. In air-gapped Edge deployments, cluster definitions are required to provision a cluster from local UI. For more information, refer to Create a Cluster with Local UI.

    To download the cluster definition together with content bundle, provide the following flags to the build command.

     ./palette-edge build --api-key <API_KEY> \
    --project-id <PROJECT_ID> \
    --cluster-profile-ids <CLUSTER_PROFILE_ID1,CLUSTER_PROFILE_ID2...> \
    --palette-endpoint <PALETTE_API_ENDPOINT> \
    --outfile <BUNDLE_NAME> \
    --cred-file-path <FILE_PATH> \
    --include-palette-content \
    --cluster-definition-name <CLUSTER_DEFINITION_FILENAME> \
    --cluster-definition-profile-ids <CLUSTER_PROFILE_IDS>

    Compared with the previous command, this command has two additional flags.

    FlagDescription
    --cluster-definition-nameFilename of the cluster definition tgz file.
    --cluster-definition-profile-idsList of cluster profile IDs to be included in the cluster definition.

    This command will produce another document named CLUSTER_DEFINITION_FILENAME.tgz at the root directory of CanvOS. This is the cluster definition file. Your content bundle will not be affected by the additional flags and will still be at the same location.

Validate

You can validate that the ISO image has not been corrupted by attempting to flash a bootable device. Most software that creates a bootable device will validate the ISO image before the flash process.

Next Steps

Your next step is to build the Edge artifacts so that you can deploy an Edge host. To create an Edge artifacts, check out the Build Images guide.