Showing posts with label Bash. Show all posts
Showing posts with label Bash. Show all posts

Monday, June 5, 2017

JSON on BASH: JQ

In one of my previous posts, I wrote about underscore-cli for looking at JSON output (e.g. to see the curl response from a REST web service). An alternative to this is jq, a command line processor for JSON in bash.

Some things about jq that make it powerful is that it can be used as a filter (that what jq really is). This means that you can select which parts of the JSON buffer be returned from the stream so that you can you do your own navigation.

For more information, check out https://stedolan.github.io/jq/tutorial/

Wednesday, September 3, 2014

Real PaaS: CloudFoundry

During the last few years in Software Development, I have found myself doing very repetitive tasks regarding deployment of applications. Among them, these are:
  • Provisioning of Hardware (or VM)
  • Install Application Runtime (Java, Rails, Node, etc)
  • Deploying of Binaries (War file, Processes, etc)
  • Load Balancer Configuration
  • Security Configuration (SSL, Documents, etc)
  • Ensure Service Connectivity to external systems (databases, enterprise logs, auditing, etc)
  • Update Firewall policies and documentation.
I have scripted most of these in many ways (particularly using Bash,  Puppet, Monit, etc). Most of these are not only done by me, but also prevent me from doing actual real work (developing solutions). If you find yourself in this situation, I'd like to introduce you to CloudFoundry, a PaaS project I have been following for some time. I'll plan on adding more entries on these concepts soon so that I can try to document my learning about this great platform.

Thursday, January 16, 2014

Handling JSON in bash using underscore

Now on days, software components expose some sort of API using a REST interface. In addition, the typical response comes in JSON format. While this very convenient for a browser to interpret, using JSON in a bash script is not as simple. I came across this project on github called underscore and I must admit I liked it. I highly recommend reading it's short README file. I figured I'd write some about my issues installing it.