Deploying Hyperledger Composer Playground to Bluemix


Since I’ve been deploying my own variations of Composer Playground to Bluemix recently, I thought it might be worth jotting down a few notes for anyone else who wants to do the same. For example, it might be useful to have your own known level of the Playground if you’re giving demos, to avoid any new functionality from the weekly releases causing surprises.

Assuming that you already have a working Composer development environment, a Bluemix account, and the Cloud Foundry CLI installed, here’s how…

First you need the main Composer repository if you don’t have it already

git clone https://github.com/hyperledger/composer.git

 

Next, checkout the code you want to deploy. In most cases you’ll want a release that’s been through one of our weekly release parties. I’ve picked the v0.14.2 release here

cd composer
git checkout -b v0.14.2-deploy v0.14.2

 

Get lerna to do its thing

lerna bootstrap

 

Now build the playground

cd packages/composer-playground
npm run build:prod

 

Create a manifest.yml file for your application with the following content

---
  command: node cli.js
  instances: 2
  memory: 128M
  env:
    COMPOSER_CONFIG: '{"webonly":true}'

 

Log in to Bluemix (you may need to use the –sso option)

cf login

 

Push the new app

cf push <APP_NAME>

 

Enjoy!

Advertisements

Twenty years!


It hardly seems possible but I celebrated 20 years at IBM today! Here’s me foolishly thinking that I’d be staying for up to four years while I work out what I really want to do…

…and now I work just up the stairs from where that photo was taken. I’ve gone far!

Twenty years is a long time but I’ve done a few things on the way, so it hasn’t been at all dull!

MQSeries

I started out in technical support on a machine/OS I’d never heard of, asking such questions as, ‘Where is the design that describes what this command should do?’ Much mirth!
Later I worked in test when I discovered that ‘temporary’ generally means several years… maybe decades… probably still there actually… sorry!

Message Broker

…or whatever it happened to be called in any particular week.

Here I learned that a solution can take on a life of its own, becoming only tenuously related to, or even completely detached from, the problem it was meant to be solving. (If only someone had come up with design thinking sooner!)

Master Data Management

Lots of Master Data Management- almost 10 years of that alone!

Product information management, user interface generators (still gutted this one didn’t make it), model driven development, sketchy thingy, the MDM Developers community and probably more. There was definitely some virtual universe community in there as well.

Plus a really nice office with a window seat! And rats, and floods…

Watson

A tiny amount of Watson! Despite being barely a year, most of that time seemed to involve moving desks! Also the only time I really didn’t want to move on but serendipity led to…

Blockchain

An actual open source project this time, which is something completely new for me! And blockchain which I still think is one of the most interesting technologies to come along in… well, in the last 20 years!

And then

I doubt I’ll be in Hursley for another 20 years, so who knows. Having said that, I never intended to be there by now either!

It has been a privilege to have worked with so many amazing people who together made most of those 20 years an absolute pleasure. There really are too many to list without an Oscar speech but I will just mention two: Mark Phillips, who was a bit of a role model right from the start, and Patrick Wagstrom who you should jump at the chance to work with if you ever get the opportunity!

Game on for Fabric Composer


Earlier in the week I was pondering some blockchain gamification with @howard_is, inspired by a recent GameOn challenge for early professionals in IBM. After helping out with a run through of the IBM InterConnect Fabric Composer lab this morning, it seemed like a good opportunity to make a start.

BlueBlockAlone

Instead of running yet another car auction, I think it could be fun to have a demo based on a ‘business’ network for playing games. To keep some similar elements to the more common trading examples, I’m currently wondering if keeping tabs on multi-player adventure games would work. This is the model I’ve come up with so far, and it seems like something that could be hooked up to a simple text based (powered by Watson Conversation of course!) or graphical game interface.

If you’re interested in playing with your own blockchain network, fire up the Fabric Composer Playground and have a go. If you want to know more @danielselman will be at InterConnect next week, or get in touch with the community. Better yet, join in!

A little more conversation


More than a year seems to have vanished somewhere since I left MDM for new adventures with Watson. It’s even been a few months since the new Conversation service first appeared on Bluemix, along with the tools I’ve been helping to build.

If you’re interested in Watson Conversation, or just curious about what I’ve been up to for the last year, these are a few blog posts which I’ve come across which explain everything better than I could:

This thing seems pretty popular, so there are videos too!

 

There are even a few GitHub repositories:

And of course, tweets

If that’s not enough, you can ask questions on Stack Overflow and dw Answers, or join the Watson Developer Community.

If you’re building something with Watson Conversation, I’d love to hear about it! And finally, if you have any tips or tricks that you could share, I’m trying to collect some for a conversation-starter project on GitHub.

Updated: lots more links!

 

And now for something completely different


After almost 10 years in Master Data Management, most of which with the rather lovely view below, I’ve moved on to Watson.

image

I can’t quite believe I stayed in the same department that long but there were plenty of fresh challenges along the way, and no shortage of people inside and outside IBM to keep it interesting.

I’ve been particularly lucky to have had so much support building up the MDM Developers community, which should be in safe hands to continue growing in the future. (If you’re interested in MDM and haven’t attended one of the live tech talk sessions, I would definitely recommend trying one. There are recordings of all the previous events on YouTube and check out Dany’s OSGi talk for a great example.)

If my first day in Watson is anything to go by, the next challenge is going to be far from dull!

Modelling restful properties


I’ve recently been playing with Liberty and JAX-RS and in an effort to remember some of what I’ve discovered, I’m going to try and keep a few notes and post them here, probably along with a few questions. If anyone else finds them useful, or knows the answers, that’s a bonus!!

To start with Creating an efficient REST API with HTTP provides a nice overview of REST APIs and JAX-RS basics has a great simple sample application to get going with… and break!

JAXRSServiceModel_Main

Armed with the basics I thought it would be interesting to model the sample application to compare the working code with what Rational Software Architect (RSA) would generate for me. Obviously that’s not the most complex model in the world but it was good to have a few examples to follow:

(Those articles made much more sense when I’d tracked down all the likely looking JAXRS, REST and UML features in the RSA installer!)

Before generating any code, it was quite nice to get some basic API documentation out of the model. Not as fancy as using Swagger UI but certainly better than no documentation!

systemproperties-apidoc

It’s only a start but that’s all for part 1. Hopefully there’ll be more posts at some point when I get further, probably along these lines:

  • Creating an OSGi Web project and generating some code
  • Using a REST client to check it works, including a puzzling Wink problem
  • Adding some debug
  • Expanding the sample with some awkward long running processing
  • Deploying to Bluemix
  • Anything else I encounter along the way!

If you know of any good articles/books/fancy new media that would help, please leave recommendations below. If there are better ways to design REST services (Swagger looks interesting but I haven’t had a chance to investigate), please share them. And any other tips, comments, or questions of your own are also very welcome!

 

Java dumps


I recently had to debug a problem with the MDM Workbench where exporting a tailoring project for Information Server didn’t do anything. In fact it didn’t even report any problems!

Unfortunately the code in question likes to put a brave face on things and just reports that everything was OK, even when something goes wrong. This was the perfect opportunity to try out some of the diagnostic tools available for the IBM Java runtime, which I’ve been meaning to try for ages. I had an idea where the problem was likely to be but to find out for sure I started the workbench using the following command line:

eclipsec -vmargs -Xdump:system:events=catch,filter=java/lang/AbstractMethodError#com/ibm/mdm/tools/export/infoserver/job/MDMDatabaseDAO.queryDatabaseWithoutFilter

Sure enough the failing export produced a dump which I could check using the Memory Analyzer tool. You can get the IBM version via IBM Support Assistant but it’s probably easier to get the standard Eclipse Memory Analyzer and add the required IBM plugins from the DTFJ update site.

I’m fortunate enough to work in Hursley so I could pester someone who works on IBM Java runtime diagnostics, but there’s also a helpful article on developerWorks with details of how to trigger dumps, and how to run queries using OQL:

Debugging from dumps: Diagnose more than memory leaks with Memory Analyzer

So mystery solved- if you have an Oracle database and want to exporting tailoring projects for Information Server, make sure you set up the database connection with a more recent JDBC driver than the defaults.