domingo, 20 de febrero de 2011

Roll your own Continuous Integration System (C.I.S.): Basic Tomcat configuration - Basic application manager and user permissions

Roll your own Continuous Integration System (C.I.S.)

Content:
Abstract
Install Tomcat
Basic Tomcat configuration - Memory
Basic Tomcat configuration - JMX
Basic Tomcat configuration - Application Manager and permissions
Apache and uSVN 
Installing Artifactory from WAR
Configure Artifactory and MySQL
Configuring Artifactory security and repositories 

Our tomcat installation provided an application manager, with all basic function to administrate the life cycle of our applications.

Top advantages:
1) No need to leave applications in a folder to deploy them, this application will copy there for us.
2) Manage start, stop, redeploy and undeploy of every application comfortably.
3) Secured, only users with "manager" or "manager" role can reach this application.
4) Web and REST interface.

As said in the third point, this application is secured, using basic tomcat configuration. Take a look to your conf/tomcat-users.xml, read the useful comments inside <tomcat-users> tags:

<!--
NOTE: By default, no user is included in the "manager" role required
to operate the "/manager" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->

Now uncomment the next block of xml user declarations, although I rather keeping only one line like this:

<user username="tomcat" password="tomcat" roles="manager"/>

and I usually erase the others, in order to keep it clean.

Once done this, restart the server (service tomcat6 restart) and try to enter to your server:port/manager/html (usually localhost:8080/manager/html). type your user and password for a manager user (in my example, "tomcat" and "tomcat") and discover one of the most useful tools in tomcat administration.



 The first half of the page is devoted to list your application and their status.


Scroll down a bit, you will find two ways to deploy an application, by local address in tomcat's computer, or by uploading a war file from your computer, that might not be always the same.

Now you are ready to deploy easily all the applications for your Continuous Integration System :)

pd: A stopped application will start if Tomcat is rebooted. That is important and not very intuitive.

No hay comentarios:

Publicar un comentario

Nota: solo los miembros de este blog pueden publicar comentarios.