Saturday Mar 09, 2013

OBI Sample VM -- Part 3 Check It Out

"What changed?"

When you open an Oracle Service Request, this is one of the first questions Tech Support will ask.
Your OBIEE application was working;  now it's not;  what changes were made?
It's a question that is often hard to answer ... unless ... you've been disciplined about keeping track of changes.

But ... but ... who has time for that?   You're busy working on business apps for your users ...

just exploded ... I'm surpised too

It isn't difficult to keep track of changes with some simple tools;  you focus on getting the job done, and the tools make your job easier.

The "Revision Control System" ( RCS ) is one of the oldest unix tools for tracking changes.  It's simple ( or can be made simple ), it's small and available everywhere.  
I use it often to track even small changes to simple things. It is especially important if you have frequent disruptions and have to restart hours or days later.   The benefits:

  1. A time-stamped log of changes for every file.
  2. Easy to search if you also forget the file or the directory where you were working
  3. Easy review of the changes with a simple command.
    And easier to spot typos when you're altering a critical file.
  4. Now you're ready for that Oracle Tech Support question:  "What changed?"

The OBIEE Sample Virtual Machine, and Windows MobaXterm are used here to test RCS.  
Much of the software supplied in this virtual machine is new to me, and I can "check it out" without destroying the integrity of the environment.
It allows for quick "try it", and easy back out if the test doesn't work out.

Download the MobaXterm Personal extension set of utilities.

http://goo.gl/0aoO3

Place the URL in your browser to download to your browser environment;  several environments work.

  1. The Windows host machine where you run VirtualBox and MobaXterm
  2. The obiee sample virtual machine running in VirtualBox
  3. A cygwin environment running on the Windows host machine
  4. Your production obiee deployment running on any unix platform

The /etc/moba.alias aliases work in all of these environments, including AIX, Linux, Solaris, HPUX.  The RCS executables  must match your system.  
RCS is usually in the default system;  it's a unix classic.

wget command is often more helpful when you're working in a particular environment, because you can download a file to the exact directory where you are working.  No need to transfer files from a browser download directory to the machine where you want it deployed.   The wget command looks like:

$ wget --no-check-certificate http://goo.gl/0aoO3

The link will download file extz.tgz; a compressed tar file. 
You would deploy the files on MobaXterm Personal by downloading to your $HOME directory, then move to the root directory (/) and  use these commands:

$ cd /
$ tar -xzvf $HOME/extz.tgz
$ source /etc/moba.alias

Caution:

The extz.tgz contains binary files that are only appropriate for the MobaXterm Personal environment.  
Do not use cd / before extracting files on other platforms.  
Expand the archive in a normal directory;  all you need from this distribution will be in the relative directory file ./etc/moba.alias

How do we use this?

/etc/moba.alias provides simple shell functions that expose the basics of RCS and are portable across platforms.

Install the aliases using this command:

$ source /etc/moba.alias

The alias file provides:

 alias  Usage
rcsText  rcsText="project notes"
An environment variable containing a brief description about what you are working on.  This description get recorded by RCS for each file that you change.
When you switch tasks, change the rcsText variable.  Put it in your .profile or .bashrc file for subsequent logins and then put your login profile under RCS control too.  Easy time-stamped revisions of your projects.
 _co  _co file_name
The file_name is added to RCS controls.  If it isn't already being tracked, it's added with a checkin to establish the base file setting.
 _ls  _ls
List the files that are tracked in this directory.
 _diff  _diff filename
List the differences (if any) with the previous version.
 _ci  _ci filename
Commit filename changes to RCS.  
 abm  abm command
"A Better Man" reduces the output from manual pages for review on limited screen space.   Ok, it's not needed for revision control.

As an example, we need to modify /etc/hosts to add the IP address of the obiee sample machine to access it on the network.

I provided a shorter machine alias (obisamp) to reduce typing.  The IP used here might be different if your VirtualBox deploys other VMs.

Here we go -- ($) is the bash prompt:

$ cd /etc
$ _co hosts
$ vi hosts
  O         -- add a line in vi above line 1, then type/paste the next line
  192.168.56.101 obisamp obieesampleapp obieesampleapp.us.oracle.com
  ESC       -- return to vi command mode
  shift-ZZ  -- save the file. ( one-handed, easier than !wq )

$ _ls hosts
----- Mar 9 19:47 RCS/hosts,v

$ _diff hosts
RCS file: RCS/hosts,v
retrieving revision 1.1
diff -r1.1 hosts
22d21  < 192.168.56.101 obisamp obieesampleapp obieesampleapp.us.oracle.com

$ _ci hosts
RCS/hosts,v
new revision: 1.2; previous revision: 1.1
done


To search for files you have modified in a high-level directory, you can use a command like this:

$ find /etc -name '*,v'
/etc/RCS/hosts,v

And then simplify things with a shell function:

$ _find() { find $* -name '*,v'; }
$ _find /etc
/etc/RCS/hosts,v

$ _find /home/oracle
.... obisamp is still thinking about that ...

Add the _find function to /etc/moba.alias ... you are now managing  moba.alias with RCS ... right?

Check it out

Thursday Mar 07, 2013

OBI Sample Virtual Machine as an appliance on Windows

MobaXterm, DropBox and OBIEE Sample Virtual Machine

I've had several question about how to use the OBI Virtual Machine image, and have been busy exploring a number of options.

  1. Use VirtualBox to start the machine and use the resulting desktop.
    Desktop icons can be double clicked to start/stop services
    firefox browser can be used to interact with obiee
    Terminal sessions allow you to type Linux commands, edit and repair files
    Suppose this is your first Linux experience and this all seems very foreign
  2. Start the VM, but then use Windows services to connect and interact.
    This will require an entry in the Windows "hosts" file.  Add the obisamp IP address 
    notepad C:\Windows\System32\drivers\etc\hosts
    192.168.56.101 obisamp obieesampleapp obieesampleapp.us.oracle.com
  3. Now launch the Windows browser of your choice to access the OBI application.
    https://obisamp:7001/analytics/saw.dll?bieehome&startPage=1
  4. What about editing files, working with Linux?  Can that be done from Windows?
    Yes it can.    MobaXterm is a windows utility that interacts with other machines.

Click on this link to download the prepared image to Windows, and unpack the .zip file.

https://dl.dropbox.com/s/igsfzigpt4451ih/obisamp_mobaxterm.zip

Go to the MobaXterm Home Page and watch the small video demo running at the bottom of the page.

http://mobaxterm.mobatek.net/

Launch the application: MobaXterm_Personal-6.2.exe 

Under "Saved sessions", click on "obisamp [SSH]"

A new tab opens up, containing a terminal session to the obisamp virtual machine, and on the left is an sftp file manager showing you all of the files in [ /home/oracle ]

Scroll down until you see the file .bashrc_profile
Click and you are editing that file in a MobaTextEditor that behaves like Notepad.

In the right terminal pane, type xclock
A window appears with an analog clock.  This is a Unix application in the virtual machine, showing in an X-server window running on your Windows machine.

This free MobaXterm application has limitations which you can review in the Downloads section on the MobaXterm home page.

There's more to come ... this gets you started ... explore.

About

Dick Dunbar
is an escalation engineer working in the Customer Engineering & Advocacy Lab (CEAL team)
for Oracle Analytics and Performance Management.
I live and work in Santa Cruz, California.
I'll share the techniques I use to detect, avoid and repair problems.

Search

Categories
Archives
« March 2013
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today