Showing posts with label BI Endeca. Show all posts
Showing posts with label BI Endeca. Show all posts

Saturday, 9 February 2013

Agile BI with Endeca - Part 3

In previous posts I have looked at the broader picture of what Endeca is and given a brief outline of how to setup an evaluation environment on AWS.  In this article I will cover a few minor details of how to make your evaluation environment a little more friendly.

Starting and Stopping


One of the reasons for using AWS is that you only pay for the resource while you are using it, but its rather inconvenient to have to keep logging in via ssh each time to restart the server and portal.   I'm rather surprised that Oracle did not already provide an init script to do this for you, if they have then I have not been able to find it anywhere.  

Linux servers start and stop services with scripts located in /etc/init.d take a look at a few of the examples in there.  

This is one I have written myself to start, stop and check the status of Endeca.  It is not perfect, and there is lots of scope for improvement but it is a starting point.

#!/bin/bash
#
#       /etc/init.d/endeca
#
# Starts the Endeca services
#
# Author: Mark Melton
#
# chkconfig: - 95 5
#   

# Source function library.
. /etc/init.d/functions

RETVAL=0

#
#       See how we were called.
#

server_path="/oracle/Oracle/Endeca/Server/7.4.0/endeca-server"
server_start_cmd="start.sh"
server_stop_cmd="stop.sh"

portal_path="/oracle/Oracle/Endeca/Discovery/2.4.0/endeca-portal/tomcat-6.0.35/bin"
portal_start_cmd="startup.sh"
portal_stop_cmd="shutdown.sh"


start() {


        # Endeca Server
        #
        # Check if endeca-server is already running
        server_pid=$(ps -ef | grep endeca-server | grep -v grep | awk '{print $2}')
        if [ -z "$server_pid" ]; then
            echo -ne $"Starting Endeca Server\n"
            cd $server_path
            $cmd ./$server_start_cmd >> logs/server.log &
            RETVAL=$?
        else
            echo -ne "endeca_server already running with PID $server_pid\n"
        fi

        # Endeca Portal
        #
        # Check if endeca-portal is already running
        portal_pid=$(ps -ef | grep endeca-portal | grep -v grep | awk '{print $2}')
        if [ -z "$portal_pid" ]; then
            echo -ne $"Starting Endeca Portal\n"
            cd $portal_path
            $cmd ./$portal_start_cmd >> portal.log &
            RETVAL=$?
        else
            echo -ne "endeca_portal already running with PID $portal_pid\n"
        fi                                                                                                                                                                   


        return $RETVAL
}

stop() {
        echo -ne $"Stopping endeca-server\n"
        cd $server_path
        $cmd ./$server_stop_cmd server.log &
        RETVAL=$?
        echo

        if [ ! -z "$RETVAL" ]; then
            echo -ne "There was a problem stopping the endeca-server"                                                                                                        
   
            return $RETVAL
        fi
        cd $portal_path  
        $cmd./$portal_stop_cmd >> portal.log &
        RETVAL=$?

        return $RETVAL
}


restart() {
        stop
        start
}

reload() {
        restart
}

status_at() {
        server_pid=$(ps -ef | grep endeca-server | grep -v grep | awk '{print $2}')
        if [ -z "$server_pid" ]; then
            echo -ne $"Endeca Server is not running\n"
        else
            echo -ne $"Endeca Server is running\n"
        fi

        portal_pid=$(ps -ef | grep endeca-portal | grep -v grep | awk '{print $2}')
        if [ -z "$portal_pid" ]; then
            echo -ne $"Endeca Portal is not running\n"
        else
            echo -ne $"Endeca Portal is running\n"
        fi


}

case "$1" in
start)
        start
        ;;
stop)
        stop
        ;;
reload|restart)
         restart                                                                                                                                                             
        ;;
condrestart)
        if [ -f /var/lock/subsys/wdaemon ]; then
            restart
        fi
        ;;
status)
        status_at
        ;;
*)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac

exit $?
exit $RETVAL

There is just one more command to run:

# chkconfig endeca on

Now when you reboot your Endeca services should restart automatically.

Location


Just one last thing to make it easier to find your Endeca environment is to use an Elastic IP address.  You can have one elastic IP address associated with a running instance at no charge.  Go to the Elastic IP address tab on your AWS console, request a new Elastic IP address and associate it with your Endeca Instance.  You will now be able to access your Endeca instance on  elastic_ip:8080.  You do have to associate the IP address with the server instance each time you start it up, but this can easily be done through the EC2 console.

It just remains to give your server and stop and start just to make sure that everything is working as expected.


Sunday, 3 February 2013

Agile BI with Endeca - Part 2

Yesterday I looked at possible use cases for Endeca in Enterprise environments, today I'm going to look at possible starting points for taking advantage of the capabilities it offers.

Firstly I'll take a look at your options for licensing if you want to evaluate Endeca, then move on to some options for hosting an evaluation before moving onto an outline of setting up a system and getting started.

First off, Oracle Endeca Information Discovery is a commercial package, obviously this means you need a license to use it.  There are time limited Oracle evaluation licenses available, and if you talk to your Oracle account manager nicely I'm sure trial licenses can be arranged.  But I'll leave that as an exercise for the reader.   In future posts I'm planning on looking at the possible options for recreating some of the Endeca capabilities using community open source packages, but that's for the future.

So what do you need to install Endeca on.  While we'd all love to have an Exalytics box sat under our desks, that's not really very practical for most.  Also, if you go and talk to your infrastructure department and ask for a server, there is a lot of sucking of teeth and a question of how many months time do you want it in?  So it's time to be a little creative.   I'm sure that a lot of you are familiar with Amazons cloud service, if you are not then I'll briefly explain (I'm no AWS expert, I know as much as I need to to get by).  Amazon Web Services is an offering from Amazon that enables you to create and use virtual computing services via a number of methods.  EC2 allows you to create virtual servers and access them in over the web.  You pay for the server by the hour and shut it down when you do not need it.  This makes it perfect for evaluations and demos.   In addition to this instances come in a range of sizes and prices, making it possible to start small at low cost and then move up to the more costly options.

One word of warning here, there are differing types of images, those based on instance store volumes and those based on EBS.  Instance store volumes are lost when the instance shuts down, while useful in some instances they are not really suitable for what we need here.

So for a start you need an Amazon AWS account, I'm not going to go through the details of how to get started because enough has been written on that subject already.

To get started we need an EC2 instance.  There are a number of different types available but I started with a 64 bit, Red Hat EBS backed m1.medium image,   that gives 1 virtual core, 3.75GB Ram.  I also added a second 20GB EBS volume to use for application data storage.  I went for Red Hat because it's a supported OS for installing Endeca (so hopefully no compatibility issues) , and I'm a Linux person by preference.

Once you have your image created there are a few tasks to do, I'm not going to give step by step instructions for the Linux admin tasks, there are plenty of references out there already on how to do this.

First thing after booting is to login using your SSH client.  This can be done using Actions->Connect from the EC2 console instances page.

The next task I performed was to create a mount point and edit the /etc/fstab file to mount the extra EBS storage at boot time.  I created this as /oracle but you can put this where you like, /apps might be a more appropriate name.

You are also going to need an X windows system to be able to run the Integrator application locally on the server.  Instructions for getting an X windows system installed can be found here.

At this point I'll also stress that we only have the root user on the server, this is not a good idea. You really need to create user/group to run Endeca.

Oracle Endeca is available from the Oracle software delivery Cloud (you will have to register, remember Endeca is not free, but there is an evaluation trial license), there are a bewildering array of downloads but as a minimum you need:

  • Endeca Server - the "database"
  • Information Discovery Studio - the web interface
  • Information Discovery Integrator - the ETL tool


Again I'm not going to give you step by step instructions on installing Endeca because Oracle have already done that, their documentation is available here.

But as an outline, start with installing the server, then Integrator and Studio.

If you want any demo data in your system you will need to follow the quick start guide.  This helps you get out of the blocks and see something running.  I used VNC to access Integrator on X Windows to run the quick start data load.  This can be done by using a tunnel for port 5901 on your ssh session, information on how to do that is here.

The only two "gotchas" that you might hit are the Red Hat firewall being closed by default, so you need to open up port 8080.  This how-to should point you in the right direction.  Additionally you will need to ensure that your Amazon network security group has port 8080 open.

If you start the server and the portal (see the installation guides)  you should be able to login to your server at its public url on port 8080.  You should then see the login page, the default login details are in the studio installation guide.

From there I'd suggest that you go through the excellent YouTube videos on how to get started.

Next time I'll follow up with a few practical details on how to startup Endeca at boot time, the hosting ports and how to proxy through apache.  Then I'll go through a few practical steps to build real apps a little more independently than the  "just copy the example file" used on the getting started videos.


Saturday, 2 February 2013

Agile BI with Endeca

Recently I've been looking at the wider possibilities for using the capabilities of Oracle Endeca in enterprise environments. Much has been written about Endeca since the Oracle purchase last year, their is a good summary of Endeca here.

Over the next few posts I will look at what Endeca could do for Enterprise BI and how to start evaluating what it can do:



So before diving into the detail and looking at what Endeca can do I'd like to look at what we are trying to achieve with BI in the enterprise. In any enterprise, old or new they are trying to be better than their competitors in one or more areas, being more efficient and competing on price, or perhaps differentiating themselves by having better products. As BI professionals we are trying to enable the business to be better at their targeted competitive strategy. So we can focus on improving the performance sales organisations, better product research, better marketing, operational efficiencies, etc. So how do we go about this and where do we start? The path from this points well trodden, and quite well understood.

If your lucky enough to be working in a green field site you have a wealth of options available, the traditional enterprise data warehouse is a realistic target.  Much has been written about the likes of the transformational BI in NetFlix and Capital One, both essentially green field sites.  If you are using commercial off the shelf business packages then the off the shelf BI packages such as OBIA are a reasonable starting point and offer a low cost entry point. Beyond this the warehouse models such as the oracle warehouse reference model are available and tried and tested methods for best practice custom BI implementations. But the world is changing, where does Big Data fit with the EDW model, how do you analyse unstructured data? Various schemes have been proposed but so far I'm not sure any of them really "feel right".

Sadly though the reality is that the majority of businesses are distinctly brown field.   Hopefully your enterprise architects have read the excellent Enterprise Architecture as Strategy, and are banging on the door of the C-level executives with a copy.  So while you might be looking at a brighter future the reality is we have to help the business as it exists today, with a large estate of legacy systems and planned system retirements over the next 5 years or so.   Even in this harsh environment it is possible to deliver using traditional EDW techniques, but as many have found to their cost without the highest level executive support and the associated funding and resources you face an uphill battle.  To get that executive sponsorship you have to have a proven track record of success, and to do that you need to start somewhere, possibly with little or no budget, resource or support. The business probably also balk at the costs that you start to discuss when talking about EDW solutions, they are used to their landscape of spread marts, Access databases and VB Heath Robinson solutions.   While being cheap these are hopelessly inflexible after a very short period of time, not scalable, inaccurate silos of data.  But when you roll up and say it will cost them $250k or more to replace their spreadsheet they are not unreasonably a little shocked.

So lets look at where the costs go in EDW.  If we take the Kimball lifecycle as being a typical model we not unsurprisingly start with the project governance and requirements gathering.  This needs to be done to a reasonably detailed level before you can even contemplate the next level of data model design.  I've also known some companies get this so wrong it was laughable.  Because they treated all "development" as being the same a poor developer  was not allowed to start any design work or coding before he had got a requirements document for "each" report signed off.  Naturally the business did not  really know what they wanted and kept changing their minds, so after 50 days of effort it was still not signed off,  even taking a low estimate of $250 a day, this requirements document cost $12500.

Even if you have a project team who are are effective at BI development this is still not a small undertaking, it will be several weeks of information discovery, requirements gathering, design, development, deployment and testing before the end point business partner gets to see anything.  This is not even factoring in the problems around resource planning, budget approvals, business case sign off etc.  But also factor in the constantly shifting sands of the IT estate, this route looks less and less attractive.

So is this an opportunity for Endeca to ride to the rescue?  Well lets look at what we could do differently to enable us to trim some fat from the development process.   Why do we need project governance?  Put simply it is required to coordinate multiple work threads and resources to collectively achieve their objectives.  As the size and complexity of the planned work increases, along with the size of the delivery team, so must the quantity of co-ordination work.  So it follows that if we can reduce the size of the delivery team the less project management we need.  So lets look at the next step, business requirements definition.  Why are we doing this stage?  Stating the obvious, its so that the design and build team know what requirements of the system they have been tasked with delivering has to do.  Based on the premise that change and rework is expensive, you want to build something once and get it right.  You are probably at this point thinking that a few problems are cropping up here for our brown field site.  But lets carry on.   We are now designing our dimensional models and BI applications, because we have to design them right?  How else will we know what to build.    But we are at this point "fixing" aspects of what and how we can report on our data.  Now we go away and design our ETL to take our source data, cleanse and load it and put it into some data structures we can query.   What if we could carry the flexibility of not having to fix our dimensional model so early?  What if we did not even have to do it until we were exploring how we wanted to query the data.

There looks to be something promising here.  So if we could get away from rework and change actually being costly and something we just expect and factor in we can really back off on the depth of requirements gathering.  What if we did not  have to define a dimensional model?  What if we had a tool so simple to use that someone with a broad skill set of business analyst and developer could use it? That tool is Endeca.   We are now looking at genuinely agile BI development.  It is possible to use a one or two person team to deliver on the entire project.   Even if you use Endeca for nothing more than a proof of concept to enable the business to crystallise the requirements and work out exactly what they need to know it would be beneficial.

So is it practical to embed a single highly skilled individual who is architect, analyst and developer in the business units as required to solve business problems and boost business performance?  I believe it is and over the next few blog posts I'm going to look in some detail about how you can use Endeca in an agile way to deliver useful BI enabling business performance improvement.