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 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 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.
doc/
- Documentationutils/
- Scripts that help building and running the appphpapp/
- Example php appexample_models/
- Example TOSCAlite conform modelssrc/main/java/
- Java source codesrc/main/resources/
- Resources needed for the program, f.ex. logger propertiessrc/test/java/
- Java testssrc/test/resources/
- Resources needed to test
Download a prebuilt package here.
Steps to build TOSCA2vSphere from sources:
-
Clone the project.
git clone https://github.com/nfode/stupro_toscana_vorprojekt.git
-
Enter the project root directory.
cd stupro_toscana_vorprojekt
-
Build the project with:
mvn package
-
You can find the generated jar file in the target folder.
How to use TOSCA2vSphere:
-
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.
-
If parsing the file was successful you can now use the CLI:
-
You can create everything needed to run your model if you enter:
create
-
if the model was created you can start it with:
start
-
and finally there is the possibility to stop it with:
stop
It is mandatory that
create
has to be called beforestart
andstart
has to be called beforestop
. If not, there will be an error. -
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 that are used in this project.
- IDE: IntelliJ
- Project management: ZenHub
- CI: TravisCI
- Code analysis: Codacy
- Code coverage: Codecov, Get browser extension
In the folder util
you can find util scripts for operating systems with bash.
utils/build_with_test
- builds with testsutils/build_without_test
- builds without tests for test purposesutils/run_with_example_phpapp
- starts the CLI with the example php app
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
.