This project is an example of how to deploy wars to your server with Chocolatey for Windows, RPM's for Unix, and Docker Images.
To create packages, run: mvn install This will run mvn compile, mvn test, mvn package, and mvn install (and maybe a few more in there).
mvn package will create a chocolatey packagen, rpm package and a docker image. These packages depend on Apache Tomcat.
choco install war-deployment-example will install the package on windows, and rpm war-deploment-examples.rpm will install the package on unix.
###The install process is (basically) as follows:
- Determine Dependencies (Tomcat, etc)
- Install Dependencies
- Install Package files
- Post Install Package - Call a deployment script to tell Tomcat "HEY IM A WAR, DEPLOY ME!"
- Done
###The uninstall process is (basically) as follows:
- Pre-Uninstall - Call a deployment script to tell Tomcat "HEY UNDEPLOY ME!"
- Uninstall files
- Done
While in the folder with .nupkgfile :
cinst war-deployment-examples -pre -source %cd% -force -debug
-pre allows filenames similar to "war-deployment-examples.0.0.1-SNAPSHOT.nupkg". This is needed because -SNAPSHOT is a 'pre-release' in choco land.
-source %cd% specifies that the source DIRECTORY is the current directory. Source does NOT point to a file.
-force will install the package even if it is already installed.
-debug will display debug output
- RPM
- Create Package
- Depend on Tomcat
- Deploy War into Tomcat
- Create Uninstall
- Chocolatey
- Create Package
- Depend on Tomcat
- Deploy War into Tomcat
- Create user in Manager
<user username="admin" password="admin" roles="manager-script,manager-gui" /> - Create Uninstall