View on GitHub

Bacon @ Red Hat

CLI for ProjectNCL

Overview

Bacon is a new Java CLI for ProjectNCL 2.0 combining features of the older PNC CLI, DependencyAnalysis CLI and PiG tooling.

PiG (Product Files Generator) was introduced to automate the steps that don’t require human intervention. It provides tracking through holding the configuration within a YAML file stored within a git repository. This simplified the productisation process and by automating it, the process was made repeatable and less error prone. The process to create a product itself is complex with multiple steps involved - for instance configuring PNC entities (products/projects/build configurations), creating a maven repository, gathering licenses etc.

The PiG capabilities that have been merged into Bacon are:

On top of the above, if needed, product-specific add-ons can be easily added and configured from the same configuration file. Add-ons have access to information about the performed builds, artifacts they created and consumed, can access the repository zip, etc. One example of an add-on is Quarkus community dependency analysis add-on that checks for runtime community dependencies and provides information on possible ways of eliminating them.

Release Notes

For a list of changes please see here

Installation and Usage

Compile:

mvn clean install

Run after compilation:

java -jar cli/target/bacon.jar

Java JDK 11 is the supported runtime. If you are installing Bacon on MacOs, please read the pre-requiste section. If you are running PNC internally with a company-signed TLS certificate, please read the TLS certificate section

To install the latest released version:

curl -fsSL https://raw.github.com/project-ncl/bacon/main/bacon_install.py | python3 -

To install a specific released version:

curl -fsSL https://raw.github.com/project-ncl/bacon/main/bacon_install.py | python3 - 2.0.1

To install the latest snapshot (no need to compile):

curl -fsSL https://raw.github.com/project-ncl/bacon/main/bacon_install.py | python3 - snapshot

This will install the bacon, pig, da and pnc commands in the ~/bin directory, which on Linux will make it available in your shell.

To update the installed version:

# latest released version
bacon update

# specifc released version
bacon update 2.0.1

# snapshot version
bacon update snapshot

Pre-requisite for MacOs

  1. Ensure ~/bin is added to your shell’s $PATH, unlike Fedora this is not added by default. Depending on which shell you run you can add it by running:
# ZSH (Default as of macOs 10.15 Catalina)
echo 'export PATH="$PATH:${HOME}/bin"' >> ~/.zshrc

# BASH
echo 'export PATH="$PATH:${HOME}/bin"' >> ~/.bash_profile
  1. Ensure Python 3 is installed, this can be achieved using homebrew by running:
    brew install python3
    

TLS Certificate

If PNC is deployed internally using a company-signed TLS certificate, The Java JDK will complain about using an untrusted certificate. We need to add the public key of the certificate to the Java truststore. There are a few ways to remedy this:

Feature Guide

Below are links to more specific information about configuring sets of features in PME: