Date : 22th Dec 2020
Author: Lionel Gurret
Description : Deploy Sample war application on Tomcat using Jenkins
- Install Tomcat on Minikube
- Install Jenkins on Minikube
- Configure Tomcat to let Jenkins deploy apps
- Then, this README file let you know how to create your Jenkins job
This script is designed for Minikube !
(https://kubernetes.io/fr/docs/tutorials/hello-minikube/ - Click on Launch Terminal)
git clone /~https://github.com/gurretl/labs.git
cd labs/Lab-11
./run.sh
Once your environment is setup, go to Jenkins and do the following :
- Unlock Jenkins using the unlock key
- Install default plugins
- Create a Jenkins user
- Accept Jenkins default URL
Then, you need to install a plugin in order to deploy a war file in Tomcat.
Go to Manage plugins :
Now we will create a new job for our task :
Choose to connect only to this subdirectory :
Configure the container as so (create a new user deployer by clicking on Add with the same password as in our Helm chart) :
Save and run the job by clicking on :
Your app is deployed, you should see it at the following URL https://TOMCAT_URL/sample :