Description
MTA tool for exploring and validating the multitarget application descriptor (mta.yaml
).
The tool commands (APIs) are used to do the following:
- Explore the structure of the
mta.yaml
file objects, such as retrieving a list of resources required by a specific module.
- Validate an
mta.yaml
file against a specified schema version.
- Ensure semantic correctness of an
mta.yaml
file, such as the uniqueness of module/resources names, the resolution of requires/provides pairs, and so on.
- Validate the descriptor against the project folder structure, such as the
path
attribute reference in an existing project folder.
- Get data for constructing a deployment MTA descriptor, such as deployment module types.
Multitarget Applications
A multitarget application is a package comprised of multiple application and resource modules that have been created using different technologies and deployed to different run-times; however, they have a common life cycle. A user can bundle the modules together using the mta.yaml
file, describe them along with their inter-dependencies to other modules, services, and interfaces, and package them in an MTA project.
Requirements
Download and Installation
-
Set your workspace.
-
Download and install it:
$ go get github.com/SAP/cloud-mta/mta
Usage
-
Import it into your source code:
import "github.com/SAP/cloud-mta/mta"
-
Quick start example:
// sets the path to the MTA project.
mf, _ := ioutil.ReadFile("/path/mta.yaml")
// Returns an MTA object.
if err != nil {
return err
}
// unmarshal MTA content.
m := Unmarshal(mf)
if err != nil {
return err
}
// Returns the module properties.
module, err := m.GetModuleByName(moduleName)
if err != nil {
return err
}
Contributions
Contributions are greatly appreciated.
See CONTRIBUTING.md for details.
Known Issues
No known major issues. To report a new issue, please use our GitHub bug tracking system.
Support
Please follow our issue template on how to report an issue.
License
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
This file is licensed under the Apache 2.0 License except as noted otherwise in the LICENSE file.