Getting Started with vFabric tc Server

Home



This is the first article of many where you should learn how to work with this powerful server. Practically with this server you are able to run your Java Spring applications. Something valuable for you is that vFabric tc Server is lightweight, even offering you the option to work together with vFabric Hyperic, therefore you can take advantage to management your application. In resume vFabric tc Server is the enterprise Tomcat App server

Errata: Before to start the tutorial is important to let you know that in many images appear by error the wmware term, it should be vmware instead.

Step 01: Adquiring VMware vFabric tc Server

Proceed to open your favorite Web Browser and go to Adquiring VMware vFabric tc Server Overview. Then do click on the button Download Trial located in the left part. See the image below for a better understanding.

Figure 01: Getting vFabric tc Server Trial

Afterwards to did click you should arrive to a new page where you should do a login process or simply create a new account on VMware.

Practically you must see the follow presentation

Figure 02: VMware’s Login Control

To do a successful login, be sure to do click on the Login button. Once logged, you must arrive to VMware vFabric tc Server Product Evaluation License and Download

Here we have three sections

  1. Binaries for vFabric tc Server
  2. vFabric Hyperic Server and Agent
  3. vFabric Spring Insight Operations

Practically you should see the follow images

Figure 03: Binaries for vFabric tc Server

Figure 04: vFabric Hyperic Server and Agent

Figure 05: vFabric Spring Insight Operations

Again, I going to work with Linux Fedora Core 15, and with Java SE Development Kit 6 Update 29 and of course with the last version available of vFabric tc Server, it is 2.6.2 while I am writing this tutorial, therefore for the first section, Binaries for vFabric tc Server, I going to choice the second option. Once downloaded the file named vfabric-tc-server-standard-2.6.2.RELEASE.tar.gz proceed to do a checksum. It is out of the scope of this tutorial.

Step 02: Unpacking vfabric-tc-server-standard-2.6.2.RELEASE.tar.gz

Open your First terminal to move and unpack this file. Again I going to use my root directory named /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2.
Once unpacked the file you must see the follow new directory named vfabric-tc-server-standard-2.6.2.RELEASE. Below the respective image for a better understanding.

Figure 06: vfabric-tc-server-standard-2.6.2.RELEASE.tar.gz unpacked

Since we are already located in the directory 2.6.2, I going to move all the content within the directory vfabric-tc-server-standard-2.6.2.RELEASE to this level, I mean, the directory 2.6.2 and then delete the empty directory vfabric-tc-server-standard-2.6.2.RELEASE.Below the respective image for a better understanding of the final result of this indication.

Figure 07: directory vfabric-tc-server-standard-2.6.2.RELEASE content moved to directory 2.6.2

Take your moment to analyze the files available for us, do realize yourself about the two Apache Tomcat distributions

Step 03: Configuring vFabric tc Server Runtime Instance

We have two important files for our consideration to start up the server, these are tcruntime-instance.sh and tcruntime-ctl.sh. The first one is the script tcruntime-instance.sh and is used to create a server runtime instance. Therefore in our first terminal proceed to execute the follow script ./tcruntime-instance.sh, the result is show below.

[Section1@localhost 2.6.2]$ ./tcruntime-instance.sh
usage: tcruntime-instance.sh COMMAND [OPTIONS] [ARGS]

The tc Runtime Instance commands are:
   create           Create a new instance
   list             List existing instances and their details
   modify-version   Modify the version of Tomcat that an instance runs with
   upgrade          Upgrade an instance created with a previous version

See 'tcruntime-instance.sh help COMMAND' for more information on a specific command.

[Section1@localhost 2.6.2]$

Do realize yourself we must use some parameters, therefore I going to use execute the same script but with the follow parameters ./tcruntime-instance.sh create servermanolito. Below the execution of this script in this way.

[Section1@localhost 2.6.2]$ ./tcruntime-instance.sh create servermanolito
Creating instance 'servermanolito' ...
  Using separate layout
  Creating bin/setenv.sh
  Applying template 'base'
    Copying template's contents
    Applying fragment 'context-fragment.xml' to 'conf/context.xml'
    Applying fragment 'server-fragment.xml' to 'conf/server.xml'
    Applying fragment 'web-fragment.xml' to 'conf/web.xml'
    Applying fragment 'tomcat-users-fragment.xml' to 'conf/tomcat-users.xml'
    Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
  Applying template 'base-tomcat-7'
    Copying template's contents
    Applying fragment 'server-fragment.xml' to 'conf/server.xml'
    Applying fragment 'web-fragment.xml' to 'conf/web.xml'
    Applying fragment 'catalina-fragment.properties' to 'conf/catalina.properties'
  Applying template 'bio'
    Copying template's contents
    Applying fragment 'server-fragment.xml' to 'conf/server.xml'
  Configuring instance 'servermanolito' to use Tomcat version 7.0.22.A.RELEASE
  Setting permissions
Instance created
Connector summary
  Port: 8080   Type: Blocking IO   Secure: false
[Section1@localhost 2.6.2]$

Check our actual directory 2.6.2 and do realize yourself that we have a new directory named servermanolito. Below an image for a confirmation about this.

Figure 08: Creation of our customized server runtime instance directory

Let’s see what files are contained within the directory servermanolito. See the next image.

Figure 09: directory servermanolito’s content

Practically it has the same structure that Apache Tomcat

Step 04: Starting vFabric tc Server

Bear in mind the second script, it is tcruntime-ctl.sh and is used to control our server runtime instance just created before. Therefore in the first terminal proceed to execute the follow script ./tcruntime-ctl.sh. The result is show below.

[Section1@localhost 2.6.2]$ ./tcruntime-ctl.sh
ERROR An instance name must be specified
Usage from tc Runtime installation directory:
./tcruntime-ctl.sh [options] instance_name cmd

  [options]
     -n          - The full path to the instance directory [default:
                        current working directory]
     -d          - The full path to the tc Runtime installation
                        directory [default: location of this script]

  cmd is one of start | run | stop | restart | status
    start             - starts a tc Runtime instance as a daemon process
    run               - starts a tc Runtime instance as a foreground process
    stop [timeout]    - stops a running tc Runtime instance, forcing termination
                        of the process if it does not exit gracefully within
                        timeout seconds [default: 5 seconds]
    restart [timeout] - restarts a running tc Runtime instance, forcing
                        termination of the process if it does not exit
                        gracefully within timeout seconds [default: 5 seconds]
    status            - reports the status of a tc Runtime instance

[Section1@localhost 2.6.2]$

Do realize yourself again we must use some parameters, therefore I going to use the same script but with the next parameters ./tcruntime-ctl.sh servermanolito start. Below the execution of this script in this way.

[Section1@localhost 2.6.2]$ ./tcruntime-ctl.sh servermanolito start
INFO Instance name:      servermanolito
INFO Script directory:   /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO tc Runtime location:/home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Instance base:      /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Binary dir:         /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE
INFO Runtime version:    7.0.22.A.RELEASE
INFO Script version:     2.6.2.RELEASE
Using CATALINA_BASE:   /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/servermanolito
Using CATALINA_HOME:   /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE
Using CATALINA_TMPDIR: /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/servermanolito/temp
Using JRE_HOME:        /home/Section1/whiteroom/sun/jdk/jdk1.6.0_29
Using CLASSPATH:       /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE/bin/bootstrap.jar:/home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE/bin/tomcat-juli.jar
Using CATALINA_PID:    /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/servermanolito/logs/tcserver.pid
[Section1@localhost 2.6.2]$

Step 05: Checking vFabric tc Server startup

To check if all our scripts executions really did well its job, in your Web Browser write the follow URL http://localhost:8080. If all is fine, you must see the follow image.

Figure 10: checking servermanolito’s running

Step 06: Checking vFabric tc Server status (Optional)

Let’s see the status of our server runtime instance, to do that execute the follow script with the next parameters ./tcruntime-ctl.sh servermanolito status. Below the result output execution.

[Section1@localhost 2.6.2]$ ./tcruntime-ctl.sh servermanolito status
INFO Instance name:      servermanolito
INFO Script directory:   /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO tc Runtime location:/home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Instance base:      /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Binary dir:         /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE
INFO Runtime version:    7.0.22.A.RELEASE
INFO Script version:     2.6.2.RELEASE
STATUS Instance is RUNNING as PID=8035
[Section1@localhost 2.6.2]$

Step 07: Shutdown vFabric tc Server

To shutdown our server runtime instance, execute the follow script with the next parameters ./tcruntime-ctl.sh servermanolito stop. Below the result output execution.

[Section1@localhost 2.6.2]$ ./tcruntime-ctl.sh servermanolito stop
INFO Instance name:      servermanolito
INFO Script directory:   /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO tc Runtime location:/home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Instance base:      /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2
INFO Binary dir:         /home/Section1/whiteroom/vmware/vfabrictcserver/2.6.2/tomcat-7.0.22.A.RELEASE
INFO Runtime version:    7.0.22.A.RELEASE
INFO Script version:     2.6.2.RELEASE
Instance is running as PID=8035, shutting down...
Instance is running PID=8035, sleeping for up to 60 seconds waiting for shutdown
Instance shut down gracefully
[Section1@localhost 2.6.2]$

Congratulations!!!. You have learned how to adquire, install, configure and startup the vFabric tc Server

Final Notes: If you did realize I am not covering yet these topics:

  • vFabric Hyperic Server and Agent
  • vFabric Spring Insight Operations

Bear in mind these two sections were mentioned on Step 01. For the coming tutorials, I am going to cover deeply each one due its own level of complexity

Home

Advertisement

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.