Monday, September 3, 2018
My Book
If I were going to write a book in 2018 it would be about microservices and containerization and patterns for success with them. I foresee about 30 chapters and north of 800 pages. Daunting, but someone has to write it.
Tuesday, August 14, 2018
New MacBook Pro
So they gave me a new MacBook Pro
It's been a disaster. First off, it's got a 13 inch screen. That means my screen protector won't fit and needs to be cut down to size. I'll get there eventually, IF I decide to keep the thing.
It's not substantially better than my 3 year old Mac for the stuff I do, and in some ways it's just more difficult.
I make videos, and I record music. I write software and I create demos. I have nearly 450 GB of stuff on my old machine and I doubt they'll let me keep both of them.
We're using CrashPlan as a backup system. And I think it's swell if you only need to restore file or folder here or there. But we're talking about migrating everything to a new machine. Well, that ain't gonna work. CrashPlan tells me something like 53 days to get stuff moved.
I could go on and on. Eight Do-Overs, wiping the disk and starting over. Clashing usernames. Backup restores overwriting certificates. And did I mention 53 days to restore from CrashPlan?
Happily after I learned that the new mac didn't have enough cores to run VMWare the way we have it set up, the company replaced the 13 inch with a 15 inch Pro, which has 6 physical core = 12 virtual. So This should be fine.
Here's my new plan. Migrate Nothing. Just install applications and when I need a document from the old machine I'll airdrop it over to the new one. Use AirDrop to move files over when I need them. If I don't need them in 30 days, I won't migrate them at all.
That said, there are a ton of applications to install.
x KeepassX - copy the databases and keys... should I leave these in the cloud? Just the databases, not the keys. And they can all be copied to the new machine using AirDrop. First things first.
x Firefox - Setup sync
x Chrome - Login, Sync, GMail - Sync didn't work during one of the tries and actually deleted bookmarks on the old machine. Luckily I had a backup.
x MS-Office
x Reaper - where did I put that key file again?
x Sublime Text - same... ok, I remember where the key file is.
x node.js -
x java 8 -
x eclipse - and the node editing tools, but which node editing tools?
- I might skip eclipse. I have a hunch that Sublime can do almost everything I want.
- nah... I went ahead and downloaded eclipse. I had to work to hard to make a jar file doing it by hand, which only goes to demonstrate my sadly verdigrised skills.
x docker and kubernetes and all that related stuff for ICP
x gotta have brew before we can have kubectl
all the BlueMix CLI stuff - that can wait, we never use it.
x git
x Ah Camtasia, SnagIt and VMWare
- and then the two humongous VMWare Images that I normally use, those will be AirDropped.
node-red? do we still care?
How about ODM?
x WebEx Plugin - just start webex and let it do its thing.
x Apera Client
x MuseScore
x all the VSTs and their licensing vaults
and iLok for those SoundToys VSTs
x HandBrake to compress the video files that Camtasia creates
x Gimp
x Box Tools
Print drivers? Those just seemed to work.
---
I think the thing that really snagged me was how many documents I had stored locally, and how many of those really need to be in the cloud somewhere. But then what happens when the cloud goes down? If my google password is in a vault on the google cloud and I can't get to it ... well there's a snake eating its own tail.
---
Also, the AirDrop strategy has failed me. I copied by pictures from the old machine to the new machine. The Pictures folder has special behavior apparently, and I broke it. So I have to figure that out.
The good folks at Mac Rumors pointed me to the Migration Assistant. We'll see if that helps.
---
The Migration Assistant does copy your files, if you don't have too many of them, and it apparently copies them to a new userID, which doesn't do me any good. Since it put a ton of files somewhere I cannot access them I've decided to wipe the disk again and start over.
This time however, I'm not going to encrypt the disk, since corporate policy installs yet another disk encryptor on top of what I've installed. They don't tell you this in the how to install your mac forum. Just learning by doing unimportant stuff.
It's been a disaster. First off, it's got a 13 inch screen. That means my screen protector won't fit and needs to be cut down to size. I'll get there eventually, IF I decide to keep the thing.
It's not substantially better than my 3 year old Mac for the stuff I do, and in some ways it's just more difficult.
I make videos, and I record music. I write software and I create demos. I have nearly 450 GB of stuff on my old machine and I doubt they'll let me keep both of them.
We're using CrashPlan as a backup system. And I think it's swell if you only need to restore file or folder here or there. But we're talking about migrating everything to a new machine. Well, that ain't gonna work. CrashPlan tells me something like 53 days to get stuff moved.
I could go on and on. Eight Do-Overs, wiping the disk and starting over. Clashing usernames. Backup restores overwriting certificates. And did I mention 53 days to restore from CrashPlan?
Happily after I learned that the new mac didn't have enough cores to run VMWare the way we have it set up, the company replaced the 13 inch with a 15 inch Pro, which has 6 physical core = 12 virtual. So This should be fine.
Here's my new plan. Migrate Nothing. Just install applications and when I need a document from the old machine I'll airdrop it over to the new one. Use AirDrop to move files over when I need them. If I don't need them in 30 days, I won't migrate them at all.
That said, there are a ton of applications to install.
x KeepassX - copy the databases and keys... should I leave these in the cloud? Just the databases, not the keys. And they can all be copied to the new machine using AirDrop. First things first.
x Firefox - Setup sync
x Chrome - Login, Sync, GMail - Sync didn't work during one of the tries and actually deleted bookmarks on the old machine. Luckily I had a backup.
x MS-Office
x Reaper - where did I put that key file again?
x Sublime Text - same... ok, I remember where the key file is.
x node.js -
x java 8 -
x eclipse - and the node editing tools, but which node editing tools?
- I might skip eclipse. I have a hunch that Sublime can do almost everything I want.
- nah... I went ahead and downloaded eclipse. I had to work to hard to make a jar file doing it by hand, which only goes to demonstrate my sadly verdigrised skills.
x docker and kubernetes and all that related stuff for ICP
x gotta have brew before we can have kubectl
all the BlueMix CLI stuff - that can wait, we never use it.
x git
x Ah Camtasia, SnagIt and VMWare
- and then the two humongous VMWare Images that I normally use, those will be AirDropped.
node-red? do we still care?
How about ODM?
x WebEx Plugin - just start webex and let it do its thing.
x Apera Client
x MuseScore
x all the VSTs and their licensing vaults
and iLok for those SoundToys VSTs
x HandBrake to compress the video files that Camtasia creates
x Gimp
x Box Tools
Print drivers? Those just seemed to work.
---
I think the thing that really snagged me was how many documents I had stored locally, and how many of those really need to be in the cloud somewhere. But then what happens when the cloud goes down? If my google password is in a vault on the google cloud and I can't get to it ... well there's a snake eating its own tail.
---
Also, the AirDrop strategy has failed me. I copied by pictures from the old machine to the new machine. The Pictures folder has special behavior apparently, and I broke it. So I have to figure that out.
The good folks at Mac Rumors pointed me to the Migration Assistant. We'll see if that helps.
---
The Migration Assistant does copy your files, if you don't have too many of them, and it apparently copies them to a new userID, which doesn't do me any good. Since it put a ton of files somewhere I cannot access them I've decided to wipe the disk again and start over.
This time however, I'm not going to encrypt the disk, since corporate policy installs yet another disk encryptor on top of what I've installed. They don't tell you this in the how to install your mac forum. Just learning by doing unimportant stuff.
Tuesday, June 5, 2018
Tuesday, May 29, 2018
Docker Cruft
I've been working on a docker project this weekend. I toy around with docker, and sometimes I have to expound its benefits to customers.
So I have this pet project. I call it subtitler and subtitler-ui. One is a node-red implementation of a file streamer that talks to Watson and gets back speech to text results and formats it into either SRT or VTT format. The second is a UI to drive the backend node-red stuff.
Over the weekend I wanted to dockerize them.
That wasn't too bad. But there were dozens of builds and false starts. I was actually trying to do something that is considered a bad practice in Docker, which is to have both processes running in a single container. I didn't get very far with that, so I left it as two containers.
What amazed me this morning when I went to push to docker hub is how much cruft there was in my docker system. Dozens and dozens of image files.
There must be a simple way to manage these and clear them out. Do I even need them? I don't know. I should read up more I guess.
So I have this pet project. I call it subtitler and subtitler-ui. One is a node-red implementation of a file streamer that talks to Watson and gets back speech to text results and formats it into either SRT or VTT format. The second is a UI to drive the backend node-red stuff.
Over the weekend I wanted to dockerize them.
That wasn't too bad. But there were dozens of builds and false starts. I was actually trying to do something that is considered a bad practice in Docker, which is to have both processes running in a single container. I didn't get very far with that, so I left it as two containers.
What amazed me this morning when I went to push to docker hub is how much cruft there was in my docker system. Dozens and dozens of image files.
There must be a simple way to manage these and clear them out. Do I even need them? I don't know. I should read up more I guess.
Tuesday, December 12, 2017
Docker for Everyone
Why Docker?
So back when I was a kid, back in the 90's we used to install our software applications directly onto the iron. That is, you'd get some hardware. You'd install the OS. You'd install the App Server and Database, and then you'd install your application into the app server and configure the app server to talk to the database. Installing the application was fairly straight forward. For JEE applications you just copied your EAR or WAR or JAR file into a folder and that was kind of that.
The downside of this, is if you wanted to run on more than one server, you had to do all of this stuff a second, and a third and an n'th time... depending on how many servers you wanted.
The other downside of this is that you could have a big expensive piece of iron that only used 5% of its capacity for this one program.
To recap:
- Setting up an environment took days if that's all you were working on.
- Deploying apps could be as simple as copying a file to that environment, and restarting the servers.
- Cloning the environment for redeployment was arduous and error prone.
- CI and CD tooling had not been invented yet, but would have been really tough.
--
So, along came virtualization technologies (unless you are an IBMer and had been using virtualization on the mainframe since the 1960s). And this solved the first problem because now all you had to do was copy these VM files to a new machine and it just worked. So much faster than installing all the app servers and databases and whatnot.
The other thing VMs did was that you could run multiple VMs on a single hardware box. So you could get better utilization of the hardware. That meant smaller data centers, less power requirements. Good stuff.
- Setting up an environment was easy because you could copy a preexisting template.
- Deploying apps could be as simple as copying a file to that environment, and restarting the servers.
- Cloning the environment was easier, although there could be complications with fixed resources. But more importantly environments could be very large, moving them required lots of storage and lots of network bandwidth.
--
Then in 2006 AWS said, "Hey, there's this cloud we've built from our leftover computing resources does anyone want to use it?" And the world said, "YES".
The dynamics of the cloud changed a lot of our programming paradigms. Think about this. In the "old" days if you wanted set up a new app environment, maybe all you had to do was copy the VM to a new server. But VMs tend to be HUGE. It's one thing to copy them across a corporate network. But if you ever tried to copy a VM up to the cloud you know that it could take days. At least it used to take days. But still very large and a long time. At any rate, not very agile.
A lot of clouds still support running VMs because it's a very solid way to do things. But it takes forever make a change and upload a new VM. Also, moving or lifting and shifting workloads to the cloud got really time consuming and consumed a lot of bandwidth.
As a result of all this a lot of people started building cloud native applications. That is, apps that were built in the cloud as opposed to built on-site and moved to the cloud.
--
So among the many. many paradigms that came about changing the way we deploy things to the cloud, one of them was Docker.
Docker is neat because a docker container is really about the smallest possible deployable thing you can have. Much smaller than an entire VM. And each docker container is isolated and highly scalable.
- Setting up an environment was easy because you could copy preexisting templates for small pieces, a container for the appserver, another for the database, etc.
- Deploying apps got a little more complicated because you had to build a container of your app deployed to an app server. But DevOps tooling did most of that heavy lifting once you set it up.
- Cloning environments became easy because the components were small and easy to move to the cloud.
So back when I was a kid, back in the 90's we used to install our software applications directly onto the iron. That is, you'd get some hardware. You'd install the OS. You'd install the App Server and Database, and then you'd install your application into the app server and configure the app server to talk to the database. Installing the application was fairly straight forward. For JEE applications you just copied your EAR or WAR or JAR file into a folder and that was kind of that.
The downside of this, is if you wanted to run on more than one server, you had to do all of this stuff a second, and a third and an n'th time... depending on how many servers you wanted.
The other downside of this is that you could have a big expensive piece of iron that only used 5% of its capacity for this one program.
To recap:
- Setting up an environment took days if that's all you were working on.
- Deploying apps could be as simple as copying a file to that environment, and restarting the servers.
- Cloning the environment for redeployment was arduous and error prone.
- CI and CD tooling had not been invented yet, but would have been really tough.
So, along came virtualization technologies (unless you are an IBMer and had been using virtualization on the mainframe since the 1960s). And this solved the first problem because now all you had to do was copy these VM files to a new machine and it just worked. So much faster than installing all the app servers and databases and whatnot.
The other thing VMs did was that you could run multiple VMs on a single hardware box. So you could get better utilization of the hardware. That meant smaller data centers, less power requirements. Good stuff.
- Setting up an environment was easy because you could copy a preexisting template.
- Deploying apps could be as simple as copying a file to that environment, and restarting the servers.
- Cloning the environment was easier, although there could be complications with fixed resources. But more importantly environments could be very large, moving them required lots of storage and lots of network bandwidth.
- CI and CD tooling was just coming into play, being able to spin up dev/test environments on the fly became a thing.
Then in 2006 AWS said, "Hey, there's this cloud we've built from our leftover computing resources does anyone want to use it?" And the world said, "YES".
The dynamics of the cloud changed a lot of our programming paradigms. Think about this. In the "old" days if you wanted set up a new app environment, maybe all you had to do was copy the VM to a new server. But VMs tend to be HUGE. It's one thing to copy them across a corporate network. But if you ever tried to copy a VM up to the cloud you know that it could take days. At least it used to take days. But still very large and a long time. At any rate, not very agile.
A lot of clouds still support running VMs because it's a very solid way to do things. But it takes forever make a change and upload a new VM. Also, moving or lifting and shifting workloads to the cloud got really time consuming and consumed a lot of bandwidth.
As a result of all this a lot of people started building cloud native applications. That is, apps that were built in the cloud as opposed to built on-site and moved to the cloud.
--
So among the many. many paradigms that came about changing the way we deploy things to the cloud, one of them was Docker.
Docker is neat because a docker container is really about the smallest possible deployable thing you can have. Much smaller than an entire VM. And each docker container is isolated and highly scalable.
- Setting up an environment was easy because you could copy preexisting templates for small pieces, a container for the appserver, another for the database, etc.
- Deploying apps got a little more complicated because you had to build a container of your app deployed to an app server. But DevOps tooling did most of that heavy lifting once you set it up.
- Cloning environments became easy because the components were small and easy to move to the cloud.
--
So today, if we want a "Run Anywhere" cloud solution Docker can be a good choice. It's small, lightweight, and portable across Linux platforms. It can require a substantial retooling of your devops and deployment scripts, but once that should be a one time cost.
Thursday, January 19, 2017
Adventures in Raspberry Pi
I got my pi3 and the starter kit including a 16gb microSD card with NOOBS installed. I hooked it up to my home TV and let it install Raspbian. Then I set up the locale, enabled SSH, enabled VNC, and set a new password, all using sudo raspi-config. And then I shut it down with a sudo halt -h and walked it over to my office where the router lives.
Now it's wired to my home router (the cable didn't reach to the living room) and I can ssh into it from my laptop. First I look at the router config to see which IP address it got assigned. In this case 192.168.1.25
I want to generate a key for ssh with this information:
ssh-keygen -R 192.168.1.25
And now ssh in using ssh 192.168.1.25 -i pi
And now ssh in using ssh 192.168.1.25 -i pi
Now it's wired to my home router (the cable didn't reach to the living room) and I can ssh into it from my laptop. First I look at the router config to see which IP address it got assigned. In this case 192.168.1.25
I want to generate a key for ssh with this information:
ssh-keygen -R 192.168.1.25
And now ssh in using ssh 192.168.1.25 -i pi
The authenticity of host '192.168.1.25 (192.168.1.25)' can't be established.
ECDSA key fingerprint is SHA256:3F54ujxVlzKIv6JwQ19/iD3gosKW93Fkdtk+8GiEqEw.
Are you sure you want to continue connecting (yes/no)? yes
And now ssh in using ssh 192.168.1.25 -i pi
And check that the pi can see the router using a ping command:
Update the software by running
pi@raspberrypi:~ $ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.403 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.353 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.366 ms
Update the software by running
sudo apt-get update
sudo apt-get upgrade
sudo reboot
Download a VNC and have it connect to the pi3 on the same address 192.168.1.25
Let's try to get wireless working. Sadly I have a very old router that only supports WEP. So this part is not going to work. I'll disable WIFI for now by entering the following line into the /etc/rc.local file
ifconfig wlan0 down
I'm going to let that run overnight and see if anything happens with the ping ability to hit the router. The problem I've been having is that after I install pi-hole, and some time passes, it seems to stop working.
I'll pick this up around noon tomorrow
---
Now I'll install pi-hole, going to the pi-hole site for easy instructions.
Friday, December 23, 2016
Starting again on a Mac
I've been using a Mac for a month or more, but mainly for non-coding work. I still have a small number of windows servers set up in the cloud somewhere that host all my eclipse based tools and heavyweight java runtimes.
I took a train from Pittsburgh to NYC yesterday. 9 hours gave me time to digest a most of Azat Mardan's Practical Node.js book. Also downloaded Kyle Simpson's excellent "You Don't Know JS" series.
So this afternoon I was just getting started setting up for dev on a Mac. Installed Sublime Text. Installed git, node.js and npm. Installed node-red. Went up to Bluemix and downloaded the bluemix and CF command line tools. Did a git push of projects from my old Windows box, and cloned the ones that made sense do my Mac.
I have a couple goals. 1) Build a UI for my HL7 project and then use API Connect to define and manage the connections to the other parts of that project. 2) Start to investigate replacing BPM UI's with REST based UI's built with some best of breed tooling. 3) Reorganize the Sumo project.
--
JQuery and JQuery UI
I took a train from Pittsburgh to NYC yesterday. 9 hours gave me time to digest a most of Azat Mardan's Practical Node.js book. Also downloaded Kyle Simpson's excellent "You Don't Know JS" series.
I have a couple goals. 1) Build a UI for my HL7 project and then use API Connect to define and manage the connections to the other parts of that project. 2) Start to investigate replacing BPM UI's with REST based UI's built with some best of breed tooling. 3) Reorganize the Sumo project.
--
JQuery and JQuery UI
Thursday, October 6, 2016
Getting to Docker and IBM Containers on Bluemix
Getting to Docker and then IBM Containers on Bluemix
Just brief notes so I can do it a second time. Posted here for you.
Create an account on Docker Hub.
https://hub.docker.com
Read up on docker while you're there.
You need Linux. Although you can do a lot of this on Windows/Mac I guess too.
In hindsight - I only needed linux because I was building a linux app that I then moved into a docker image.
If you don't have linux download VirutalBox and install it.
Then download the ubuntu iso file. http://www.ubuntu.com/download/desktop
Create an ubuntu image on VirtualBox
- New.. type=Linux, Version=Unbuntu
- I had to drop into expert mode and set my disk size to 10GB. The Guest Additions (see below) take up space, but they're useful.
- Maybe set memory to 3GB
- it will ask you the location of your ubuntu.iso file.
- When Ubuntu starts click on the devices menu, and install guest additions. This is what makes shared clipboard work.
later on...
- In VirtualBox settings/general/advanced set share to clipboard = bidirectional
- in VirtualBox settings/network maybe set to bridged adapter if you plan on hitting a docker webservice from your host machine.
In Ubuntu
open a commmand window (CTRL ALT T)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker <username>
logout and then login again
At this point you can follow the excellent docker tutorials on docker.com
They will talk you through building a Docker image.
The mistake I made when I built mine was in the FROM clause in the Dockerfile. BlueMix only supports certain OSs. I had Alpine:3.4 in my FROM clause. I changed it to Ubuntu:16.04 and my project sprang to life on Bluemix. Knowing this will keep you out of trouble if your goal is to push to Bluemix. Docker itself has more options than bluemix in this regard.
After reading up and creating your Dockerfile
docker build -t <mynamespace/myappname> . <-- this will build your docker image. DO NOT MISS the period at the end
docker run -P <mynamespace/myappname> <-- the -P tells it to open ports that you've EXPOSE'd in your Dockerfile config
Push to docker hub and share
docker login <-- gets you to your docker hub
docker push <mynamespace/myappname>
Congratulations! You've built and shared a docker image
Push to IBM Containers on Bluemix
Still in Ubuntu
Open a browser and go to https://github.com/cloudfoundry/cli/releases
Select the CF CLI of your choice. If you're following the unbuntu thread here, just grab the Debian 64 bit.
Install the IBM Container plugin to CF
cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64
Login to Bluemix via CF
cf login -a api.ng.bluemix.net
cf ic init
cf ic namespace <-- remember your namespace
Push your docker image to bluemix from your dockerhub
cf ic cpi namespace/program registry.ng.bluemix.net/namespace/program:new
From any machine:
Configuring your docker image on Bluemix
Open a browser
Login to Bluemix
Go to Catalog
Go to Compute
Go to Containers
You should see your image listed. It should have a green checkbox next to it. If not, there's a problem and you can't go further.
Click on your image to configure a container.
Give it a name, use the smallest size possible, probably pico, request a public IP or not, wait for it to launch and start up.
Congratulations! You've built a docker container and pushed it to IBM Containers on Bluemix!
Just brief notes so I can do it a second time. Posted here for you.
Create an account on Docker Hub.
https://hub.docker.com
Read up on docker while you're there.
You need Linux. Although you can do a lot of this on Windows/Mac I guess too.
In hindsight - I only needed linux because I was building a linux app that I then moved into a docker image.
If you don't have linux download VirutalBox and install it.
Then download the ubuntu iso file. http://www.ubuntu.com/download/desktop
Create an ubuntu image on VirtualBox
- New.. type=Linux, Version=Unbuntu
- I had to drop into expert mode and set my disk size to 10GB. The Guest Additions (see below) take up space, but they're useful.
- Maybe set memory to 3GB
- it will ask you the location of your ubuntu.iso file.
- When Ubuntu starts click on the devices menu, and install guest additions. This is what makes shared clipboard work.
later on...
- In VirtualBox settings/general/advanced set share to clipboard = bidirectional
- in VirtualBox settings/network maybe set to bridged adapter if you plan on hitting a docker webservice from your host machine.
In Ubuntu
open a commmand window (CTRL ALT T)
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker <username>
logout and then login again
At this point you can follow the excellent docker tutorials on docker.com
They will talk you through building a Docker image.
The mistake I made when I built mine was in the FROM clause in the Dockerfile. BlueMix only supports certain OSs. I had Alpine:3.4 in my FROM clause. I changed it to Ubuntu:16.04 and my project sprang to life on Bluemix. Knowing this will keep you out of trouble if your goal is to push to Bluemix. Docker itself has more options than bluemix in this regard.
After reading up and creating your Dockerfile
docker build -t <mynamespace/myappname> . <-- this will build your docker image. DO NOT MISS the period at the end
docker run -P <mynamespace/myappname> <-- the -P tells it to open ports that you've EXPOSE'd in your Dockerfile config
Push to docker hub and share
docker login <-- gets you to your docker hub
docker push <mynamespace/myappname>
Congratulations! You've built and shared a docker image
Push to IBM Containers on Bluemix
Still in Ubuntu
Open a browser and go to https://github.com/cloudfoundry/cli/releases
Select the CF CLI of your choice. If you're following the unbuntu thread here, just grab the Debian 64 bit.
Install the IBM Container plugin to CF
cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64
Login to Bluemix via CF
cf login -a api.ng.bluemix.net
cf ic init
cf ic namespace <-- remember your namespace
Push your docker image to bluemix from your dockerhub
cf ic cpi namespace/program registry.ng.bluemix.net/namespace/program:new
From any machine:
Configuring your docker image on Bluemix
Open a browser
Login to Bluemix
Go to Catalog
Go to Compute
Go to Containers
You should see your image listed. It should have a green checkbox next to it. If not, there's a problem and you can't go further.
Click on your image to configure a container.
Give it a name, use the smallest size possible, probably pico, request a public IP or not, wait for it to launch and start up.
Congratulations! You've built a docker container and pushed it to IBM Containers on Bluemix!
Sunday, July 10, 2016
Node.js - First Impressions
Well, I like this node.js. I've done a small number of interesting project, and they came together faster than if I were going to do them in Java. The learning curve is pretty easy, simpler than JEE. I don't think that's a fair comparison though. And things run as soon as you finish typing, so there's no painful compile and packaging and deployment phase.
I haven't done much with it. I wrote a drone controller with some simple MQTT, some REST calls, some AJAX handers, a tiny web app. Enough that I think this is worth investing more time in. I've dabbled in Node-Red, which is a kind of visual node.js, although they tell you it's really for connecting things. Maybe that's it's sweet spot.
The only down side I see to node.js on Windows is that getting anything more complicated than what I've already done to work on a Windows machine requires some version of the Microsoft Visual C++ compiler in order for one of the modules, called gyp, to work. StackOverflow is loaded with posts from people who simply could not get it working. And I'm no better. I've tried just about everything to get gyp to work, including several days of downloading and installing multiple gigabytes worth various versions of Visual Studio. I'm beginning to think node.js might be the thing that turns me into a Linux guy.
Node-Red is a nice visual tool for stringing together node.js modules. And if you stick to the prewritten nodes you're fine. If you need to start writing your own Node-Red nodes, then give it some thought. Maybe you're better off in node.js. I quickly tested the limits of Node-Red when I wanted to implement a callback, which is a trivial thing in node.js
---
Followup: What I had to do was
1) Install Visual Studio C++ Community Edition
2) npm config set msvs_version 2015
3) npm -g install npm@next
I think that's all I did, and now it seems fine.
I haven't done much with it. I wrote a drone controller with some simple MQTT, some REST calls, some AJAX handers, a tiny web app. Enough that I think this is worth investing more time in. I've dabbled in Node-Red, which is a kind of visual node.js, although they tell you it's really for connecting things. Maybe that's it's sweet spot.
The only down side I see to node.js on Windows is that getting anything more complicated than what I've already done to work on a Windows machine requires some version of the Microsoft Visual C++ compiler in order for one of the modules, called gyp, to work. StackOverflow is loaded with posts from people who simply could not get it working. And I'm no better. I've tried just about everything to get gyp to work, including several days of downloading and installing multiple gigabytes worth various versions of Visual Studio. I'm beginning to think node.js might be the thing that turns me into a Linux guy.
Node-Red is a nice visual tool for stringing together node.js modules. And if you stick to the prewritten nodes you're fine. If you need to start writing your own Node-Red nodes, then give it some thought. Maybe you're better off in node.js. I quickly tested the limits of Node-Red when I wanted to implement a callback, which is a trivial thing in node.js
---
Followup: What I had to do was
1) Install Visual Studio C++ Community Edition
2) npm config set msvs_version 2015
3) npm -g install npm@next
I think that's all I did, and now it seems fine.
Wednesday, May 4, 2016
Working with Bluemix
This Developer Hat article is not really about
coding. It's more about how to easily use Bluemix to get started, and then build,
deploy and run a Java application in the cloud. For me, this would have been a fairly trivial exercise if I were developing a WAS app on my desktop. But I imagined getting it deployed to the cloud was going to be hard. I was wrong.
So today I wanted to write a simple app in Java, only because I know Java better than I know node.js or other languages. The first step, is to search Bluemix for a starting point, and since I wanted something quick and dirty I just I started with a simple WAS Liberty Profile and a simple servlet.
Bluemix guides you pretty well, explaining how to download your sample code as well as the CF and Bluemix command line utilities. I installed the utilities, and unzipped the sample code to my workspace. Even though I already have umpteen copies of Eclipse sitting around, Bluemix tells me I will need the Mars version and some add-ons, IBM Eclipse Tools for Bluemix and Liberty profile V8.5.5.5 (or later) runtime
I already have Liberty up and running for some other projects I'm working on, so I skipped that one. And just pulled down Mars and the Tools for Bluemix.
Opened the new Eclipse, Import Existing Projects and pointed at the sample code I pulled from Bluemix. I found the sample servlet class. Made my changes. Verified the descriptor. Saved the WAR file.
I had to edit the YML file. It tells CF how to build and deploy, and since I changed my servlet WAR file name, that had to go into the YML file. After that I followed the instructions on Bluemix on how to use CF to upload. A few minutes later I have a nice little servlet running on Bluemix. I'm happy.
So today I wanted to write a simple app in Java, only because I know Java better than I know node.js or other languages. The first step, is to search Bluemix for a starting point, and since I wanted something quick and dirty I just I started with a simple WAS Liberty Profile and a simple servlet.
Bluemix guides you pretty well, explaining how to download your sample code as well as the CF and Bluemix command line utilities. I installed the utilities, and unzipped the sample code to my workspace. Even though I already have umpteen copies of Eclipse sitting around, Bluemix tells me I will need the Mars version and some add-ons, IBM Eclipse Tools for Bluemix and Liberty profile V8.5.5.5 (or later) runtime
I already have Liberty up and running for some other projects I'm working on, so I skipped that one. And just pulled down Mars and the Tools for Bluemix.
Opened the new Eclipse, Import Existing Projects and pointed at the sample code I pulled from Bluemix. I found the sample servlet class. Made my changes. Verified the descriptor. Saved the WAR file.
I had to edit the YML file. It tells CF how to build and deploy, and since I changed my servlet WAR file name, that had to go into the YML file. After that I followed the instructions on Bluemix on how to use CF to upload. A few minutes later I have a nice little servlet running on Bluemix. I'm happy.
Monday, March 7, 2016
Friday, March 4, 2016
Node-RED
An amazing little message broker / flow manager...
Need to learn this in 2016...
http://nodered.org/docs/getting-started/installation
The download link was broken when I did it, so I just backtracked and pulled from here:
https://nodejs.org/dist/latest-v4.x/
The install takes a couple minutes
Need to learn this in 2016...
http://nodered.org/docs/getting-started/installation
The download link was broken when I did it, so I just backtracked and pulled from here:
https://nodejs.org/dist/latest-v4.x/
The install takes a couple minutes
No-SQL
Learn CouchDB... it's what Cloudant is based on.
http://couchdb.apache.org/
JSON described arbitrary data.
MapReduce...
http://couchdb.apache.org/
JSON described arbitrary data.
MapReduce...
Tuesday, December 8, 2015
IBM BPM Constructing Undercover Agents
An undercover agent is what we would normally call a Listener. It listens for a message or a timeout, and then provides an event that can affect a process.
There are two types of UCAs, Content and Message.

A Message UCA can be implemented on a Variable or on a Service.

A UCAService is just an integration service that defines the datatypes that will be implemented by the UCA.
A Variable - I'm not sure, and I need to look into
It also has a queue name. I'm not sure why there are 4 queues to choose from.
--
A Content UCA works with an Enterprise Content Manager and raises a notification if something happens in the ECM that needs action in the Process Server.
There are two types of UCAs, Content and Message.
A Message UCA can be implemented on a Variable or on a Service.
A UCAService is just an integration service that defines the datatypes that will be implemented by the UCA.
A Variable - I'm not sure, and I need to look into
It also has a queue name. I'm not sure why there are 4 queues to choose from.
--
A Content UCA works with an Enterprise Content Manager and raises a notification if something happens in the ECM that needs action in the Process Server.
IBM BPM Outgoing Web Services
Outgoing web services are pretty easy. First define your servers in the Process App Settings page. Give it a name, and provide the WSDL. You can override the WSDL endpoint here. Remember your data mapping.

Then from within a task flow you can use a Webservice node to call the endpoint:
Then from within a task flow you can use a Webservice node to call the endpoint:
Subscribe to:
Posts (Atom)