AdroitLogic IPS, Part 3: Your First Deployment (a.k.a. “Oh boy, it’s working!”)

OK, now I have a running IPS demo. What can I possibly do with it?

In simple terms, if you can do something with an ESB, you could do the same — ​and more, in most cases — ​using IPS.

When it comes to UltraESB-X, we have a few main “lifecycle aspects”:

  • design
  • development and testing
  • deployment
  • maintenance

While UltraStudio primarily focuses on the first two, IPS  takes full responsibility of the other two — ​so that you no longer have to keep track of every single configuration file, scp or rsync your ESB installations or configurations across machines, painfully diff through directories of your multi-node deployment, or pull your hair out trying to figure out why your deployment went wrong. IPS, with its state-of-the-art deployment and configuration management, statistics, monitoring, and troubleshooting, will finally make deployment a pleasant experience for developers and sysadmins alike.

Now, wasn’t that a good piece of marketing gibberish!

Okay, it’s time to see and feel things for yourself.

In order to “feel” IPS, you need to deploy some stuff on it. A deployment simply means getting some ESBs (subject to change in the near future) up and running, with some useful integration logic deployed on each.

A minimal deployment on IPS requires:

  • a container image that defines a single ESB
  • a cluster that defines the set of ESBs
  • a project (or several of them) that defines the integration logic

The first two of these can be facilitated quite easily:

Define the traditional ips-worker container image:

  1. Navigate to Infrastructure > Container Images.
  2. Click the New button (+, on the upper right hand corner).

3. Click the Select Existing button.

4. Select the ips-worker:17.07 container image.

5. Click Create.

Define a cluster “helloips”:

  1. Navigate to Clusters.
  2. Click the New button (+, on the upper right hand corner).
  3. Enter the name “helloips” in the Cluster Name field.
  4. Select “ips-worker:17.07” in the Container Image field (which would, anyway, be the only available value).
  5. Enter a suitable value (for now, 1 is enough) in the Replication Count field.
  6. Click Create.

For a project, you have a few options:

  1. Create a project using UltraStudio, and upload it to IPS from within UltraStudio itself
  2. Create or get hold of a project archive (XPR file) and upload it to IPS
  3. Select one from the range of ready-made sample projects

I’ll go with the last option, as I’m too lazy to explain the other two in depth here:

  1. Navigate to Projects.
  2. Click the New button (+, on the upper right hand corner).
  3. Click Select a Sample to the right of the file selection button.

4. From the pop-up, select a sample project (I’ll go with “rest-service-mediation”).

5. Click Next (no need to worry about the properties stuff right now).

At this point, we have gathered all pieces of the puzzle; now it’s a matter of putting them together.

  1. On the Assign page (where you are currently staying), select “helloips” on the Cluster drop-down (which would be the only available option).
  2. Click Deploy Now.

You will now end up in a complicated-looking page, with a progress bar and several other controls. This is the deployment page where we join the pieces together.

Below the progress bar you will see a Projects tab, already containing your project under Pending Updates (if you cannot see it there, click the Add Project button in the upper right hand corner, select the RESTServiceMediation project and 17.07 version (which would anyway be the only available options so far), and click Add). This means that the project is ready to be deployed.

Now, don’t rush and click Deploy; we have another small thing to do.

(If you already did, don’t panic either 🙂 You can simply do the follow-up changes and redeploy, without getting your computer blown to smithereens.)

“REST Service Mediation” is a small project that forwards incoming HTTP responses to a REST backend (OpenWeatherMap) and returns the response; essentially a weather service. Hence, once you deploy the project, you should be able to send an HTTP request to the deployed project.

Yeah, sounds simple enough; so what?

Well, it’s not that simple.

Behind the scenes, your project will get deployed on a Docker container, which runs on a separate network. In order to be able to access the project’s HTTP endpoint through this network, some pretty complicated routing gimmicks are required. Fortunately, IPS (in fact, the underlying Kubernetes framework) provides an easy port mapping feature via which you can simply ask the project’s port to be mapped to an external port on the host machine’s network. In case of Kubernetes, the platform guarantees that you can reach the mapped port from any IP address of your cluster of nodes (which is quite cool).

All that techy stuff aside, the takeaway is that you should:

  1. click the Configure button against the to-be-deployed project,
  2. enter a port number for the source port 8280 (something in the range 30000-32768, like 30280), and

3. click Save.

Okay, now you may (scroll down if necessary, and) click Deploy. Let the magic begin.

IPS will tell you that the “Cluster version deployment started successfully” (via a small pop up on the top right, which you may already have noticed).

The progress bar will come to life, filling up gradually from “instances scheduled” all the way to “projects started” and “completed”. If all goes well, the bar will fill up within less than a minute, followed by a “Deployment successful” pop-up.

Finally!

Now it’s a matter of opening a new tab, pasting the following URL (replacing the IP address with the one you used to access the IPS dashboard, if necessary) and pressing Enter:

http://192.168.99.100:30280/service/rest-proxy?q=London&APPID=4f39ab00e0ea663ad801b6bd12799cb6

If you see a weather report of London (it would be a bit clumsy, as the content will be in JSON format), it’s party time!

Now you can head over to the IPS documentation space and start looking around for all sorts of cool things you could do with IPS, while we take a break and decide upon what to write for the next blog post.

Or, if you’re too tired and would like to start off later on, just run an ips_installer stop. Everything would be exactly as you left them after you run ips_installer start the next day.

Leave a Reply

Your email address will not be published. Required fields are marked *