Add new distribution

Ways to add a new distribution (Work in progress)

cd /var/www/be

Create distribution folder:

mkdir data/distributions/%distribution-name%

Use/Copy the template:

cp SW/templates/distribution.yaml  ./

Convert the yaml to json: (need to have node.js installed)

yaml2json distribution.yaml (this will create a distribution.json file in the same dir)

Now we have a json file:

distribution.json

Rename it to the distribution-name:

mv distribution.json %distribution-version%.json
mv %distribution-version%.json data/distributions/%distribution-name%/

1st approach - using the Database (DB)

Add the data manually to the DB:


INSERT INTO `distributions`(
            distributionType, distributionVersion, currentState,
            majorVersion, minorVersion, revisionVersion,
            releaseDate, created,
            lastUpdated, description,
            repositoryURL, releaseNotes,
            additionalDetails, installationNotes,
            contact, technicalContact,
            knownIssues, changeLog
            ) 
VALUES ('','','','','','','','','','','','','','','','','','');

Export/prepare all the data from DB (replacing the data in data/*)

$ export-full-dataset.sh

...................................................
php export-distributions.php
php export-distributions.php --individual-distributions (Each distribution) php export-products.php
php export-products.php --individual-products (Each product)


2nd approach - add the data manually to the json files

Manually add distribution

add distribution data (to the software distributions catalog):
data/software-distributions.json (item[] array)
ex. of distribution item: (DON'T FORGET TO ADD A COMMA , BEFORE THE BRACKETS)

,
{
  "distributionType": "",
  "distributionVersion": "%version%0.0.0",
  "currentState": "deployed",  
  "releaseDate": "",
  "description": "",
  "products": [ 
        {
          "name": "product-name",
          "version": "0.0.0",
          "capabilities": ["Client Tools"],
          "status": 1
        }
     ]
}

Revision #27
Created 14 December 2022 13:43:28 by Carlos A. Manuel
Updated 14 December 2022 19:08:52 by Carlos A. Manuel