Skip to content

StuPro-TOSCAna/stupro_toscana_vorprojekt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StuPro TOSCAna preliminary design study

Build Status Codacy Badge codecov

Table of Contents

Introduction

Open repository for the preliminary design study for TOSCAna.

This is the repository for the preliminary design study for the study project TOSCAna. The project consists of the following two subprojects:

TOSCA2vSphere

TOSCA2vSphere is a command line tool developed in the preliminary design study for the study project TOSCAna. The purpose of this tool is to deploy a TOSCAlite model as it is definend in the corresponding archive.

TOSCAlite

TOSCAlite is a very lightweight version of the OASIS TOSCA standard. It can be used to model a deployment based on Linux systems (mostly Ubuntu 16.04 LTS). You can read more about TOSCAlite in its documentation here.

Project structure

Obtaining TOSCA2vSphere

Prebuilt package

Download a prebuilt package here.

Build from source

Steps to build TOSCA2vSphere from sources:

  1. Clone the project.

    git clone https://github.com/nfode/stupro_toscana_vorprojekt.git

  2. Enter the project root directory.

    cd stupro_toscana_vorprojekt

  3. Build the project with:

    mvn package

  4. You can find the generated jar file in the target folder.

Usage

How to use TOSCA2vSphere:

  1. Start TOSCA2vSphere with:

    java -jar de.toscana.transformator-1.0-SNAPSHOT.jar model.zip

    Replace model.zip with the file you want to open.

    IMPORTANT: The topology described in the model.xml of the .zip archive has to match the requirements described in the TOSCAlite specification.

  2. If parsing the file was successful you can now use the CLI:

    1. You can create everything needed to run your model if you enter:

      create

    2. if the model was created you can start it with:

      start

    3. and finally there is the possibility to stop it with:

      stop

    It is mandatory that create has to be called before start and start has to be called before stop. If not, there will be an error.

Debugging

For more verbose output of the target machines, it is possible to change the log level from INFO to DEBUG.

Therefore, open file src/main/resources/log4j.properties and change the line 'log4j.rootLogger=INFO, A1' to 'log4j.rootLogger=DEBUG, A1'

Tools

Tools that are used in this project.

Util scripts

In the folder util you can find util scripts for operating systems with bash.

  • utils/build_with_test - builds with tests
  • utils/build_without_test - builds without tests for test purposes
  • utils/run_with_example_phpapp - starts the CLI with the example php app

IntelliJ

In the folder doc/config/IntelliJ you can find a class template named Class.java. This template adds automatically everything you need for logging to the header when you create a new class. If you want to use this file, copy it to the folder .idea/fileTemplates/internal/Class.java.