/
README
44 lines (31 loc) · 1.73 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Simple Vagrant that uses an Ubuntu 14.04 box
Note: More extended information, as well as a copy of the presenation this was created for can be found at http://github.com/crpeck/mabug-2014
typing "vagrant up" will:
-install Tomcat running on port 8080 with Tomcat Manager in place
-install Jenkins CI running on port 8090
--add a job named 'hello-world' to Jenkins
--install https://github.com/crpeck/hello-world.git to /usr/local/src
and a post-commit hook to curl to jenkins to do a project run that
builds the hello-world.war file and auto-deploys it to Tomcat
To try this out:
After you "vagrant up" point your browser at:
http://localhost:8090 for jenkins
-click on the "hello-world" project
-click on Build Now (on the left hand side)
This will build the hello-world project and deploy it to tomcat.
Hopefully you will see a "Blue Ball" next to the Entry under Build History,
if it's Red something went wrong.
Then you can see it by going to:
http://localhost:8080/hello-world
To see Jenkins do the auto-build & deploy you need to edit the file index.jsp
and commit the change to git:
vagrant ssh
cd /usr/local/src/hello-world/src/main/webapp/
pico index.jsp - modify the Hello World part, save the file and exit pico
git add index.jsp
git commit -m 'updated index.jsp'
Then watch Jenkins build & autodeploy the new warfile to Tomcat, reload
http://localhost:8080 to see the change.
Note: Tomcat Manager is installed as well, if you want to play with it:
http://localhost:8080/manager , userid=manager, password=12345 for Tomcat Manager
I've included a script output file of running 'vagrant up', as well as a shell script to replay the file, with a speed up of +100. It run's in the VagrantBox, since I know scriptreplay is installed on that system.