Skip to main content
Jump to: navigation, search

BaSyx / Download / Components Setup

< BaSyx ‎ | Download
Revision as of 07:49, 23 October 2019 by (Talk | contribs) (Corrected "test file" to "text file")

How to run the BaSyx Components

The Components package requires an SQL backend to be able to run the DirectorySQLProvider. This backend can for example be provided by postgreSQL.

During installation of the SQL backend, choose the following credentials:

user: postgres

password: admin

To setup the database for the test cases, open up a console and use the following commands:

Create configuration directory:

initdb -D "<db-path>" -U <username>

Where <db-path> is a path to a directory you have the right to write to, and <username> would be "postgres". Now you start the database with

pg_ctl -D "<db-path>" start

Save the following commands to an arbitrary text file. Next, import the database through psql -U postgres -f "<your-file>".

CREATE DATABASE "basyx-map";

\c basyx-map


CREATE DATABASE "basyx-directory";

\c basyx-directory

CREATE SCHEMA directory;

CREATE TABLE ( "ElementRef" varchar(999999), "ElementID" varchar(999999) primary key );

INSERT INTO ( "ElementID", "ElementRef" ) VALUES ( 'urn:de.FHG:es.iese:aas:0.98:5:lab/microscope#A-19', 'content.aas1' );

INSERT INTO ( "ElementID", "ElementRef" ) VALUES ( 'urn:de.FHG:es.iese:aas:0.98:5:lab/microscope#A-18', 'content.aas2' );

INSERT INTO ( "ElementID", "ElementRef" ) VALUES ( 'urn:de.FHG:es.iese:aas:0.98:5:lab/microscope#A-17', 'content.aas3' );

INSERT INTO ( "ElementID", "ElementRef" ) VALUES ( 'urn:de.FHG:es.iese:aas:0.98:5:lab/microscope#A-16', 'content.aas4' );

INSERT INTO ( "ElementID", "ElementRef" ) VALUES ( 'urn:de.FHG:es.iese:aas:0.98:5:lab/microscope#A-15', 'content.aas5' );

Back to the top