Skip to main content

NSX Application Project

Creates a new NS application project, provisioned with everything needed for NSX infrastructure.

  • Expansion resource: net.democritus.initializer:nsx-application-initializer@4.22.0
  • Command: nsinit application / nsinit app
  • Example project: Bitbucket


The NSX application project initializer is an initializer bundle which is used to create new NS application projects with additional integrations for tooling and infrastructure used at NSX.

This initializer can provision a very comprehensive setup for a new application project containing the following:

  • An application model with the base-components, as well as an empty component to add elements to. This includes expansion settings for the default stack and sql-expanders, with an initial data xml file for the sql-expanders with all data needed to run the application from the database. The initial data also contains profiles for admin and user users, where admin profile users have full access to the entire application and user profile users have full access only to the new component added, not the base-components. One user admin is also created with a randomly generated strong password, which is stored in the .credentials file temporarily.
  • A Maven project to expand the application.
  • Some typical project files are generated, such as and as stub files to be filled out by the user. Also an EditorConfig file with a basic setup for clean editing of the files in the repository is generated.
  • A complete Docker setup with support for Flyway to import the initial data script generated by the sql-expanders. This also includes a docker-compose file with a PostgreSQL database and an additional extension docker-compose file for local deployment.
  • Support for the Jenkins CI/CD platform with a Jenkinsfile that performs model-validation, expanding and building. It also integrates with SonarQube for automated code quality tracking.
  • Integration with Amazon Web Services (AWS) through Terraform deployment scripts, providing a comprehensive infrastructure with a PostgreSQL database running in the Relational Database Service (RDS) and the application deployed with auto-scaling and load-balancing on the Fargate Serverless Compute Engine, managed through the Elastic Container Service (ECS).
  • Development/demo scripts that offer rejuvenate operations (harvest/expand), building and deploying locally with Docker or remotely on AWS.
  • Initialization of a local git repository for the project, with an initial commit containing everything that should be committed to the repository.

Generated files

  • applications directory with the Application/ApplicationInstance model with the name of the root directory as their name.
  • components directory with the component model with dependencies on the base components and name example.
  • scripts directory with demo/development scripts when --scripts is used.
  • terraform/aws directory with AWS (Amazon Web Services) deployment scripts for Terraform when --aws is used.
  • conf/expansionSettings.xml file with the expansion settings for the project, such as the nsx-default-stack expansion resource which contains all expanders needed to generate a JEE application.
  • pom-expansion.xml file to expand the project.
  • .credentials file is a temporary file containing the generated user credentials for the application in JSON format. This should never be committed to the git repository.
  • .gitignore file to ignore any known files that should not be committed to a Git repository.
  • .editorconfig file with some basic standard rules for formatting code in files.
  • file to provide some basic information about the project.
  • file to document changes to the project.
  • Jenkinsfile file with basic configuration to expand and build the project in Jenkins.
  • A local git repository with a first commit containing all generated files.


For an overview, run nsinit app -h.

Returns the help with an overview of all commands.
Used to specify a name for the application, rather than using the output directory name as the default.
Used to specify a name for the application instance, rather than using the application name as the default.
--[no-]awsGenerate a Terraform project for deployment to AWS (Amazon Web Services). Default: false
Used to specify the name for the main component of the application.
The groupId for the pom-expansion.xml Maven project file.
--docker-imageThe name for the Docker image that is generated for the application in Jenkins and the development scripts.
--[no-]base-componentsGenerate the project with dependencies on the base components. Default: true
--[no-]jenkinsGenerate a Jenkinsfile. Default: true
--[no-]sonarAdd SonarQube integration to the generated project. Implied no Jenkinsfile is generated. Default: true
--[no-]model-validationAdd model validation integration to the generated project. Implied no Jenkinsfile is generated. Default: true.
--[no-]gitInitialize a local git repository and generate a .gitignore file. Default: true
--[no-]scriptsGenerate demo/development scripts in the scripts folder. Default: false
--[no-]experimentalGenerate experimental features. Default: false
-DAllows you to set any argument or flag defined for the project type, even those that are implicit. For an argument, the key should be prefixed by arg. and for a flag with flag.. E.g.: -Darg.applicationInstance=test-app
The directory where the project should be generated, rather than the current directory.
Disables the interactive mode and accepts defaults for all settings that were not specified as arguments.
Forces the creation of the project, even when the output directory is not empty.


nsinit app -y -o the-best-application --app bestApp --appinst bestAppInst --comp myAppComponent --groupid com.example

Resulting project:

| .credentials
| .editorconfig
| .gitignore
| Jenkinsfile
| pom-expansion.xml
| \---bestApp
| +---harvest
| | pom.xml.harvest
| |
| +---init-data
| | bestApp-data.xml
| |
| \---model
| | bestApp-1.0.0.xml
| |
| \---instances
| bestappinst.xml
| \---myAppComponent
| +---ext
| | \---logic-ext
| | \---common
| | \---resources
| |
| |
| \---model
| myAppComponent.xml
| expansionSettings.xml
| validation.xml
| | .gitignore
| | docker-compose.local.yml
| | docker-compose.yml
| | Dockerfile
| | pom-extra-libraries.xml
| |
| |
| |
| +---conf
| | tomee.xml
| |
| +---deploy
| | .gitkeep
| |
| +---lib
| | .gitkeep
| |
| \---sql
| .gitkeep
| tomee_hsql_openjpa.xml
| tomee_postgres_hibernate.xml
| 3_0_modern.xml
| 3_1_future.xml

AWS deployment

To use the AWS deployment scripts generated with the --aws option, there are two prerequisites to be installed:

  • AWS CLI v2
    • Windows:
      • Installer: Download
      • On commandline: C:\> msiexec.exe /i
      • Chocolatey: choco install awscli -y
    • Linux:
      • Installer:
        curl "" -o ""
        sudo ./aws/install
      • PIP: pip install awscli --upgrade
    • MacOS:
  • Terraform
    • Windows:
      • Installer: Download
      • Chocolatey: choco install terraform -y
    • Linux:
      • Installer: Download
      • Aptitude:
        curl -fsSL | sudo apt-key add -
        sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] $(lsb_release -cs) main"
        sudo apt install terraform
      • YUM:
        sudo yum install -y yum-utils
        sudo yum-config-manager --add-repo$release/hashicorp.repo
        sudo yum install terraform
    • MacOS: