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:
- Product
- Distribution product data
Commands...
Examples:cat create_table.sql |sqlite3 db/egi-repos-fe-test.db
sqlite3 db/egi-repos-fe-test.db ".read insert_data.sql"
sqlite3 db/egi-repos-fe-test.db "select MAX(f1) from tbl2;" ".exit" sqlite3 db/egi-repos-fe-test.db "INSERT INTO tbl2 ('f1','f2','f3') VALUES('001','teste','ttttt');" ".exit"
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 } ] }