Archive

Author Archive

DoubleCloud ICE: the IDE for Managing Clouds

March 30th, 2015 6 comments

After almost one year of intensive development, I am happy to announce the first release of DoubleCloud ICE. It’s an integrated tool for cloud management, in particular VMware vSphere with which you can do a lot of interactions easily and quickly.

The idea was inspired by the IDEs. Once upon a time, we all used editors like vi, Emacs to write code, then compile, link, and debug them using command lines. As time evolved, the IDE came out so we can do all these tasks (actually more) nicely and efficiently in one application. The result? Better user experience and higher productivity.

Gson vs Jackson: Which to Use for JSON in Java

March 27th, 2015 6 comments

There are many JSON libraries for Java. While it’s nice to have many options, it can also be frustrating to decide which one to use. If you do an online search, you will find many opinions and all these libraries are used somewhere. When in doubt, the best thing to do is: stop searching and start coding. It doesn’t take long to get the ultimate answer for you.

Categories: Uncategorized Tags: , , ,

How to Recover Corrupted Virtual Machine in VMware Fusion

March 18th, 2015 4 comments

I just spent quite some time helping a friend to recover a corrupted virtual machine in VMware Fusion. It’s indeed a long and interesting (sometimes frustrating too) process that I learned quite some that I would never otherwise. I think you might find it useful as well. Hopefully, you don’t get a corrupted virtual machine, but in case you do, I am sure the post will help you.

Categories: Uncategorized Tags: , ,

Getting Started with Go Programming Language

February 2nd, 2015 2 comments

Go is a relatively new programming language coming out of Google. It’s getting popular with more new projects using it. Two of the container software, Docker and Rocket are both using Go.

At high level, the Go programming language is very much like C but with many improvements. To my curiosity, I started to study Go and get ready for future consulting projects. Here are the note on installation and a few samples along my learning path.

Ruby Hashie Library

January 28th, 2015 2 comments

Ruby is a very interesting programming language. One powerful feature is its meta programming capability, which allows you to change the programming constructs at run-time. For example, you can change the definition of an existing class from standard library, which could be useful and dangerous at the same time. That is of course a whole other topic.

Categories: Software Development Tags:

Commonly Used Git Commands With Samples

January 27th, 2015 No comments

Git is a powerful version control system. One big differentiator from traditional version control systems is that it’s fully ditributed. In other words, there is no central repository and everyone can have a full clone of everything.

There are many articles and tutorials about GIT already. A while back, I also wrote a few articles on the Java APIs to the JGit implementation. This post is simply a collection of some commands that I use on daily basis. This is just for my quick reference or cheat sheet and nothing more. If you find it’s helpful, it’s great.

Categories: Applications & Tools Tags: ,

Simulating APD Event with ESXi

December 18th, 2014 No comments

APD stands for all path down. It’s a storage issue that is discussed in VMware KB article Intermittent NFS APDs on VMware ESXi 5.5 U1 (2076392). You can install a patch to address the issue with ESXi 5.5.

Categories: Virtualization Tags: ,

Vagrant for Software Development

December 2nd, 2014 1 comment

I came across Vagrant a while back at a bookstore. After browsing it, I didn’t get my hands dirty with it until recently. I started to play with it because one of my clients uses it in setting up development environment for convenience and consistency.

Rotating Log Files with Logback

November 25th, 2014 1 comment

Just fixed an issue related to configuration of Logback recently. You may be wondering why the Logback is used given that it’s much less known than Log4j and Java Logging. Very good question. This page from Logback may provide you some insights. I haven’t tested the performance, but it’s said to be 10 times faster than others. There is also an independent version of comparison on StackOverflow. After browsing it, I didn’t have an impression that I have to use one over the other.

Categories: Software Development Tags: , ,

OAuth For HTTP and REST API Authentication

November 24th, 2014 No comments

Authentication is to verify users are really whom they claim they are. Since its inception, HTTP(s) has used different approaches like BASIC authentication, Form based authentication. Both require passing the user name and password from the client to the server. It’s definitely not good idea to use HTTP because the password is passed as it is or with very limited encoding like BASE64 – very easy to intercept the IP packets and extract out the password. When HTTPs is used, it’s much harder to get the password as all the traffic are encrypted. Still it’s subject to attacks like man-in-the-middle.

Categories: Software Development Tags: , , ,

Gradle for Building Java Applications

November 3rd, 2014 1 comment

Building software is a very important part of software development cycle. In the C/C++ age, we used make and continue to use it today. When it came to Java age, two important build tools emerged: Ant and Maven. The former is very similar to make, but instead of script it uses XML. Both make and Ant describe HOW to build software in steps. The Maven takes a quite different approach – it describes WHAT the built software is using XML, and leaves the how to the Maven and its plugins.

Categories: Software Development Tags: , ,

Harmful Big Data

October 17th, 2014 No comments

In one of my recent projects, I got into a “big data” issue. One of the open source components emits so many logs that it quickly fills a hard disk. After isolating problem, I found huge number of log entries by the “find” command in a single log file whose size exceeds 50G – too big data for most system to handle.

The following is an example log entry in the log file:

4f538cda38c557d06276084438ffe9e7034

Categories: Applications & Tools Tags: ,

How To Get vCenter Database Records from VMware Support Bundle

October 7th, 2014 No comments

If you want to find out the information in the vCenter database, the VMware support bundle comes handy. For example, if you want to analyze the event history, task history, you can dig out these information from the support bundle. By default, the vCenter support bundle is collected as part of the VMware support bundle on standalone client, but not on the vSphere Web Client. So make sure to mark the check box if you want the vCenter info.

vSphere Web Client URL Patterns

September 30th, 2014 No comments

Although I don’t think vSphere Web Client is a good choice as main GUI for vSphere administration, it has done one thing right and well – it has a unique URL for almost everything you can browse the vSphere Web Client. The benefit is that you can bookmark a URL and open to the page without many clicks.

Categories: Virtualization Tags: , ,

Key Takeawys from VMworld 2014

September 3rd, 2014 No comments

Last week was a pretty busy week with VMworld 2014 in San Franciso, followed by a long weekend during which some of us may be even busier. If you haven’t got chance to the conference, you can check out the recorded VMworld keynotes, and maybe later recorded break-out sessions.

While there were many announcements/news in the conference from VMware and other vendors. I think the following three are the most important ones.

VMware EVO

Categories: News & Events Tags:

VMworld 2014

August 25th, 2014 No comments

Today is the first day of VMworld 2014 San Francisco. For the last 7 consecutive years, I have attended all the VMworld conferences in US, either as a speaker, booth duty staff, or normal attendee. This year is no exception. As always, I find the solution exchange is the best part of the conference, so I spent several hours in the reception party this afternoon. While enjoying the good food, I talked to quite a few vendors. When the party was over, I found I only finished two rows. So there are a lot more work tomorrow.

Categories: News & Events Tags: ,

Tips and Tricks in Using Logrotate

August 15th, 2014 1 comment

In my last article, I talked about how to use logrotate to manage logs. As everything else, there are some tricks that are only learned when using it. Here are a few tricks and tips I learned recently. Hope it can save you some time.

Stickiness of Logrotate Rules

Categories: Applications & Tools Tags: , ,

How to Use Logrotate for Managing Log Files

August 8th, 2014 2 comments

Logging is an important for software development and operation. Over the time, the log files can grow fast to fill up the disk space. To avoid the problem, log files are rotated, compressed, and deprecated based on certain rules, for example, periodically, over certain size limit, and retention limit.

Most mordern logging frameworks can do log rotation and compression, but different applications may use different frameworks thus configure them differently. If you want to have a solution across different applications for consistent policies, the logrote (https://fedorahosted.org/logrotate/) is a good choice.

How to Create New User in ESXi With Shell Script

August 7th, 2014 2 comments

It’s pretty easy to create a new user using vSphere APIs in Java. If you want one or two lines of scripts, you can write a few line Python script using PyVimomi wrapped by a command line. Even easier is a solution discussed at PureVirtual.

The trick is really about how to access the adduser command, which is available but not accessible from console as it is. To use the command, you have to type the following command from ESXi console: (I assume there are a few more commands that can be used in the same way)

Categories: Virtualization Tags: , ,

How to Hack vCenter Database in vCSA Appliance

July 16th, 2014 3 comments

As @lamw documented in his blog, you can access the database in the vCenter software appliance (vCSA). In the first appliance of version 5.0, VMware included IBM DB2 Embedded and then switched to vPostgres right after. That’s because vPostgres is VMware’s own product based on the open source Postgres.

By default, the access to the vPostgress database is limited to local applications. In other words, if you want to access the database remotely, it will not work. After researching a little, I figured out how to configure the databse for remote access.