Powered By Blogger

Wednesday, April 30, 2014

DEPLOYING YOUR FIRST WEBAPP ON A CLOUD SERVER USING JOYENT CLOUD

Remote tools needed: WINSCP Remote Login Client, Putty Public/private Key generator, Putty Remote Client,
Cloud Environment: Joyent Cloud
Applications needed on the Cloud environment: Joyent Smart OS, Apache Http Server, Tomcat Application Server (calling out only the applications that I used).
Deployment Duration: 5Mins
Application Language: Java EE
Programming level: Easy - Medium

First time cloud app developers will find this article very direct; describing exactly and only what is needed to deploy your app using the tools/ in the cloud environment described above. For programmers deploying a small test cloud app that needs to go to test production environment quickly and do not have the luxury of hiring a specialized server administrator or not willing to invest in all the server deployment learning curve this article would be a step by step guide to have your app running accessible to the world in 5Mins.
More than anything else this post serves to remind me of how I deployed my first cloud application.

With all the formalities out of the way let’s delve into a little background.
Early in 2012, a friend called me up with a software idea He had planned. An App he was sure would change the way people bought and sold in the world at the time. Happily; like most software programmers, filled with the rush of what my new baby application would do the world, I jumped right into it.
From when I got the call till when I finally deployed the test App took close to 3 months.  Most of this time was spent trying to figure out where my server files were on the cloud servers and how they would all connect to serve my files. The cloud environment “to me” was a different part of town from coding with Netbeans and deploying automatically on glassfish or apache. Maybe it is the same for you too; or not.
  1. To begin, you will need to get access to some cloud resource – disk space, OS, server application etc. I used Joyent (www.joyent.com). Signin, setup your personal information and information for billing.
  2. From the list of “instances”, select Java. This particular “instance” had all the applications I needed for my deployment – SmartOS (operating system), Apache Http Server (web server) and Apache Tomcat (Java Application Server).
    • NB:
      • Joyent has different instances pre-setup and ready to accept your application.
      • Look through the different instances to see the one that best suits your application need.
      • An instance is a combination of applications (e.g Apache Tomcat, Hadoop, Apache Cassandra etc), Operating System, disk space, available on a particular cloud segment. An instance is usually available for a fee. If your application is designed for scalability, you can increase instances to hold different parts of your application to increase throughput and availability. Your on will run on one or several instances each having a unique IP address.
3.  Download and install PuTTY and PuTTYgen. PuTTYgen will help you create public and private keys needed to login to your cloud environment securely. PuTTY will be used to install and manage third party applications installed on your cloud. Both are available for download at www.putty.org.


4.  Click on the link below from Joyent Wiki to show you how to generate Public and Private Keys using PuTTYgen and also to upload this Key to your Joyent Cloud. http://wiki.joyent.com/wiki/display/jpc2/Manually+Generating+Your+SSH+Key+in+Windows#ManuallyGeneratingYourSSHKeyinWindows-GeneratinganSSHKey.

5.  Using the private key you generated, login to your machine using WINSCP. WINSCP gives you the same windows feel of the folders on your cloud.

6.  On the cloud folder system, navigate to where your Httpd.conf file is located. This is usually at “/opt/local/etc/httpd/httpd.conf”. this file contains the configuration of your Apache Http Server. Include the following lines of codes at the last line:


NameVirtualHost *:80

LoadModule proxy_module /opt/local/lib/httpd/mod_proxy.so
#Addmodule mod_proxy.c #Uncomment this line by removing the first Hash if you are using Apache Server less than version 2.2

ProxyPass / appName http://localhost:8081/ appName
ProxyPassReverse /appName http://localhost:8081/appName
    • NB:
      • appName is the name of your application. In Java EE, you would know this as the name of your distributed application or the name you have set to trigger the welcome page when you deployed your application locally on your system.
      • The directives above will ensure that your Webserver (Apache Http) receives all requests coming in from the internet and directs the requests to your application server (Tomcat). The Webserver will also serve all responses from your application server.
7.  Configure your application server to receive and respond to responses from the webserver by including the directives below in your tomcat server.xml file. The Server.xml file should be located at “/opt/local/share/tomcat/conf/server.xml

Connector port="8081" proxyName="www.appName.com" proxyPort="80" /

NB: (remember to put the connector directive between <>)

8.  With this done. Restart your application server and webserver. To do this, login using PuTTY. Issue the following command at the command prompt

“svcadm restart svc:/pkgsrc/apache”
“svcadm restart svc:/pkgsrc/tomcat”


  • NB: Issue both lines one at a time.

This concludes your application deployment. You can confirm that your application has been successfully deployed by visiting your page using your external IP address forward slash your application Name e.g.

72.2.119.100/appName

Feel free to comment below; questions related to this post or to general enterprise application development using Java.


Friday, September 2, 2011

The IBM example - Social network structure enhancing business growth.


Social tools have helped to change the way people interact. In businesses, “smart” companies have taken advantage of these social tools; forming communities of their clients/consumers. They gained from these communitie's products/service criticism and better understanding of the needs of their clients; an information which has helped them evolve products/services that now satisfy their clients.

 Many other smart companies have used social tools(networks) to form talent communities – a way of filtering interested contributors who are knowledgeable about their kind of business and are useful potentials in forging ideas that would move their businesses to new heights.

 But how does this social networking “structure” (we really mean the “structure” not the social network itself) apply directly to business growth? To answer this, we ask another question; what has driven most social networks to popularity?
  •  Ease of use
  • Interoperability
  • Sharing
While “ease of use” and “interoperability” are already parts of most companies plan for particular products or services, the not so new (yet most overlooked) strategy is sharing.

Smart companies have already implemented sharing as a means to quickly popularize their products and services. Sharing in this context simply means to take responsibility together.  It means creating products and services that other companies can share in. Take IBM for example with its partner program that creates millions of dollars in revenue for partners sharing in the IBM experience. IBM produces world class software and hardware that its partners can market around their region. Some partners complete the IBM products more by building software that runs on the hardware or hardware that utilizes the software. IBM goes a step further by helping their clients all the way through by been part of any negotiation process if partners need an expert to shed more light on the IBM product in questions.

One might begin to see business sharing as an IT thing or like the traditional business distributorship; it is more. For a company to share products/services effectively, that product/service must first be complete on its own while having the ability to accept a third party plug-in – essentially for a new functionality. As another example, facebook and the Zynga app; and a lot more in power generation, banking, etc.

Research and development teams must begin to design innovative products/services that are sharable i.e. products and services that have responsibilities that can be shared by potential clients/partners.

The concept of Sharing implemented on any product/service gives room for third party innovation (creating room for the much needed openness on your product/service); which creates new use for your product/service, new market you don’t need to compete in and quickly popularizes your brand. 


Related readings:   


Monday, April 4, 2011

GETTING THE RIGHT INFORMATION FOR A PROJECT - RESEARCHING (PART 2)

Research involves gathering the right information you’ll need to complete your project. No one is an island of information and No one man has all the information needed to sustain his life talk less of satisfying others.

The truth is that all human beings see things from different perspective. My perspective of up might be someone else’s upside down. So keeping in mind that our soft solution will be used by different people with a whole lot of different perspectives, we need research that will bring the views of a whole lot of different people.

Some of the easiest ways to get this kind of information for your solution include (but are not limited to) the following:-

  • Try brainstorming with other neutral minded people on this project. They could see the project from dimensions you never imagined.

Brainstorming should be done in a way that the bias if it exists at all is insignificant and the contributor gives his true and creative input. For instance, The extent to which you get true constructive (or Destructive) criticism over an issue differs if your friend or family was criticizing you on one side and some government policy on the other.

  • Meeting with Clients - Meetings with clients should be detailed. For each meeting, you must have a clear issue you intend to get an answer; and you must get it. With this new information, brainstorm and have a new meeting till all issues are crystal clear.
It is better to go through this process no matter how painstakingly it goes than providing an incomplete work to the client that makes you look unprofessional with no attention to detail. Most clients forget to tell you everything so you will need to bring it out of them.
To aid these meetings, you could draw up a mock up of your current understanding of the system and have them add, delete or modify the system as you see it until they (the clients) are satisfied. So many open source tools are available for designing soft project models or layouts ( we talk about these in the last part of this series).

  • Meeting with Experts - Experts could be people who have probably implemented a similar project or people who are authorities in this field you are working to implement a solution.
Talking with experts gives you the first hand opportunity to see your project from an even more practical side. They have been there and they know at least most of the hurdles there might be.
They are good at advising on the best platform to work on for scalability, The kind of programming paradigm to implement for robustness and could show you bottlenecks you never envisaged.




Sunday, April 3, 2011

BEGINNING A SOFTWARE PROJECT - THE BASICS. (PART 1)

To begin any project in any field, research is key. How large the research gets definitely varies on the size of the project. Good project research prior to project implementation will always :-

  1. Save time - When goals are clearly seen and written down, the very next step in the way is known. No time is lost due to the fact that an unforeseen road suddenly pops up and you have to re-evaluate several thousand lines of codes.
  2. Save cost - An athlete who runs into an unseen hurdle in an Olympics loses the race with broken bones (Double tragedy). You will be so shocked to realize how much an hour lag costs your business. That your competitor was able to deliver a project just as yours in less the time lies in the minutes you spent trying to re-evaluate implementation of an incomplete research which accumulated into hours and days and weeks; then you lost to your competitor.

The key in every project research is to find out specifics that will guide you to implement the project THE RIGHT WAY THE FIRST TIME. Some questions that if answered guide you in this light are:-
• How long do I have till I deliver this project.
• Am I absolutely (not assumed) clear on the needs of my client.
• Am I absolutely clear on what my project needs to solve.
• Which sets of people am I designing for - (are people with disabilities users of this system).
• What tools are important to implement this project from designing to deployment.
• Do I have the knowhow or do I need Experts.
• Has anyone implemented this kind of project previously.

NB: It must be done right. Doing it right means satisfying your client.

In the part two if this series, we evaluate very simple research techniques to help you get the right information you need to complete that project.

Saturday, May 29, 2010

Interesting facts (JESUS IS ALIVE believe it or not)

.... BE SURE YOU SCROLL WAY DOWN TO SEE WHAT THIS MESSAGE HOLDS FOR YOU!!!! YOU JUST MIGHT BE SURPRISED!!! I WAS!!!













DID YOU KNOW
THESE FACTS?







I
SURE DIDNT TILL NOW















Death
is certain but the Bible speaks about untimely death!















Make a
personal reflection about this.......















Very
interesting, read until the end.....










It is
written in the Bible (Galatians 6:7):




















'Be not
deceived; God is not mocked:










for
whatsoever a man sow,










that shall
he also reap..




















Here are some
men and women










who mocked
God :















John Lennon
(Singer):















Some
years before, during his interview with an American Magazine,
he said:















'Christianity
will end, it will disappear.










I do
not have to argue about










that...
I am certain...















Jesus
was ok, but his subjects were too simple, today we are more
famous than Him' (1966).















Lennon, after
saying that the Beatles were more famous than Jesus Christ,
was shot six times.




















Tancredo
Neves (President of Brazil
):










During
the Presidential campaign, he said if he got 500,000 votes
from his party, not even God would remove him from
Presidency.















Sure he got
the votes, but he got sick a day before being made President,
then he died.















Cazuza
(Bi-sexual Brazilian
composer, singer and poet):










During
A show in Canecio ( Rio de Janeiro ),















while
smoking his cigarette, he puffed out some smoke into the air
and said:'God, that's for you.'















He died at
the age of 32 of LUNG CANCER in a horrible manner.















The man who
built the Titanic















After
the construction of Titanic, a reporter asked him how safe the
Titanic would be















With
an ironic tone he said:










'Not
even God can sink it'















The
result: I think you all know what
happened to the Titanic




















Marilyn Monroe
(Actress)















She
was visited by Billy Graham during a presentation of a
show.










He
said the Spirit of God had sent him to preach to her.










After
hearing what the Preacher had to say, she said:










'I
don't need your Jesus'..















A week later,
she was found dead in her apartment















Bon Scott
(Singer)










The
ex-vocalist of the AC/DC. On one of his 1979 songs he
sang:










'Don't
stop me; I'm going down all the way, down the highway to
hell'.















On the 19th
of February 1980, Bon Scott was found dead, he had been choked
by his own vomit.















Campinas (IN 2005)










In
Campinas , Brazil a group of friends, drunk, went to pick up a
friend.....










The
mother accompanied her to the car and was so worried about the
drunkenness of her friends and she said to the daughter
holding her hand, who was already seated in the car:















'My
Daughter, Go With God And May He Protect You.'










She
responded: 'Only If He (God) Travels In The Trunk, Cause
Inside Here......It' s Already Full '















Hours later,
news came by that they had been involved in a fatal accident,
everyone had died,










the car could
not be recognized what type of car it had been, but
surprisingly, the trunk was intact.















The police
said there was no way the trunk could have remained intact. To
their surprise, inside the trunk was a crate of eggs, none was
broken















Christine
Hewitt (Jamaican Journalist and
entertainer)
said the
Bible (Word of God) was the worst book ever written.















In June 2006
she was found burnt beyond recognition in her motor
vehicle.











Many more
important people have forgotten that there is no other name
that was given so much authority as the name of Jesus.















Many have
died, but only Jesus died and rose again, and he is still
alive.















'Jesus'















PS:
If it was a
joke, you would have sent it to everyone.
So are you going to
have courage to send this?.










I have done my
part, Jesus said










'If you are
embarrassed about me,










I will also
be embarrassed about you before my father.'










You
are my 8 in 8 seconds. I am not breaking this. No way!










I'M
TOLD THIS WORKS!!!!! Bishop T.D. Jakes '8 Second Prayer.' Just
repeat this prayer and see how God moves!!










'Lord,
I love you and I need you, come into my heart, and bless me,
my family, my home, and my friends, in Jesus' name.
Amen.'




God Bless Us.