Tuesday, March 31, 2015

Python: tracing value of arguments in functions

If you are lazy (I am) and don't want to write print statements to trace the value of arguments, you can use this trick:

to print the argument values in case of an exception (which is most of the time the only case where you want the values to be traced...)

import inspect
def fn(x):
        frames = inspect.trace()
        argvalues = inspect.getargvalues(frames[0][0])
        print("Argvalues: ", inspect.formatargvalues(*argvalues))


('Argvalues: ', '(x=12)')

It works like magic!

I love Python.... if only it was Java, I would love it even more... let's say if Java was more Pythonic it would be a perfect world... well also if USA stopped invading and destroying countries it would not hurt...

Monday, March 30, 2015

bash: run su passing parameters

if you decide to switch to another user to run some commands, remember that whatever variable you have defined so far will NOT be passed to the other user.

echo $message
su - wls
echo $message
(nothing will be displayed, as "message" is not defined for wls)

This of course is a HPITA (aka RPITA) for someone who writes shell scripts.

You can use the "su -p" to pass the whole environment, but then there are some side effects:
su -p - wls
su: ignore --preserve-environment, it's mutually exclusive to --login.

(the "-" options is same as "--login")

su -p wls
bash: /root/.bashrc: Permission denied

I found it cleaner and easier to simply run the command I have to run with the "-c" option, so that variable substitution takes place in the "right" (root) context:


su - wls -c "export JAVA_VENDOR=Sun;export JAVA_HOME=/usr/java/jdk1.7.0_55/;java -d64 -Xmx1024m -Djava.io.tmpdir=/opt/oracle/temp -jar ${softwareFolder}/wls1036_generic.jar -mode=silent -silent_xml=${scriptFolder}/weblogic_silent_install.xml"

this way softwareFolder and scriptFolder are both defined and I don't have to reinitialize them for the wls user...

Friday, March 27, 2015

Clash of Titans, Ansible vs Puppet vs Salt

I have read this excellent article


with part 2 https://dantehranian.wordpress.com/2015/01/20/ansible-vs-puppet-hands-on-with-ansible/

I have been dreaming of writing the same article for a long time....

2 statements caught my attention

"“I would say that if you don’t have a Puppet champion (someone that knows it well and is pushing to have it running) it is probably not worth for this.""

" I tend to agree with Lyft’s conclusion that if you have a centralized Ops team in change of deployments then they can own a Puppet codebase. On the other hand if you want more wide-spread ownership of your configuration management scripts, a tool with a shallower learning curve like Ansible is a better choice."

I haven't used Ansible, but such is my experience with Puppet: you need a technical guru (or max 2) dictating standards and finding solutions to common problems and bridging communication among departments and teams.... you can't just "leave it to the masses" and hoping everybody will be a champion... also, who wants Ruby? All my stuff is in Python !!!

And here goes a very interesting comparison Ansible vs Salt...

And here a "let's move away from Puppet, either to Salt or to Ansible" post

Learning Python

I have been using Python for many years, mainly associated with WLST.

As most WLST programmers, I know only the BASIC of the language.... I don't go beyond some essential OO use (yes, I like OO and I hate unstructured procedural programming).

So now I have decided to go through some training and serious (hahaha) study.

This Learn Python interactive tutorial site is just great to get started.

You can read the 4th edition of the great (>1000 pages) Mark Lutz "Learning Python" book for free here - it's definitely very authoritative, and covers both Python 2 and 3.

Honestly I found this book too verbose, not very focused on concepts and giving too many details... still I guess it's a sort of reference training material. But most of the time I find that the answers on stackoverflow are much clearer than this book. Take this post for example , it's a lot clearer than the book...

After some gooogling I found out that http://effbot.org is by far the best educational site for Python.

Oh jah cool, "import this" works also in WLST.... nice...

Wednesday, March 25, 2015

WLST / Python: execfile versus import

I have lately come across to some usage of "execfile".

I had immediately the impression "this stinks, why don't they use import instead?"
I also read here that execfile is stinky-stinky.

Let's see if they are actually equivalent.
vi toimport.py
def hello():
  print 'helloooo!'

To use the method I run the wlst.sh and type:

ok cool, so execfile has the effect of "inlining" your code. This is very 1960-programming style. All is just a big ball of mud.

If instead of execfile I use import:
import toimport

NameError: hello


the apparent advantage is that the method is QUALIFIED by its module. Disadvantage is that you must type the extra module name.

The "better" way (IMHO) is to explicitly import the method:
from toimport import hello


Needless to say, one should strive for true OO programming, so that the method hello() is defined for a specific class of objects... so please steer away from this "static method compulsive programming syndrome (SMCPS)".

PS execfile is deprecated in Python 3... so just get used to NOT using it...

Poor man's unittests in WLST

Python comes with a very elaborate unittest module , and there is no reason NOT to use it, unless a) you are bound to a VERY old implementation of Python B) you are lazy and stupid like me

The good news is that it's really easy to implement a "poor man's" version of a unittest:

totalErrors = 0
totalTests = 0

def assertTrue(booleanCondition, message):
  global totalTests, totalErrors
  totalTests = totalTests + 1
  if (not booleanCondition):
    print "ERROR:", message
    totalErrors = totalErrors + 1

#your testing code here

assertTrue(domain is not None, "domain is not None")

#print test summary

print ""
print "totalTests=", totalTests
if (totalErrors == 0):
  print 'SUCCESS'
  print 'FAILURE, totalErrors=', totalErrors

One big step forward it to use the inspect module to print the actual assertTrue statement being executed - so you avoid having to pass also the message:

import inspect

totalErrors = 0
totalTests = 0

def assertTrue(booleanCondition, message):
  global totalTests, totalErrors
  totalTests = totalTests + 1
  if (not booleanCondition):
    frame,filename,line_number,function_name,lines,index = inspect.stack()[1]
    print "ERROR:", message, frame,filename,line_number,function_name,lines,index
    totalErrors = totalErrors + 1

#your testing code here

assertTrue(domain is not None)

#print test summary

print ""
print "totalTests=", totalTests
if (totalErrors == 0):
  print 'SUCCESS'
  print 'FAILURE, totalErrors=', totalErrors

I love being minimalistic and lazy....

Monday, March 23, 2015

Extending WLST with custom Java classes - the case of JSON parsing

I have recently looked into how to "modernize" the WLST Jithon/Python version - still sadly a prehistoric 2.2.1, while the recent-most Python version is 3.4.2 (Oracle.... how about doing something about WLST? ).

Here is some instructions on how to try this upgrade - but it's not supported, so do it at your own risk.

This is an increasingly painful limitation of WLST, that it can't use any "modern" Python package, like json.

The good news is that it's relatively easy to expand WLST with any Java library you wish: just add the JAR to the CLASSPATH in /opt/oracle/middleware11g/wlserver_10.3/common/bin/wlst.sh, import the Java class with "from com.bla.mypackage import MyClass" and you can use the custom code.

In case of json parsing, there is a popular Google GSON library you could incorporate:

http://search.maven.org/#artifactdetails|com.google.code.gson|gson|2.3.1|jar which comes with a rich User Guide

The API of this GSON is here ... it seems to be aimed at parsing a JSON string directly into a Java object... there doesn't seem to be room for a more casual, random approach.

The Oracle solution is more "casual" http://www.oracle.com/technetwork/articles/java/json-1973242.html and reminiscent of a DOM approach to parsing... more suitable for a quickly hacked deserialization.

Anyway.... I wish I could simply use the Python JSON module...

Sunday, March 22, 2015

Free like a mountain dog

One of the happiest lives of all is the life of a mountain dog. They are the freest creatures, they wander in the wilderness in search of new adventures and exploring new territories, and normally their human masters let them live a very independent life.

I have recently made friends with this young dog, he accompanied me for some 3 Km, curious of my company and probably just to have a pretext to explore the world. Eventually he found the dead corpse of a deer, surrounded by crows, and he forgot about me.
Yesterday I have met him again and he was very festive to me, licked my face and celebrated my presence.

I like to think that such was the original relationship between man and wolves..... free, festive and independent...

Saturday, March 21, 2015


I hear good things about tmux. I want to try it on CentOS 6.6.

sudo yum install tmux

No package tmux available

Bummer. Let's install it manually :

Login as root

mkdir /tmp/tmuxinstall
cd /tmp/tmuxinstall

wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz

wget -O tmuxsources.tar.gz http://sourceforge.net/projects/tmux/files/latest/download?source=files

tar xvzf libevent-2.0.21-stable.tar.gz

tar xvzf tmuxsources.tar.gz

yum install gcc kernel-devel make ncurses-devel

cd /tmp/tmuxinstall/libevent-2.0.21-stable

./configure --prefix=/usr/local

make && make install

cd /tmp/tmuxinstall/tmux-1.9a

LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local

make && make install


It should all work now.

You can get a tutorial here

Some explanation of the product here https://en.wikipedia.org/wiki/Tmux

Thursday, March 19, 2015

Red Hat: cannot register with any organizations

on RHEL 7.0 I keep getting the same error when I try to update a little my packages:

[root@wltemplate ~]# yum install telnet
Failed to set locale, defaulting to C
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. 
You can use subscription-manager to register.
No package telnet available.
Error: Nothing to do

[root@wltemplate ~]# subscription-manager register --username pirla.vernetto 
--password blablabla --auto-attach

pirla.vernetto cannot register with any organizations.

I have desperately tried to add some Organization (like "the Sons of the Desert") in the RHEL portal profile page, but I could not find any ...

I keep fighting on it....

Ok it turned out (thanks to the timely response from RHAT Support) that the username (pirla.vernetto) I was using was INCORRECT (how about a "unkown username" error message??? ).

So this time around it DOES work:

The system has been registered with ID: blablabla123456 
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

PPS it seems I (idiot me) had 2 accounts, with different username but the same email (!!!).... and only one of the 2 was enabled to register the RHEL 7.0 product!!! I have to admit that RHEL support was BRILLIANT and they replied immediately to my questions...

WLST difference between offline and online

I have a WLST script written for ONLINE use, and I want to convert it into an OFFLINE script... It's mostly a philosophical issue, I believe it's awkward to CONFIGURE a domain while the domain's ADMIN is running, it's a stupid requirement to have to start the ADMIN.

Google finds these 2 links but they don't tell you much.

FIRST thing: you don't "connect" to a URL (t3..), but you readDomain("/path/to/mydomain'), and you don't "edit/startEdit" any longer.

You create(msname, 'Server') to create a server.... don't use cmo.createServer() !

You can cd('/Servers' + msname) and you will see it WITHOUT subdirectories (like ServerStart, SSL....)... this is NORMAL, as wlsf-offline reflects the structure of the config.xml that would be written, and the config.xml is a LAZY document, which doesn't specify the defaults.... so if a SSL option has not been yet customized, the whole folder will not appear.

So you will need to do "create(msname, 'SSL')" and "create(msname, 'ServerStart')" before you can cd('/Servers/' + msname + '/ServerStart') and do some set(property, value) commands...

The typical "create you will run are:

create(name, 'Server')
create(name, 'ServerStart')
create(name, 'SSL')
create( name, 'Log')
create( name, 'WebServer')
create(name, 'DefaultFileStore')
create(name, 'DataSource')

At the end, you "updateDomain()" to persist your changes.

Wednesday, March 18, 2015

RHEL7 firewalld caveat

Beware that in RHEL7, iptables is no longer there, and by default you get another root daemon process running a firewall:

/usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Here it is explained in details http://www.certdepot.net/rhel7-get-started-firewalld/, and also do "man firewall-cmd" for more help. Worth reading also the RHAT page on firewalls https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html

Look also here http://www.liquidweb.com/kb/how-to-start-and-enable-firewalld-on-centos-7/ for how to start/stop the service

So if you waste on hour trying to figure out why you can't connect to the WebLogic console from an external browser, while the WL Server seems to be perfectly configured and functioning.... there you are... kill the stinky firewall first, then try to figure out how to open the 7001 port...

Command I have used:

  • systemctl stop firewalld
  • systemctl start firewalld
  • firewall-cmd --zone=dmz --add-port=2888/tcp --permanent
  • firewall-cmd --reload
  • firewall-cmd --get-service

java.net.preferIPv4Stack : IPV4 versus IPV6

See the whole documentation here https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

If you have a process listening on a Socket which is IPv6- enabled, you should see this by doing "ss -ln":

tcp LISTEN 0 100 ::ffff: :::*

If the socket is enabled only for IP4, you should see:

tcp LISTEN 0 100 *:*

Passing the -Djava.net.preferIPv4Stack=true property to the JVM forces the ServerSocket to bind to a IPV4 address - not sure why you want to do this anyway.

Sunday, March 15, 2015

ServerSocket: listening on a port in 2 seconds

import java.net.InetAddress;
import java.net.ServerSocket;

public class SS {
 public static void main(String[] args) throws Throwable {
  InetAddress inet = InetAddress.getByName("");
  ServerSocket ss = new ServerSocket(7001, 100, inet);

After that, if you run
ss -ln | grep 7001
you should see your fish swimming, and be able to telnet into it.
(ah of course: javac SS.java, java SS) To check if something is listening on an IP/port:

import java.net.InetAddress;
import java.net.Socket;

public class CS {
 public static void main(String[] args) throws Throwable {
  InetAddress inet = InetAddress.getByName("");
  Socket so = new Socket(inet, 7001);

netstat command not found in RHEL 7

Ok just another moronic decision to deprecated a widely used utility from new 7 distributions.

Here an amusing attempt to justify it (I guess those guys would justify even Torture, Death Sentence and Vivisection)

So net-tools package was deprecated in favor of iproute2 suite. EVER HEARD OF BACKWARD COMPATIBILITY ????? Can't you AT LEAST provide me with a compatibility wrapper? What am I supposed to do with the TONS of maintenance scripts relying on those old commands?

Please, stop destroying my productivity and professional life. I can't waste my precious time trying to work around your stupidity creativity. Those utilities have been around even before you were born, they belong to the DNA of million of people. LEAVE THEM ALONE. Why don't you propose to pull down the Colosseum and build instead a huge Mc Donald in the shape of a Pink and Violet Multi-layer Pizza-shaped Tower? There is no roof to what a stupid man can destroy when granted absolute power.

Here a meek attempt to reconcile the stranded masses with the new generation of Sacerdots of the Linux Temple https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/.

PS ah of course why bothering to install telnet by default. Who needs telnet.

startWeblogic.sh : The JRE was not found in directory ....

After installing WLS and creating a new domain, I do:

cd /opt/oracle/wlsdomains/domains/mydomain


and I get the stinky dreaded message:

The JRE was not found in directory /usr/java/. (JAVA_HOME)
Please edit your environment and set the JAVA_HOME
variable to point to the root directory of your Java installation.

First I check all the "*.properties" files in the binary installation contain the right JAVA_HOME :
find /opt/oracle/middleware11g/ -name "*.properties" -exec cat {} \; | grep JAVA_HOME
After a quick grep I find out that this messages comes from /opt/oracle/wlsdomains/domains/mydomain/bin/setDomainEnv.sh

I hack the file to contain:




and also I make sure that the jdk installation belongs to the same user that installed WebLogic (it used to be root) and things now work fine.

I think the root issue is that I didn't specify the JAVA_HOME in the silent installation configuration xml:

See http://www.javamonamour.org/2013/04/weblogic-silent-installation.html for a well tested silent installer.

I will spend the rest of the day pondering on why on Earth Oracle doesn't want to provide a single point of configuration for all Oracle products, rather than spreading around configuration in zillion of files.

Escape from Mac-atraz

In recent years I always felt an Inferior for using a Windows-based laptop vis a vis most of my VERY-PROFESSIONAL colleagues using a Mac.

I felt like an old Indian Chief trapped in a cage for display in a Circus.

When I received a brand new Mac for my new job, I felt like AT LAST I could be one of the Elected who will receive Ethernal Grace from the God of Technology.

To be honest it was quite easy to master the beast. I had used a Mac in 1990 and I felt lot of things were still the same. Amazing, uh? 25 years later...

However, I didn't feel like such a huge advantage compared to a PC. Most of my work has to run on a Virtual Box anyway, so the Guest OS is rather irrelevant. The only VERY nice feature is having a Linux terminal - but then again not such a big deal, given that in any case I always have some Linux VM running around.

Besides, there is some Windows software that I really miss on a Mac: like "Search Everything", Notepad++ and "TextAloud". there might be Mac alternatives but could not find so far.

So, the message for the dispossessed masses of Proletarians running Windows is: Mac is Not Heavens, stop having a small penis inferiority complex towards consultants showing off the Apple icon (besides, I want to place a picture of Marylin Monroe on it, she is far more attractive than a Corporation Logo).

I hear once-Mac-fanatics colleagues saying "since I am running Ubuntu on a PC, I am almost not using my Mac any longer". So there you are: if you really hate Windows, and you hate Corporations, then don't put yourself in the hands of another Corporation, you have Open Source alternatives.

Ah and yes, if I could get a dollar for every time the stupid magnetic power supply plug got inadvertently disconnected from my Mac, I could retire by now. Just a silly posh useless gadget. Real men have mechanical plug-in plugs, sissies have magnetic dongles.

PS one more rant: the default keyboard really sucks! It takes a really cruel brain to ship a hi-tech product without square and curly braces, and no pipe sign !!! Not to mention the Holy Mystery by which Function Keys should be activated by pressing "fn" at the same time: what if I had lost a hand in the Second World War??? Try pressing f10 and fn with ONE hand if you can...

Me on a Mac.... wow, what a great fun...gimme back a horse please!

Thursday, March 12, 2015

Good old ifconfig utility gone in Linux 7

I knew that ifconfig was deprecated in favor of ip, but it was quite a shock: good old /sbin/ifconfig utility is no longer there AT ALL.... I guess all those old shell scripts relying on it will have to be thrown away...

just use "ip addr show"

This guide http://www.tecmint.com/ip-command-examples/ provides a good set of equivalent commands... and of course the IP map page

It seems however reasonable to install a compatibility version of ifconfig http://www.unixmen.com/ifconfig-command-found-centos-7-minimal-installation-quick-tip-fix/ in case you really have scripts relying on it.

Read also this comparison article https://www.tty1.net/blog/2010/ifconfig-ip-comparison_en.html

Farewell, ifconfig.... we'll miss you....

For instance, to add an ip you do:

ip addr add dev eth0

ip route add default via

service network restart

simple, no?

Ah if you want to specify netmask, look no further, you need to provide the IP in CIDR format (here https://kb.wisc.edu/ns/page.php?id=3493 a priceless conversion table, for instance CIDR notation for netmask is /24)

Things get more and more complicated....ifconfig syntax was definitely simpler...

Installing Solaris 11 on VM Server

https://blogs.oracle.com/souvik/entry/my_unqualified_host_name_sleeping read this first

the only caveat is: PROVIDE A FQDN with your hostname (default: solaris .... just make it solaris.mydomain.com !) otherwise you will be haunted by this message at boot time: "my unqualified hostname solaris unknown, sleeping for retry" by the sendmail agent.

Why on earth the Honorable Engineers at Oracle don't provide you with some preemptive warning, it's a mystery...

Installing Oracle Linux 7 on Oracle VM server

Installation instructions here: https://docs.oracle.com/cd/E52668_01/E54695/E54695.pdf
Download the ISOs here https://edelivery.oracle.com/linux (choose the "Oracle Linux 7 Media Pack for x86 64 bit")
There are 2 ISOs available in this media pack
Oracle Linux 7 Boot ISO image for x86_64 (64 bit) = V46138-01 (= oracle-linux-7-boot.iso )
Oracle Linux 7 for x86_64 (64 bit) = V46135-01 (= oracle-linux-7.iso )

To be on a safe side I choose the big fat V46135-01 ("This ISO image contains everything needed to boot a system and install Oracle Linux"). In fact this image too is bootable - Oracle naming is a bit confusing !

(remember to set the boot order, first CD/DVD then HD... and once installation is completed, revert the order, first HD then DVD... to be on the VERY safe side just eject the DVD after installation)

Installation is just smooth.... apart from the issue of having 2 mouse trails on the graphic console...

Skype's epic failures

I was struggling on a Mac to get connected to Skype.... Internet is working fine, but every time I try to set my status to "online", it goes back to "offline" without an error message.

Finally I had to restart the whole Mac...
I try to post this issue on Skype forum, so I need to register, I clock on the "Join Us" button and I get this:

Sorry we cannot process your sign in request further
A return address was specified, which is not allowed. 


I was always amazed how a very unstable and buggy piece of software like Skype can have so much success.... the message is: you don't have to be perfect to be successful ! It's mostly about marketing with a brazen face, and provide some sort of solution to some very basic need....

Tuesday, March 10, 2015

Giving up on Oracle VM Template Builder

It looks that it can be used only with a JeOS image (I am not sure you can easily add an image to those supplied OOTB (EL53 is the latest.... a bit oldish...)... but if you want to use a OS like RHEL 7.0 who APPARENTLY doesn't give you a JeOS image, you are screwed! So you are stuck with Oracle Linux!

General documentation here: http://www.oracle.com/technetwork/server-storage/vm/ovmtb-093027.html

List of JeOS available for download here https://edelivery.oracle.com/EPD/Download/get_form

About JeOS http://www.oracle.com/technetwork/server-storage/vm/downloads/vm-jeos-083859.html

Template Builder user guide http://docs.oracle.com/cd/E11081_01/doc/doc.21/e14391.pdf

JEOS on wikipedia https://en.wikipedia.org/wiki/Just_enough_operating_system

The Oracle OpenSource JeOS page https://oss.oracle.com/ol5/docs/modifyjeos.html

Monday, March 9, 2015

VM to VM communication in VirtualBox (Linux)

(amazing how many examples on youtube are done with Weirdos... few of them use Linux...)

The official documentation says: https://www.virtualbox.org/manual/ch06.html
"NAT: by default virtual machines cannot talk to each other"

Problem is that most of the time I start multiple VM on my host with the purpose of making them communicate with each other! So am I screwed?

An option which looks promising is Internal Networking : "Internal Networking is similar to bridged networking in that the VM can directly communicate with the outside world. However, the "outside world" is limited to other VMs on the same host which connect to the same internal network.". One could use also " bridged networking " but with Internal you don't need an adapter. One Internal Network is available: intnet. But there is a HUGE limitation: "As a security measure, the Linux implementation of internal networking only allows VMs running under the same user ID to establish an internal network." . Bummer.

Frankly "Host-only networking " seems the most promising. it was designed exactly to let multiple appliances cooperate.

I usually use Host-only networking and give "real" IPs to my machines and they see each other without problem.

With Vagrant you can just use something like this:

config.vm.network "private_network", ip: ""

And you will be able to connect from host or from any other guest using and the good thing is that IP will only be visible on your machine.

Read these great presentations:

Sunday, March 8, 2015

Mac install Windows USB drive NTFS in read write mode

This is probably one of the first things you have to learn about Mac.... it took me one month of Mac usage to actually figure it out.


my USB drive is called 2TBSMALL:

diskutil info /Volumes/2TBSMALL | grep UUID 
#(the result for me is 1B5A8C6C-616A-4537-B0F2-B9D13ADE305B)

sudo nano /etc/fstab
#(enter this line, then CTRL-O and CTRL-X)
UUID=1B5A8C6C-616A-4537-B0F2-B9D13ADE305B none ntfs rw,auto,nobrowse

#eject the Drive and insert it again. It should NOT appear in finder - don't panic it's in /Volumes.

#run the Disk Utility and make sure the drive is in R/W mode

#then create a link on the Desktop 
sudo ln -s /Volumes/DRIVENAME ~/Desktop/DRIVENAME
#type fn-F11 to show desktop

If this doesn't work, from terminal run "dmesg", in my logs I could find this error:

ntfs_system_inodes_get(): $LogFile is not clean. Mount in Windows.

so I put the Drive in Windows, run the "fix errors" utility, done a safe eject and opla', in Mac it worked!

PS all this obviously STINKS big time, and it proves that Apple and Microsoft are just 2 Corporations who make the planet a miserable place to live. We would be much better off in a planet without Masters and without Slaves, and possibly without Gods and without States - and of course without Armies.

PPS another RANT: how can someone make a keyboard without curly and square braces and pipe sign? Well, Apple did it! Brilliant! IQ below 80...

Thursday, March 5, 2015

Installing Weblogic 11.1.6 with Java 7 in a few seconds

(maybe the few seconds is an overstatement....)

With the Biemond way (thank you Biemond you are a God):

install git and vagrant

Download jdk-7u55-linux-x64.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u55-oth-JPR

Download UnlimitedJCEPolicyJDK7.zip (JCE Java Cryptographic Extensions) here http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Download wls1036_generic.jar from http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html (choose "Oracle WebLogic Server 11gR1 (10.3.6) + Coherence - Package Installer" for "Additional Platforms", where it says "File1 1 GB" )

Download from https://support.oracle.com the p17572726_1036_Generic.zip "Patch 17572726: SU Patch [FCX7]: WLS PATCH SET UPDATE" https://support.oracle.com/epmos/faces/PatchDetail?requestId=16925196&_afrLoop=481943043189464&patchId=17572726&_afrWindowMode=0&_adf.ctrl-state=jhdx9weyr_233

Checkout the Biemond Vagrant from here https://github.com/biemond/biemond-orawls-vagrant (copy the http url from the "HTTPS clone URL" box)

git clone https://github.com/biemond/biemond-orawls-vagrant.git

put the downloaded jars and zips and tar.gz into /Users/edwin/software

vagrant up

It should all work. If not, use your brain.

If you don't want to use Biemond's Puppet module, but rather waste countless hours doing it manually, you can download a CentOS Appliance (OVA file)


download https://s3-eu-west-1.amazonaws.com/virtualboxes.org/CentOS7-base.ova.torrent (you can download Free Download Manager to download it)

Open VirtualBox, Import appliance, select the .ova file just downloaded

See also


Docker, what does it do actually?

I have watched a couple of scary confusing presentations https://www.youtube.com/watch?feature=player_detailpage&v=Av2Umb6nELU and https://www.youtube.com/watch?v=Q5POuMHxW-0 without being able to understand anything. Why you guys don't stop trying to be smart weird and funny and just try to be educational.

Finally I stumbled upon this BRILLIANT presentation :

by Ken Cochrane https://github.com/kencochrane (thank you Ken, you are a God!) which shows you in a very effective way what Docker does and how to use it.

You should also go through the very nice hands-on tutorial https://www.docker.com/tryit/

I am not sure yet how to take advantage of Docker, but surely it's a very impressive technology!

More reading here on the internal working of Docker http://stackoverflow.com/questions/16047306/how-is-docker-io-different-from-a-normal-virtual-machine

Wednesday, March 4, 2015

Learning Oracle VM Server (OVS)

I am learning about Oracle VM server. The whole documentation is here http://docs.oracle.com/cd/E50245_01/index.html
But first read http://docs.oracle.com/cd/E50245_01/E50249/html/index.html Introduction to Oracle Virtualization and http://docs.oracle.com/cd/E50245_01/E50250/html/index.html Oracle VM Manager documentation, it's really well written.
There is even a certification https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=654&get_params=p_id:127 with the usual brain dumps http://certifyguide.com/exam/1z0-590/
XEN has a really wonderful wiki, explaining what is Dom0 http://wiki.xen.org/wiki/Dom0

Great presentation (a bit outdated... 2011) of the product here here with Kurt Hackel

Installing Oracle VM Server on.... Oracle VirtualBox!

Download V46550-01 from http://edelivery.oracle.com/oraclevm

choose Oracle VM and x86_64 bit

Open Oracle VirtualBox, create a new VM , call it "oraclevmserver" , Type = Other, version = Other/unknown (64bit), base memory 8 GB, "do not add a virtual drive", remove all the Storage Controllers and add CD/DVD device and point it to the downloaded ISO file. (see here http://oracle-base.com/articles/vm/virtualbox-creating-a-new-vm.php for some more hints). Add also an hard disk "oraclevmsserverdisk" with 12 GB , type VDI, dynamically allocated storage.

hit Enter to start installation; skip media test

choose language and keyboard. When it tells you that the VBOX disk is defective, just reinitialize it from scratch using all available space.

select DHCP (NB OVS needs STATIC IP!!! FIX THIS!!! )

at the end of the (hopefully) successful installation, just reboot (don't worry about the ISO DVD, it was automatically ejected by the anaconda installer I believe). You should get this happy and peaceful screen:

NEXT STEP: do the same operation but assign a static IP and a hostname

PS just discovered that Oracle gives away prebuilt VMs with Oracle VM Server and Manager: http://www.oracle.com/technetwork/server-storage/vm/template-1482544.html

Oracle Unbreakable Linux vs Oracle Enterprise Linux vs Oracle Linux

I was really confused by all these product names... how are they different, and what is what?
It turns out that the reality is much simpler: the "Enterprise" qualifier is no longer used - just say "Oracle Linux" - although in the documentation the term "Oracle Enterprise Linux" is still widely used.
Also, the "Unbreakable" qualifier (honestly, a bit bumptious and uppish) is used only to refer to the KERNEL, and not to the OS itself...
Please refer to the following articles for more details: