NSX Application Project
Creates a new NS application project, provisioned with everything needed for NSX infrastructure.
- Expansion resource:
net.democritus.initializer:nsx-application-initializer@5.3.0
- Command:
nsinit application
/nsinit app
- Example project: GitHub
Overview
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
anduser
users, whereadmin
profile users have full access to the entire application anduser
profile users have full access only to the new component added, not the base-components. One useradmin
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
README.md
andCHANGELOG.md
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 project model to generate development scripts.
- 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).
- Initialization of a local git repository for the project, with an initial commit containing everything that should be committed to the repository.
Parameters
For an overview, run nsinit app -h
.
Option | Description |
---|---|
-h ,--help | Returns the help with an overview of all commands. |
--app ,--application | Used to specify a name for the application, rather than using the output directory name as the default. |
--appinst ,--application-instance | Used to specify a name for the application instance, rather than using the application name as the default. |
--[no-]aws | Generate a Terraform project for deployment to AWS (Amazon Web Services). Default: false |
--comp ,--component | Used to specify the name for the main component of the application. |
--groupid ,--group-id | The groupId for the pom-expansion.xml Maven project file. |
--docker-image | The name for the Docker image that is generated for the application in Jenkins and the development scripts. |
--[no-]base-components | Generate the project with dependencies on the base components. Default: true |
--[no-]jenkins | Generate a Jenkinsfile . Default: true |
--[no-]sonar | Add SonarQube integration to the generated project. Implies a Jenkinsfile is generated. Default: true |
--[no-]model-validation | Add model validation integration to the generated project. Implies a Jenkinsfile is generated. Default: true . |
--[no-]git | Initialize a local git repository and generate a .gitignore file. Default: true |
--[no-]git-flow | Set up the git repository with Git Flow. Default: true |
--[no-]release-promotion | Use the release promotion flow with Git Flow in order to use a structured release cycle with room for various testing phases. Implies a Jenkinsfile is generated. Default: true . |
--[no-]scripts | Generate demo/development scripts in the scripts folder. Default: false |
--[no-]experimental | Generate experimental features. Default: false |
-D | Allows 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 |
-o ,--output | The directory where the project should be generated, rather than the current directory. |
-y ,--yes-to-all | Disables the interactive mode and accepts defaults for all settings that were not specified as arguments. |
-f ,--force | Forces the creation of the project, even when the output directory is not empty. |
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 https://awscli.amazonaws.com/AWSCLIV2.msi
- Chocolatey:
choco install awscli -y
- Linux:
- Installer:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install - PIP:
pip install awscli --upgrade
- Installer:
- MacOS:
- PKG: Download
- Windows:
- Terraform
- Windows:
- Installer: Download
- Chocolatey:
choco install terraform -y
- Linux:
- Installer: Download
- Aptitude:
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt install terraform - YUM:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
sudo yum install terraform
- MacOS:
- Installer: Download
- Windows: