Recently, I ran into an issue with a resource referece in an Urban Code Deploy (UCD) resource that did not yet exist. When the value, that doesn’t yet exist I found this a great tip (UCD Documentation).
Change from
${p:resource/value-not-yet-populated}
to
${p?:resource/value-not-yet-populated}
UCD replaces the missing value with an empty string. It saved my sanity and ease of use.
I hit an issue where I needed to Search LDAP from a machine I didn’t have access to install new RPMs on. I found this cool article on CURL and LDAP Search. I had to make some minor modifications to get it to work with a secure connection (–insecure ldaps:// and 636). I also added -v to diagnosis some connection problems.
curl "ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=)" -u "cn=user1,ou=test_org3,o=dr,DC=IBM.COM" --insecure -v
Enter host password for user 'cn=user1,ou=test_org3,o=dr,DC=IBM.COM':
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 636 (#0)
* LDAP local: LDAP Vendor = OpenLDAP ; LDAP Version = 20428
* LDAP local: ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=)
* LDAP local: trying to establish encrypted connection
DN: dc=ibm.com
objectClass: domain
objectClass: top
DN: o=dr,dc=ibm.com
objectClass: organization
objectClass: top
DN: ou=test_org3,o=dr,dc=ibm.com
objectClass: organizationalunit
objectClass: top
You can then find the userids you need quickly. I left them off the output intentionally.
If you see connected, but no results, I suggest changing to the top level of the ldap, and using this string – ldaps://127.0.0.1:636/DC=IBM.COM?cn,objectClass?sub?(objectClass=*)
I have been working on a project with IIB (IBM Integration Bus). If you are like me, you want to automate all those pesky build tasks. In IIB, I needed to package and build my project (BAR).
I investigated scripting the build using the mqsipackagebar command . I noticed at the bottom a description of using it with ANT.
I’ve used ANT in a few projects (in combination with Maven). I took the script as a starting point, added the jar files and property files (based on configuring environments without IIB). I configured the maven-antrun-plugin in order to integrate within my parent project’s maven build.
Here is some sample code for you, I hope it helps you all get started:
To setup ODBC bridge from IBM Integration Bus to Db2, download and install the ODBC bridge from the IBM Data Server Runtime Clients. It’s a 1.3 GB download, and you only need about a 40 MB file for your system.
The installation is straight forward – Click Next, and Finish.
The complexity and detailed steps are in the configuration of the ODBC Bridge and IIB.
To setup the ODBC bridge and IIB, follow these directions:
Start > Run
Type ODBC
Click on Data Sources
Click on `Configure ODBC
Enter the Connection Details
Name
Value
Username
db2admin
Password
fakepass!
IP
9.32.18.166
Port
50000
Database name
SAMPLE
Name the alias as SAMPLE
Launch a Command prompt
Start > Run
Enter cmd
Change directory to server\bin
Launch iib
C:\Program Files\IBM\IIB\10.0.0.4\server\
bin>mqsisetdbparms.exe TESTNODE_cheetah -n SAMPLE -u db2admin -p fakepass!
BIP8071I: Successful command completion.
TESTNODE_cheetah should be your local node in Eclipse.
You want to restart the Node (you can look in the lower right of your toolkit)
Right Click the Node
Select Stop, Then Start
Now, that it is setup, the steps to read the data, the ESQL is easy:
You can then send a message using the IIB tests , and confirm using your database Db2 select * from DB2ADMIN.EMPLOYEE.
The following video helps explain the OAuth 2.0 Flow and authorization. This video was originally shared as part of a prior project on Social Application Development.
Recently, I have been spending time looking at the Swagger 2.0 Specification. There XML representation and Enumerations are tricky. Here is an example of a Swagger Enumeration in YAML.
I am plugging away working with my Pi. I went back to the Ada Fruit Site, and started working on one of the tutorials from the part I purchased – https://www.adafruit.com/products/2125 I want to be able to demonstrate a simple wiring with my Pi works.
The Raspberry Pi is a device that has so many options open: You can extend the hardware. You can extend the software. I choose to tackle extending the software to start, so I can get the experience that I want setup, and running on the device. The experience I am after is the web interface to control my Raspberry Pi.
For a Java developer, I conclude that a lightweight interface hosted on a Jetty server is probably easiest. The Jetty server is a 12.9M download and 30M expanded. It’s also used frequently in devices, and why reinvent the wheel, use the approach that Industry is using. Jetty is designed for a small memory footprint. (I did consider usingTomcat Embedded, and came to the conclusion I’d probably want to many features.)
I downloaded the Jetty archive to my local user’s directory. Note, since I want to just use jetty.zip I’m renaming the output file with wget -O.
Next I launched into the sudoers root shell, and extract the Jetty archive. I decided to move it into the runtime folder, so I can have an easy place to backup from. (Remove the extra space from the .zip)
Next, I wanted to setup Jetty as a service, and check that Jetty starts
cp runtime/bin/jetty.sh /etc/init.d/jetty
echo JETTY_HOME=`pwd`/runtime > /etc/default/jetty
service jetty start
Starting Jetty: . . . OK Sun Apr 12 15:38:40 UTC 2015
service jetty stop
Stopping Jetty: OK
Next, I want to automatically start Jetty with the right runlevels
update-rc.d jetty defaults
I want to configure Jetty to run with a set userjetty.
A good check is to look at service jetty status, and confirm the settings, and then restart your Raspberry Pi. I did find that the startup time was significantly effected by the additional service. ( +25 seconds from the original 15)
Navigate to http://192.168.1.200/ (or whatever IP you have used) and confirm the page loads Jetty. If you see a 404, you’re off and ready for the next phase. (as am I) 🙂
I don’t know how I did it. I lost wireless connectivity, so I was forced to plugin my Raspberry Pi to the Lan. Once, plugged in I could find it via the DHCP table on my router.
I first checked the iwlist wlan0 scan to see if my home network was listed. The home network was listed. It was.
I checked the wpa_supplicant configuration ~ $ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf and confirmed it pointed to the right network. I also checked dmesg to see if there were any hints for wpa_supplicant.
I looked at the /etc/network/interfaces and found
iface wlan0 inet manual
which I converted to
iface wlan0 inet dhcp
Also wpa-debug-level 3 was very helpful and must proceed the wpa-roam statement in the interfaces.
Also running the wpa_supplicant command can result in some good details
In recent weeks, I haven’t revisited the Raspberry Pi – Running, Vacation, Work have conspired to keep me away from hobby project.
I’ve stared at the parts long enough, and decide to plug the Raspberry Pi base into the wired network. I plugged in the Raspberry Pi into the Power outlet, and I got the Red Light. I logged into my router to see if the Pi picked up the Raspberry Pi, and I found the IP from my routers IP reservations table. I was able to SSH into the Pi and quickly check the release version ( cat issue ) – Raspbian GNU/Linux 7 \n \l.
Headless + SSH + Version
I turned on the SSH server using sudo raspi-config and the advanced options.
The first thing I thought – Upgrade / Update to get the latest environment for the Raspberry Pi. It’s a good start – always good to be up-to-date. Per the documentation, it may be necessary to run – sudo apt-get clean.
sudo apt-get upgrade
sudo apt-get update
The raspi-config is another item that may need to be updated. The update goes out and queries for the latest raspi-config, installs and relaunches the raspi-config.
Next, I looked updated the Java version. From reading the documentation, the next versions of the Pi are going to automatically include the Java installs.
I grabbed the Pi4J project jar files. The Pi4J is an opensource project which has some great details on PINOUT and boilerplate java code to access the underlying pin readouts. I ran some quick code to get the latest snapshot installed.
Pi4J is also installed on the Sonatype repositories and developed on GitHub. Pi4J includes a script for managing updates. It’s very convenient with the Apache 2.0 License.
I was ready run a sample program – Get Sample, Compile and Run.
Eventually, I am going to get to the point where I use the diagram from Pi4j. The future efforts are going to take some time to get to – This step was the right step in the direction I want to go. BBQ Champion.