Mostrando entradas con la etiqueta manager. Mostrar todas las entradas
Mostrando entradas con la etiqueta manager. Mostrar todas las entradas

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.

domingo, 19 de diciembre de 2010

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

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 

http://looking4q.blogspot.com/2011/01/roll-your-own-continuous-integration.html

This is the very first goal for the followers of this blog.

For those who doesn't know what a Continuous Integration System is, you could take a look at wikipedia, but, summarizing with an example, is a software that every night downloads your code, compiles it, executes unitary testing and deploys it in your server or in your dependency repository.

That's not all. It could pass several control checks like code style, testing code coverage, code quality, it makes a report and send it to your email, and other for the guilty developer that wrote some code that generates lots of warnings.

This information is processed for cyclic dependencies, copied&pasted code, percent of commented code, percent of tested code... reports and more reports.

Some of this reports are also postprocessed in order to evaluate each developer independently. Then it creates a dashboard with scores for each participant, trying to motivate the team for a better code.

Appealing enough?

I have selected some tools that I use in my company. This list might be modified in near future:

Code Repository: We are using Subversion
Dependencies manager: Maven
Dependencies repository: Artifactory, which understands Maven among others.
C.I.S Manager: Hudson: which understands Maven and SVN among others.
Extra: Sonar as quality of code reporter.
Extra: Wiki or CMS

And Tomcat6 as the container of everything or almost everything.

In next articles, I will try to explain how to install and deploy each tool in order to get something similar to my example in your own company or at home.

See you soon!