WebSphere manage profiles interactive tool

I recently got a tip from IBM support about a friendler tool to use for creating WebSphere profiles. Previously I had used the graphical WebSphere Toolkit to create profiles on a new install but on the latest Windows Server 2019 images we were issued this tool would no longer work. It would crash with a Java error. IBM support discouraged use of this tool, instead they said to use the manageprofiles.bat command line tool. This tool is fine, however it is tedious to use because you have to enter in so many command line parameters.

IBM has a better tool called Manage Profiles Interactive. This tool provides a nice menu in the command prompt and steps you through the required and optional parameters to get your profiles created. I found this to be very easy to use and to document for the next person who has to do a server install from scratch in our environment.

Manage Profiles Interactive

I definitely recommend this tool!

Maximo custom cron

If you need to create a custom cron task for IBM Maximo using Java here is some code to get you started.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import psdi.server.SimpleCronTask;
import psdi.server.CrontaskParamInfo;
import psdi.util.MXException;
import java.rmi.RemoteException

public class MyCustomCron extends SimpleCronTask {

// You must extend SimpleCronTask and must override
// cronAction()

// Your main processing goes in cronAction()

@Override
public void cronAction(){
// Do stuff here

// How to access a parameter if you are using them
String param = super.getParamAsString("Param 1);
}

// If you want to use parameters you override getParameters()

@Override
public CronTaskParamInfo[] getParameters() throws MXException, RemoteException {
CrontakParamInfo parameters[] = new CronTaskParamInfo[2];
parameters[0] = new CrontaskParamInfo();
parameters[0].setName("Param 1");
parameters[0].setDefault("Default Value");
parameters[1].setName("Param 2");
parameters[1].setDefault("Default Value");

return parameters;
}

}



Experimenting with the vagrant-qemu-provider

Today I came across a qemu provider for Vagrant. I have a PC set up with Proxmox, however; I kind of don’t want to have this machine hooked up and running all of the time. It is very underutilized. I only use it when I have the time or interest to experiment.

Setup is easy:

1
2
brew install qemu
vagrant plugin install vagrant-qemu

And then we can try using a provided example:

1
2
vagrant init ppggff/centos-7-aarch64-2009-4K
vagrant up --provider qemu

Vagrant will start setting things up and you will be prompted for a username and password for SMB.

At this point you will probably get an error if you are on macOS complaining about an authentication failure for SMB. All you need to do is set up SMB File Sharing for macOS if you haven’t done so already. HashiCorp has a note on it here.

Once the qemu VM has been started up by Vagrant you can connect to it with vagrant ssh

Your home directory on your host will be mapped to /vagrant in the VM.

This solution seems the best for me right now on the M1 Mac. Qemu is very powerful and should even allow me to run operating systems for architectures other than ARM using Vagrant.

Diving into DevOps - Proxmox SSL

Today I learned that for self-signed certs you need to add the root CA of your server to Vagrant’s cacert.pem

On my system this file is at /opt/vagrant/embedded/cacert.pem

The certificate for Proxmox’s self-signer root is at /etc/pve/pve-root-ca.pem

Just copy the contents of pve-root-ca.pem and paste it at the bottom of cacert.pem. This should resolve issues with Vagrant and self-signed certs.

References:

https://forum.proxmox.com/threads/vagrant-proxmox-issue.36204/

Diving into DevOps - Vagrancy

Ahh yes, the everything-as-code infrastructure dream. I have been familiar with the concepts for a long time, and know the names and functions of many tools. I can create infrastructure on AWS or Azure, I can grab magic ephemeral servers from Docker, etc. I have not had any opportunity to use any of this in a professional environment. The places where I have worked are very slow to adopt new methodologies and technologies. This has posed a bit of an issue for me, because I typically learn things on the job. I like the immediate and direct application of skill to keep the world from burning down.

So, I am playing with things from a book. DevOps for The Desperate by Bradley Smith, published by the fantastic No Starch Press. The book takes you through examples with Vagrant, Ansible, Docker, and Kubernetes. It’ s a bit of a crash course.

I ran into some challenges almost immediately. The examples are written primarily from the perspective of controlling VirtualBox with Vagrant. I am using an M1 based MacBook Air, which VirtualBox does not support. The book provides examples on how to use different providers with Vagrant, cool, I’m not totally dead in the water.

1
vagrant plugin install vagrant-parallels 

This command installs the plugin which adds Parallels as a provider for Vagrant. The catch is that only Parallels Pro supports being remotely controlled. I do not currently have Parallels Pro, but I do have a Proxmox server.

1
vagrant plugin install vagrant-proxmox

This is the point I learned of Ruby dependency hell.

The original GitHub repo for vagrant-proxmox (which contains the version which is on RubyGems) appears to be abandoned. It has out-of-date dependencies which Ruby’s package manager was unable to resolve. Fortunately someone else forked this repo and have kept the dependencies more up-to-date. So all I had to do was build the gem and install.

Right…

Right?

Well, no.

First I learned the version of Ruby that Apple ships with macOS is an outdated version packaged in a Universal Binary. This post explains everything. I was getting errors from the FFI library as described. I decided to deal with this by installing the latest version of Ruby from Brew

1
brew install ruby

And then update my PATH as described in the warnings from Brew so that my terminal grabs the right Ruby

1
echo 'export PATH="/opt/homebrew/opt/ruby/bin:$PATH"' >> ~/.zshrc

So now I have the latest arm64 Ruby and it’s time to build that gem from the rakefile…

1
rake build

Which tells me…

1
2
3
“Could not find rake-10.5.0 in any of the sources

Run `bundle install` to install missing gems.”

Okay, great.

1
bundle install

Which tells me…

1
“minitest-5.14.0 requires ruby version ~> 2.2, which is incompatible with the current version, ruby 3.1.2p20”

I found a suggestion to delete Gemfile.lock, so I did and ran bundle install again.

1
2
3
4
5
6
7
8
9
“Bundler found conflicting requirements for the Ruby version:

  In Gemfile:

    Ruby

    vagrant (= 2.2.4) was resolved to 2.2.4, which depends on

      Ruby (~> 2.2, < 2.7)”

Okay, my installed version of Vagrant is 2.3.1 so maybe I just need to update the gemfile and the vagrant-proxmox.gemspec.

Success! Now to try rake build again

1
2
3
“rake aborted!

Gem::LoadError: You have already activated rake 13.0.6, but your Gemfile requires rake 10.5.0. Prepending `bundle exec` to your command may solve this.”

I updated the rake dependency in vagrant-proxmox.gemspec and it worked! I now have a gemfile!

Lets install it!

1
vagrant plugin install ./vagrant-proxmox-0.3.0.gem

Oh no I am going to implode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
“Vagrant failed to properly resolve required dependencies. These

errors can commonly be caused by misconfigured plugin installations

or transient network issues. The reported error is:

conflicting dependencies activesupport (~> 5.0) and activesupport (= 7.0.4)

  Activated activesupport-7.0.4

  which does not match conflicting dependency (~> 5.0)

  Conflicting dependency chains:

    activesupport (= 7.0.4), 7.0.4 activated

  versus:

    vagrant-proxmox (= 0.3.0), 0.3.0 activated, depends on

    activesupport (~> 5.0)

  Gems matching activesupport (~> 5.0):

    activesupport-5.2.8.1”

Yet again I updated the dependency in vagrant-proxmox.gemspec, then run bundle update, then rake build. And success!! I got the plugin to install!!

So this is my first crash course into dealing with Vagrant. From here I should be able to whip up a vagrant file to control my Proxmox server instead of VirtualBox or Parallels. I will write about this later.

My fork of vagrant-proxmox lives here: https://github.com/mikeOSX/vagrant-proxmox

References:

https://stackoverflow.com/questions/17028132/vagrant-install-plugin-from-github

https://www.ruby-lang.org/en/documentation/installation/#homebrew

https://github.com/lehn-etracker/vagrant-proxmox

https://betterprogramming.pub/ruby-on-apple-silicon-m1-macs-fb159849b2f5