VM Provision In Google Cloud Platform

Following is the way to create an Google Cloud account.

Load the Google cloud platform URL and signup with the appropriate details. While creating account you will be asked to enter your credit card details, don’t worry about it because they are offering $300 free 60 days for our experimentations. Just enter your credit card details, they won’t change you until you give the proper permission.

– Once your account is successfully created, you will be given the dashboard as follows. Then you can select start with Compute Engine.

  1.  let’s follow the below steps to create a Linux machine step by step.
    Open the Google Cloud Dashboard and click on Try Compute Engine, then you will be placed in to some tutorials at the first time. In tutorials click on the “select a different project” and then click on drop down and create a new project.
    screen-shot-2017-01-07-at-12-22-16-pm
  2. Then continue with next buttons and finally you will be placed in the Compute Engine portal.
    screen-shot-2017-01-05-at-4-20-40-pm
  3.  Click on create instance button and try to make a new instance with specifying the machine spec. Screen Shot 2017-01-05 at 4.22.53 PM.png
  4. As you can see the image above, you can set name for Instance, the region that you want to start the instance, number of CPU cores, the Boot image disk with OS and also you can configure firewall rules.Screen Shot 2017-01-05 at 4.54.12 PM.png
  5. Now you are done with provision instance, it’ll be available on project dashboard. Screen Shot 2017-01-07 at 2.44.02 PM.png
  6. There are several ways to SSH in to Linux machine. Following are the ways to SSH in Linux machines.
    1. SSH to an Instance from browser: Click on the SSH option under the Connect column in above image. And click on the “Open in Browser Window”.
      Screen Shot 2017-01-08 at 9.17.14 AM.png
      Once you click you will be placed in to the new window, you will be connected in to the ssh server by generating SSH keys.
      Screen Shot 2017-01-08 at 9.24.30 AM.png
    2. View gcloud command: Once you open this option, you can see the command for gcloud. In my example following is my gcloud command,
      Screen Shot 2017-01-08 at 10.00.25 AM.png
      Click on “RUN IN CLOUD SHELL” then automatically generate SSH keys and you will be able to logging to the instance easily.
      Screen Shot 2017-01-08 at 10.20.05 AM.png
    3. Use Another SSH Client:
      I’ll show you how to connect to an instance via MacOS by generating SSH key pairs.
      Screen Shot 2017-01-08 at 12.55.04 PM.png
      If you already have a SSH key pair in your ~/.ssh/ location, copy the id_ras.pub key file and add it to the metadata in Cloud dashboard as shown in above.
      Once you are done with SSH key adding, use the following command to log in to the server.

      ssh -i ~/.ssh/id_rsa <Username>@<IP_address>
      
  7. Now you are done with provisioning new VM servers and how to log in to it. Enjoy the tutorial 🙂

Configure VisualVM on Ubuntu 14.10

VisualVM is a kind of data gathering software for application which are running under the Java Virtual Machines (JVM). This retrieve information related to the Java application, like heap size, heap dumps, RAM utilization, CPU utilization, thread count and so on. There is an special interface that they use for getting information from application ends and gathered information is analyzed and displayed on the VisualVM dashboard. Remote application also can be monitored via VisualVM. Specially user can get snapshot of heat dumps also.
Follow the steps to install VisualVM on Ubuntu server.
# sudo apt-get install visualvm
# which viaualvm
# java -version
 
You can check the java is up & running up using the commands given above. And for testing purpose, I’m here using a Java testing application in the same host. Let’s open the visualVM and configure it to get the information of running applications.
# visualvm
 
if you need any help related to visualVM you can us,
# visualvm – -help

After open the VisualVM, then you will see the terms and condition that should be accepted. Please accept it and go ahead.

C-UsersmaduradPicturesVisualVm License Agreement

After you agreed to the license agreement you will be displayed the VisualVM home page. In this home page you can see the options that you are having on VisualVm. In the Left side all the options are available. The image given below shows the sample home page of VisualVM.
C-UsersmaduradPicturesVisualVM HomePage
To test an application, here I’m going to run a test application which contains a digital clock.

DemoApp

Download this file and extract, then run the testing java application on a terminal, then you will see the Digital clock on a particular application window.
# sudo unzip demo.zip
# cd src/
# javac DemoApp.java
# java DemoApp
 
After running the testing application, you will see the analytics of the application on the VisualVM dashboard. Locally running all the applications are added automatically to the VisualVM. Sample dashboard image is given below.
C-UsersmaduradPicturesVisualVM dashboard.png
In Visual VM dashboard consist of the four tabs. The descriptions for each tabs are given below.
  • Overview : Contains PID, Host name, arguments, heap dumb, so on, this provides basic idea of the running application.
  • Monitor : Processor consuming, memori consuming likewise utilisation detail.
  • Threads : List of entire threads, state of threads, running time, and so on.
  • Sampler : Sampling information, like CPU, memory.
 
Finally, I can state that VisualVM can be used to get analytics and mange Java based applications for maximum throughput.

Jenkins | Deploy & Configure for Play Applications in RHEL 6.x

Jenkins is an open source server for continuous integration and written by JAVA. This is one of a world famous CI(Continuous Integration) tool. This tutorial guides you through the steps to deploy Jenkins server on RHEL(Red Hat Enterprise Linux) server. The steps are given below.

  1. Check the JAVA is available on the RHEL server.
    # java -version
    Output : java version “1.8.0_45”
    Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
  2. If there is no JAVA is installed on your, install java and get it confirmed that’s installed.
    # yum install java
  3. Add the Jenkins repository to the host machine, then install the rpm file.
    wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
    rpm –import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
  4. Install Jenkins server
    # yum install jenkins
  5. Adding jenkins to system boot
    # chkconfig jenkins on
  6. Start Jenkins and check the port 8080 is opened from the server side.
    # service jenkins start
    # netstat -tnlp | grep 8080
  7. Open your browser and load Jenkins server http://:8080
    Screen Shot 2015-05-07 at 3.49.05 PM
  8. After successfully deploy the Jenkins server, you can setup the server to build scala applications. In here the application code will be retrieved from the git server, so git server should have a separate user for jenkins. In order to achieve that, user have to generate a SSH key file from the host machine.
    # ssh-keygen -t jenkin@localhost.com
    # ls -al ~/.ssh/
  9. Open the rsa.pub file and copy the content to the clip board then update the Github user in Github dashboard. Go to Github -> Your Profile -> SSH Keys -> AddScreen Shot 2015-05-07 at 2.23.19 PM
  10. NewInstall the git plugin in Jenkins server.
    Go to Jenkins -> Manage Jenkins -> Manage Plugins -> Install git Plugin
    Screen Shot 2015-05-07 at 2.34.41 PM
  11. Create a job in Jenkins with you project details.
    Jenkins Dashboard -> New Item
    Screen Shot 2015-05-07 at 11.43.11 AM
  12. After creating the job, you will see the git server settings on configuration on the specified project. Go to project -> configure
    Screen Shot 2015-05-07 at 3.00.45 PM
  13. Under git settings in configuration page you can add the specific git configurations.
    Screen Shot 2015-05-07 at 3.05.36 PM
  14. In Git credentials you have to add the Private key you generated at step number 8, copy the RSA key content to the clip board, then go to Add -> select SSH Username with private key. Then add username, private key value.
    Screen Shot 2015-05-07 at 3.08.57 PM
  15. Then add the build step with “execute shell” (Under LINUX Platform) and add the command to execute scala application.
    Screen Shot 2015-05-07 at 3.18.52 PM
  16. Now add the scala command to build play applications.
    Screen Shot 2015-05-07 at 3.28.45 PM
  17. In order to execute the play application build command in Jenkins, SBT should be installed on the host machine. Go to this link http://www.scala-sbt.org/download.html and get the latest SBT.zip file and extract it in a suitable directory (e.g.: /srv/sbt).
    # cd /srv/sbt/bin/
    # ./sbt
    Output :
    Screen Shot 2015-05-08 at 11.34.45 AM
  18. Now time to build the play application, go to Jenkins server and run the “Build Now”, then you will see the console output. Finally if you are getting message “success”, then you are done. 🙂

Configure HTTP Server load balancing with HAProxy in CentOS

In here I’m going to show you how to configure HTTP server load balancing with the HAProxy server.
HAProxy is an open source high availability and high responsive solution with server load balancing mechanism and proxy server. This would be helpful to maximise server availability and prevent single point of failure of the any kind of running applications on servers.
This tutorial is guiding you through the steps to be followed for http server load balancing using HAProxy. Let’s take an example for configuring HAProxy load balancing with some http server instances.
HAProxy Server
  • Server IP : 10.101.5.3
  • OS : Cent OS release 6.5
 
HTTP-Server-01
  • Server IP : 10.101.5.4
  • OS : Cent OS release 6.5
 
HTTP-Server-02
  • Server IP : 10.101.5.4
  • OS : Cent OS release 6.5
 
HTTP-Server-03

Continue reading

Configure VisualVM on Ubuntu 14.10

VisualVM is a kind of data gathering software for application which are running under the Java Virtual Machines (JVM). This retrieve information related to the Java application, like heap size, heap dumps, RAM utilisation, CPU utilisation, thread count and so on. There is an special interface that they use for getting information from application ends and gathered information is analysed and displayed on the VisualVM dashboard. Remote application also can be monitored via VisualVM. Specially user can get snapshot of heat dumps also.

Follow the steps to install VisualVM on Ubuntu server.
# sudo apt-get install visualvm
# which viaualvm
# java -version

You can check the java is up & running up using the commands given above. And for testing purpose, I’m here using a Java testing application in the same host. Let’s open the visualVM and configure it to get the information of running applications. Continue reading

Tomcat Server Load-Balancing Using Multiple Tomcat Server Instances in Ubuntu

Hello, in here I’m going to describe how to configure load balancing among multiple Apache tomcat servers, before write this article I searched on web and found many solutions but nothing worked correctly, getting some errors. So then somehow I managed to set up tomcat server load balancing. So here are the steps that I followed to configure load balancing on tomcat servers.

Before configure multiple server load balancing, you have to install and configure multiple tomcat server instances correctly, that has been described on my previous blog post about “How to configure multiple tomcat server instances”
Continue reading

Configure A Upstart File In Ubuntu Server.

Hello Everyone today I’m going to show you how to create a simple upstart file in Ubuntu server for .jar file. So let’s look at the steps for achieve this.

  1. Login to the Ubuntu Machine and go to “/etc/init/” then create a file with your project name and the file extention should be .conf (In here let’s assume the project name is project-test)
    $ cd /etc/init/
    $ sudo vi project-test.conf

    Continue reading

Odoo 8 | Installing And Configuring in Ubuntu Server.

Hello All, Here, I’m going to show you how to install new version of “Odoo” ERP system on Ubuntu server. New version is “Odoo v8” , which contains more reliable features. Now it has been very easy to install and configure. Before installing the Odoo v8 let’s keep a clean installation on Ubuntu latest server version. The Ubuntu latest server version is Ubuntu Server 14.04. In here I have a clean Installation of Ubuntu Server 14.04. Continue reading

Installing and Configuring Multiple Tomcat Server Instances In Ubuntu Server.

Hello all, today I ‘m taking you through the steps to configure multiple server instances of Apache Tomcat server in a single machine. In this case I have taken Ubuntu server 12.04 version to be demonstrated. So first of all let’s look at the what are the steps for the server. Continue reading

Hosting Virtual Hosts with Nginx Server on Ubuntu

Hello, here I’m, going to show you how to install Nginx server and configure it for hosting web sites. First of all let’s see what is Nginx server. Actually it is an open-source web server with high performance, stability, low resource utilized with simple configurations.

Following steps show you how to install and configure Nginx server to hosting websites.

Installing Nginx on Ubuntu server

Continue reading