Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Requirements

  • Maven 3

  • Java 17

  • Docker and Docker Compose

  • The Code, which can be cloned here

Building

Once the code is cloned and requirements installed you should be able to start building TEIV and its components.

To build TEIV and its components with tests run the following command in the first /teiv directory:

Code Block
languagenone
mvn clean install

Building with tests should create the following docker images:

  • o-ran-sc/smo-teiv-ingestion:latest

  • o-ran-sc/smo-teiv-exposure :latest

To build without tests run the following command in the first /teiv directory (significantly faster). Do this with custom YANG:

Code Block
mvn clean install -Dmaven.test.skip=true

Building without tests should create the following docker images:

  • o-ran-sc/smo-teiv-ingestion:latest

  • o-ran-sc/smo-teiv-exposure:latest

Running

To run TEIV only TEIV is needed, but pgsql-schema-generator is provided to generate PostgresSQL schemes from the YANG models which can be used in TEIV.

...

Running

To run TEIV with your models pgsql-schema-generator is provided to generate PostgresSQL schemes from the YANG models which can be used in TEIV.

pgsql-schema-generator

NB: must build pgsql-schema-generator to run it. Follow Release J - Build to build. If successful the files highlighted in green/yellow should be present.

The default sql scripts in /docker-compose/sql_scripts were built from TEIVs default yang models provided in /teiv/teiv/src/main/resources/models using the pgsql-schema-generator.

To run pgsql-schema-generator yourself, using the default YANG models or your own YANG models, copy YANG models into the /teiv/pgsql-schema-generator/src/main/resources/generate-defaults directory and from /teiv/pgsql-schema-generator/ run:

Code Block
mvn exec:java -Dexec.mainClass="org.oran.smo.teiv.pgsqlgenerator.DatabaseSchemaGeneratorApplication"

Once run successfully the sql schemas should be present in /teiv/pgsql-schema-generator/target (highlighted in red below) and graphs representing the entities and relationships of the YANG models in /teiv/pgsql-schema-generator/target/graphs (highlighted in blue below):

...

TEIV

If using you own YANG models there is a script in /teiv/docker-compose, copySqlSchemaFromPgsqlGenerator.sh, that will copy the generated sql schemes to /teiv/docker-compose/sql_scripts, rename them, and replace the placeholders. Run the script from /teiv/docker-compose.

NB: if you are generating your own sql schemes with different YANG models, compared to the default YANG, the example events will not work, therefore kafka-producer must be commented out in the docker-compose.yml or you can replace the example events with your own data

In the /teiv/docker-compose directory run the following code to bring TEIV up:

...

  • kafka-producer confluentinc/cp-kafka:7.6.1 (optional - automatically populates TEIV)

  • kafka confluentinc/cp-kafka:7.6.1

  • kafka2 confluentinc/cp-kafka:7.6.1

  • kafka3 confluentinc/cp-kafka:7.6.1

  • topology-ingestion-inventory o-ran-sc/smo-teiv-ingestion:latest

  • topology-exposure-inventory o-ran-sc/smo-teiv-exposure:latest

  • zookeeper confluentinc/cp-zookeeper:6.2.1

  • dbpostgresql postgis/postgis:13-3.4-alpine

...

In docker-compose.yml there is an optional kafka-producer service which will automatically run the cloudEventProducerForDockerCompose script to populate TEIV. Can comment out if this is not desired.

pgsql-schema-generator

The default sql scripts in sql_scripts were built from TEIVs default yang models provided in /teiv/teiv/src/main/resources/models using the pgsql-schema-generator.

To run pgsql-schema-generator yourself, using the default YANG models or your own YANG models, copy YANG models into the /teiv/pgsql-schema-generator/src/main/resources/generate-defaults directory and from /teiv/pgsql-schema-generator/ run:

Code Block
mvn exec:java -Dexec.mainClass="org.oran.smo.teiv.pgsqlgenerator.DatabaseSchemaGeneratorApplication"

Once run successfully the sql schemas should be present in /teiv/pgsql-schema-generator/target (highlighted in red below) and graphs representing the entities and relationships of the YANG models in /teiv/pgsql-schema-generator/target/graphs (highlighted in blue below):

...

There is a script in /teiv/docker-compose, copySqlSchemaFromPgsqlGenerator.sh that will copy the generated sql schemes to /teiv/docker-compose/sql_scripts, rename them, and replace the placeholders.

...

Building

Once the code is cloned and requirements installed you should be able to start building TEIV and its components.

To build TEIV and its components with tests run the following command in the first /teiv directory:

Code Block
languagenone
mvn clean install

Building with tests should create the following docker images:

  • o-ran-sc/smo-teiv-ingestion:latest

  • o-ran-sc/smo-teiv-exposure :latest

To build without tests run the following command in the first /teiv directory (significantly faster). Do this with custom YANG:

Code Block
mvn clean install -Dmaven.test.skip=true

Building without tests should create the following docker images:

  • o-ran-sc/smo-teiv-ingestion:latest

  • o-ran-sc/smo-teiv-exposure:latest