Skip to main content

Add new distribution and new product

Ways to add a new product to an existing distribution

Create distribution folder

cd /var/www/be    
mkdir data/distributions/%distribution-name%

Copy the template:

cp SW/templates/distribution.yaml  ./

Convert the yaml to json:

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

Now we have a json file:

be$ distribution.json

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 "main"."products" ("id", "name", "productName", "version", "majorVersion", "minorVersion", "revisionVersion", "distributionType", "distributionVersion", "description", "currentState", "contact", "technicalContact", "repositoryURL", "technologyProvider", "technologyProviderShortName", "releaseDate", "lastUpdated", "releaseNotes", "knownIssues", "changeLog", "additionalDetails", "installationNotes", "keywords", "apicallback", "documentationLinks", "capabilities", "capability", "targets", "softwareConfigurationLink") VALUES ('958', 'cesnet.rocci-server', 'rocci-server', '2.0.4', '2', '0', '4', 'CMD-ONE', '1.1.0', 'OCCI (the Open Cloud Computing Interface) is a standard defined by the Open Grid Forum, specifying a protocol and API to perform various remote management tasks in clouds. The rOCCI-server extends cloud managers, which are not OCCI-compliant natively, with its own OCCI interface. It is based on the rOCCI (Ruby OCCI) Framework.
', 'deployed', 'parak@cesnet.cz', 'parak@cesnet.cz', 'sw/production/cmd-one/1', 'CESNET', 'CESNET', '2018-11-12 12:34:40', '2018-11-12 12:34:40', 'https://github.com/the-rocci-project/rOCCI-server/releases/tag/v2.0.4', '', 'N/A', '', '', '[]', '', '{"documentationLink":{"link":"https:\/\/wiki.egi.eu\/wiki\/MAN10#EGI_Virtual_Machine_Management","type":"other"}}', '{"capability":{"value":"Client Tools","fullsupport":"yes"}}', '', '{"target":{"platform":"centos7","arch":"x86_64","repositoryURL":"sw\/production\/cmd-one\/1\/centos7\/x86_64\/updates","isnew":"no","ishidden":"no","displayVersion":"","apicallback":"http:\/\/admin-repo.egi.eu\/api\/report\/release\/xml?id=13797"}}', '');

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
php export-products.php
php export-products.php --individual-products