Friday 13 March 2015

Oracle Linux 6: Remove Obsolete Kernels

I have several Virtual Machines for our Virtual Course Environments. From time to time, I do an upgrade of the Oracle Linux version. But with every upgrade, Oracle Linux leaves the old kernel files. And in time the root disk is cluttered up. So I want to remove the old kernels. With a little googling, I came up with a discussion thread in Oracle Communities: Oracle Linux Remove Old Kernels (Archived by now).

To me this was quite helpfull. Let me sum up the steps here.

1. List the kernels in the boot menu

First list the kernels in the boot menu with:
#cd /boot/grub
#cat grub.conf
In my example VM this is:
[root@darlin-vce-db ~]# cd /boot/grub
[root@darlin-vce-db grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_darlinvce-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-431.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_darlinvce-lv_root rd_LVM_LV=vg_darlinvce/lv_root rd_LVM_LV=vg_darlinvce/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us-acentos nomodeset  rhgb quiet crashkernel=auto numa=off
 initrd /initramfs-2.6.32-431.el6.x86_64.img
title Oracle Linux Server (2.6.32-279.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_darlinvce-lv_root rd_LVM_LV=vg_darlinvce/lv_root rd_LVM_LV=vg_darlinvce/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us-acentos nomodeset  rhgb quiet crashkernel=auto numa=off
 initrd /initramfs-2.6.32-279.el6.x86_64.img
title Oracle Linux Server-uek (2.6.32-100.34.1.el6uek.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-100.34.1.el6uek.x86_64 ro root=/dev/mapper/vg_darlinvce-lv_root rd_LVM_LV=vg_darlinvce/lv_root rd_LVM_LV=vg_darlinvce/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us-acentos nomodeset  rhgb quiet numa=off
 initrd /initramfs-2.6.32-100.34.1.el6uek.x86_64.img
title Oracle Linux Server (2.6.32-131.0.15.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=/dev/mapper/vg_darlinvce-lv_root rd_LVM_LV=vg_darlinvce/lv_root rd_LVM_LV=vg_darlinvce/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us-acentos nomodeset crashkernel=auto rhgb quiet numa=off
 initrd /initramfs-2.6.32-131.0.15.el6.x86_64.img
The newest kernel (Oracle Linux 6 Update 5) is at the top. Apparently in my case I have the following kernels:
  • 2.6.32-431
  • 2.6.32-279
  • 2.6.32-100.34.1
  • 2.6.32-131.0.15
Let's make sure I have booted using the latest kernel:
[root@darlin-vce-db grub]# uname -r
2.6.32-431.el6.x86_64
So indeed Linux is started using the 2.6.32-431 kernel.

2. Remove obsolete kernels

Let's remove the last 3 one by one.
But before you do so, make a backup of the grub.conf, because the removal of the kernels may update your grub.conf and remove the newest kernel. Then you end up starting up a dated kernel version.

To list the kernel packages of one version:
[root@darlin-vce-db grub]# rpm -qa | grep kernel|grep 100
kernel-uek-2.6.32-100.34.1.el6uek.x86_64
kernel-uek-headers-2.6.32-100.34.1.el6uek.x86_64
kernel-uek-devel-2.6.32-100.34.1.el6uek.x86_64
kernel-uek-firmware-2.6.32-100.34.1.el6uek.noarch

Now to remove these packages use yum remove:
[root@darlin-vce-db grub]# yum remove kernel-uek-2.6.32-100.34.1.el6uek.x86_64  kernel-uek-headers-2.6.32-100.34.1.el6uek.x86_64 kernel-uek-devel-2.6.32-100.34.1.el6uek.x86_64 kernel-uek-firmware-2.6.32-100.34.1.el6uek.noarch
Loaded plugins: refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
....
Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                               Arch                    Version                                    Repository                                                            Size
=====================================================================================================================================================================================================
Removing:
 kernel-uek                                            x86_64                  2.6.32-100.34.1.el6uek                     @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                   86 M
 kernel-uek-devel                                      x86_64                  2.6.32-100.34.1.el6uek                     @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                   22 M
 kernel-uek-firmware                                   noarch                  2.6.32-100.34.1.el6uek                     @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  3.9 M
 kernel-uek-headers                                    x86_64                  2.6.32-100.34.1.el6uek                     @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  2.2 M
Removing for dependencies:
 audit-libs-devel                                      x86_64                  2.2-2.el6                                  @anaconda-OracleLinuxServer-201206261930.x86_64/6.3                   70 k
 compat-gcc-34                                         x86_64                  3.4.6-19.el6                               @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                   13 M
 compat-gcc-34-c++                                     x86_64                  3.4.6-19.el6                               @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                   84 M
 compat-gcc-34-g77                                     x86_64                  3.4.6-19.el6                               @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  5.9 M
 compat-glibc                                          x86_64                  1:2.5-46.2.0.1                             @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  6.4 M
 compat-glibc-headers                                  x86_64                  1:2.5-46.2.0.1                             @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  1.9 M
 gcc                                                   x86_64                  4.4.7-4.el6                                @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   19 M
 gcc-c++                                               x86_64                  4.4.7-4.el6                                @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   11 M
 glibc-devel                                           x86_64                  2.12-1.132.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  966 k
 glibc-headers                                         x86_64                  2.12-1.132.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  2.0 M
 libcap-ng-devel                                       x86_64                  0.6.4-3.el6_0.1                            @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                   14 k
 libcgroup                                             x86_64                  0.40.rc1-5.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  321 k
 libcgroup-devel                                       x86_64                  0.40.rc1-5.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   89 k
 libtool                                               x86_64                  2.2.6-15.5.el6                             @anaconda-OracleLinuxServer-201105261616.x86_64/6.1                  1.9 M
 oracle-rdbms-server-11gR2-preinstall                  x86_64                  1.0-7.el6                                  @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   32 k
 perl-Archive-Extract                                  x86_64                  1:0.38-136.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   52 k
 perl-CPAN                                             x86_64                  1.9402-136.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  663 k
 perl-CPANPLUS                                         x86_64                  0.88-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  767 k
 perl-ExtUtils-CBuilder                                x86_64                  1:0.27-136.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   59 k
 perl-ExtUtils-Embed                                   x86_64                  1.28-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   17 k
 perl-ExtUtils-MakeMaker                               x86_64                  6.55-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  608 k
 perl-ExtUtils-ParseXS                                 x86_64                  1:2.2003.0-136.el6                         @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   61 k
 perl-File-Fetch                                       x86_64                  0.26-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   46 k
 perl-IPC-Cmd                                          x86_64                  1:0.56-136.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   57 k
 perl-Module-Build                                     x86_64                  1:0.3500-136.el6                           @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  460 k
 perl-Test-Harness                                     x86_64                  3.17-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  399 k
 perl-Test-Simple                                      x86_64                  0.92-136.el6                               @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  184 k
 perl-core                                             x86_64                  5.10.1-136.el6                             @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  0.0  
 perl-devel                                            x86_64                  4:5.10.1-136.el6                           @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  1.8 M
 redhat-lsb                                            x86_64                  4.0-7.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  0.0  
 redhat-lsb-compat                                     x86_64                  4.0-7.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  0.0  
 redhat-lsb-core                                       x86_64                  4.0-7.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   22 k
 redhat-lsb-graphics                                   x86_64                  4.0-7.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  0.0  
 redhat-lsb-printing                                   x86_64                  4.0-7.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  0.0  
 systemtap                                             x86_64                  2.3-3.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                   46 k
 systemtap-devel                                       x86_64                  2.3-3.0.1.el6                              @anaconda-OracleLinuxServer-201311252058.x86_64/6.5                  4.9 M

Transaction Summary
=====================================================================================================================================================================================================
Remove       40 Package(s)

Installed size: 270 M
Is this ok [y/N]: y

Answer with 'y', and wait until the removal is complete.
Repeat this for the other kernels as well.

3. Edit the grub.conf and last refreshments

Edit the grub.conf and remove the entries all the removed kernels, leaving only the entry of the latest kernel:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_darlinvce-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-431.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_darlinvce-lv_root rd_LVM_LV=vg_darlinvce/lv_root rd_LVM_LV=vg_darlinvce/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us-acentos nomodeset  rhgb quiet crashkernel=auto numa=off
 initrd /initramfs-2.6.32-431.el6.x86_64.img 
For each entry the line starting with 'title Oracle Linux Server...' is the first line of the entry.
After editing the grub.conf, you can reboot the server. If you're running inside an VirtualBox image, update the Virtualbox Guest Additions. I find it convenient to backup the VBoxGuest additions disk to a folder on one of the disks. When you update the VM with a new Linux Version, the guestadditions aren't compiled with the latest kernel anymore. Then XServer might not come up again, and mounting the guestadditions disk might not work. Then it is convenient to have a copy within the VM available to do a recompile from the console.

4. Re-install kernel-dependent pacakges

I found that tools like gcc, gcc-c++, etc. are removed at removing my first kernel. You can use yum to re-install them, using yum install , eg. yum install gcc. Yum will figure out the depencencies for you. What I re-installed was:

yum install gcc gcc-c++ glibc-devel glibc-headers perl kernel-headers compat-gcc-34 compat-gcc-34-c++ compat-gcc-34-g77 compat-glibc-headers libcap-ng-devel libtool systemtap systemtap-devel
These packages were installed and needed because of Oracle Database and Fusion Middleware. Also the VirtalBox Guest Additions need some of those.

Saturday 7 March 2015

2015 OPN FMW Partner Forum: the coolest thing

This week I attended the Twentieth Oracle Partner Network Fusion Middleware Forum, this year in the Boscolo Hotel in Budapest, Hungary.

It was a great event, where a lot of subjects were covered, a lot of great people met. According to one of the product managers we were the smartest Oracle Region in the world (let's not uncover who said that...)

We've seen a lot of cool stuf. Let me try to put up a list. But it can't be anywhere near to complete.

The first day, tuesday the 3th there were some nice keynotes. With pretty interesting stuf, although it was a little dissapointing to here that Oracle's focus on BPM 12c the upcoming year or so, is on quality. Of course that's a good thing, but I concluded that it means that on the functionality side it's going to be quite silent. And that is a pity since they pushed very hard on ACM (Adaptive Case Management)  last 2 years. It means as well, I think, that ACM is not going to get in to the Process cloud for quite some time. And also that is 'not so cool', since I think ACM could be an important driver for the Process Cloud Services. Quite uncool thus.

What was very cool was the demo on Internet of Things, and the Stream Explorer. Also nice was the presentation on API catalog. Very cool, as always, was the presentation/demo on Mobile Application Framework, and Mobile Cloud Services, by Grant Roberts.

About Sub-zero-cool was the duo-hack&tation of the Rest/JSON support of 12c together with Mobile Application Framework by Lucas Jellema and Luc Bors. Great job guys.

But the coolest things weren't amongst these. Not even the presentations we aren't allowed to blog and tweet about. Not even the workshops we did that were so secret, that we were driven to the Oracle office and I can't remember how many times we were pressed not to tweet and blog about it and how many times we were told to delete the VM's afterwards.

Not even the great venue of the Bosocolo Luxury Residence:

No, to me, amongst the 2 coolest things was the run  I did on wednesday:




Which I started at the hotel, then ran right to the Donau, where there is this Island, that has an Atletics  area. Did a little round there and went back. It's about 7.5 to 8km. Unfortunately I did not time it, I think I did it in about 40 to 45 minutes.

But really the coolest thing was the final run I did today:


 The Pest-Buda-Pest run, where I crossed the Donau over the same bridge that I ran to on wednesday, then along the Donau, passing the castle and other very beautiful buildings and then cross the Donau again 2 bridges more to the south. I did this 9 km. in about 51 minutes:
My avarage heart-rate:


And the Calories I compensated on the diners:


And here my euforic proof that I really did the run:
 This was really the greatest moment of the week. In one and an half hour I'm of to the airport, nothing I see of do in the next hours can compete this!

Thanks Jürgen for the great week, next year I definately bring my running shoes again.









Friday 6 March 2015

API Catalog 12c is here

You do create services right? And your service portfolio grows and grows does it? Are they used by others? And do you know what services are already there in your organization? Oh, right, you did build up a list using Excel, didn't you? Of course, that's what I would do.

Unless I had a license on Oracle Enterprise Repository. Since then I already was alowed to use API Catalog.
 
Actually, I thaught the AIA11g training several times. And one of the  parts is harvesting your services into Oracle Enterprise Manager. Where you can do impact analasis on your services. It relates xsd's, wsdl's, composites (both EBS and ABCS) and interrelates them with eachother based on the AIA taxonomy. OER supports governance from the conception of services to the use in production of them. API Catalog does not support this whole lifecycle governance, but often that is to much for a customer. I would say, to me as  a developer/architect is would be. But API Catalog would help me to build up a light weight portfolio of my services at a customer.

I recognized OER bits and pieces and API catalog indeed uses that. It allows you to do a harvesting of your services from OSB and SOASuite using (about) the same harvesting scripts that are recognized from AIA.

This week on the OPN FMW Partner Forum 2015, I learned that many things we know from AIA11g are (going to be) build in the different products like SOASuite, the API/OER suite, etc. You could compare that to how things went with Oracle Designer and Headstart for Designer.

Other products in the API suite are:
  • Oracle API Manager is an addon to Service Bus. Is a Developer portal for Oracle Service Bus.
  • Oracle API Gateway is an OEM-ed product targeted to the DMZ to manage access to your services/API's and also has some API Management functionallity in its self.
 For now please install Catalog and harvest your services. Then you can copy and paste the descriptions from your Excel sheet or Wiki into API Catalog and in a later stage reuse them in API Manager. Then throw away your Excelsheet....