Monthly Archives: March 2014

Deploying Ghost in Vagrant

After my break to crystallize the deployment of Ngramatic in AWS, I am back with Ghost. The problem was not with my scripts but with VirtualBox itself. I had version 4.2 of Virtualbox, and it didn’t like my deployment for some reason. I got the clue when I tried them in the Mac, without any problems. A few searches and updates put things back in place.

But, I still don’t have the deployment running at home. My Ubuntu laptop gets kicked out of the Ubuntu Vagrant, with a ‘connection reset by peer’. I am still lost, and it is late enough to be sleeping already. I tried port forwarding, and a private network, but no luck. I will try again tomorrow on the Mac.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Liveish in AWS

A short post today, because I am ready to go to sleep.

Putting an hour here and there today, finally the servers are live in Amazon, and doing part of the trick. I realised that there are problems with the data, but I am sure we will be able to sort them out tomorrow.

The site is not open to the public yet, but hopefully it will be out soon. I am a very happy monkey today! And now it is time to go back to side projects for real!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Another day pushing the product ahead

Once again I am breaking the rule of leaving the day work project for the day, because I am trying to deploy it in AWS before Monday.

From the fact that I didn’t take the time to do deployment earlier, I am paying with the extra weight now of making sure it works properly, and that I can deploy it again and be reasonably sure it works. It has no surprises, I did the job before, but it still consumes a good amount of time. I am making extra checks for connectivity, configuring ports, addressing security issues, and after all that the program is still off the real world and just running inside the work network. But, as the story goes, it could have been worse.

While I am waiting for the scripts to run, I started reading Rework, from the guys at 37signals. My friend Magoo mentioned it a few days ago and I usually follow his recommendations. I didn’t find it irreverent, but my communication style is probably rougher than my friend’s. And a lot of the recommendations from the book resonate very well with my current line of thinking (the ‘a month’s evenings‘ theme looks like taken from the first few chapters of the book). It is very easy reading, and valuable as well.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Getting the product ready

Tonight, instead of being in a side project I am finishing the last few items to get Ngramatic‘s product ready to start demoing. It wasn’t a project as the last previous few, because there were too many moving parts to be able to go straight to production from day one, but after two months of hard work it should be deployed in AWS by Monday.

The process involves a number of Java servers, an Angular front end and NodeJS in the middle of two, all using ZeroMQ as the channel. Deployment is done with Python Fabric, and it runs in Ubuntu in AWS. For development we were using the local machines, but soon we will move to Vagrant. I wonder if I should try to use Docker, but I am not that comfortable with it yet.

Now, I have to finish the last monitoring calls, and sort out CORS in Restify. Piece of cake (from Conor’s birthday past week).

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

NodeJS meetup

Past night I went to a NodeJS meetup about micro servers and Docker instead of working at home. It was very interesting to see their approach to data distribution. I find it similar to NServiceBus, which I was trying to use at emuse, but with a more lightweight approach.

What I like is the lack of network structure definition upfront (which is heavy enough in the things I am doing). In my case, I need to define each endpoint, and then annotate them on each client server. Instead, the demo was about sending all data to a bus and detecting the pattern of each message, and acting based on its details. Then, every server receive every message, and if the message has details saying that a given server has to process it, the server will work on the data and post the results back on the bus for the next service.

Work pipeline definition should then be simple and easy to change. My only concern is about network traffic (how many messages are you going to have around?), but I can think of a couple of ways to address that (probably the SenecaJS code has some solutions too, I will have to check).

The talk about Docker was more in line with its documentation, and I didn’t get too much out of it because I was going through in the previous days, but still it was good to align it with the bus architecture.

All in all, it was an evening well spent.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Ghost continued

Vagrant is up and running, and I completed the script to deploy Ghost on it. But still it isn’t running. I mapped the port 3168 from Vagrant to 8080 in my laptop, but there is no ghost jumping around in my browser. I can do a curl in the terminal during an ssh into Vagrant, but if I try to cal from outside I get a ‘connection reset by peer’ error message.

The problem seems to be with VirtualBox. After a good amount of googling, I found a message pointing to a problem with VirtualBox Guest Addditions, but I couldn’t fix it yet, and it is late enough to go to bed. There are a few updates on the project, but they are still not good.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Ghost blog

Although I am using WordPress to host this blog, I never felt too comfortable with it. For me it looks too complicated, I cannot make sense of the source code, writing plugins has too many turns for my likeness, the whole thing is great if you know it, but too much trouble if you don’t. WordPress feels like my own big applications, while I retained them in RAM I was  productive, but as soon as I left them alone for a few months I always wanted to rewrite each of them because I couldn’t made head from tail.

But the alternatives were not better and my hosting providers know it well, then it did the trick and I forgot about blog hosting and did some programming, until now.

Being messing with NodeJS for more than a year now, I wouldn’t mind to convert many things to it, and a blogging application is one of the prime candidates. I played with the idea of making one, but in the end I got engaged with other things and left the open source effort for others.

There are a few blogging platforms in NodeJS already, but the best candidate in my eyes is Ghost. The author run a Kickstarter campaign, exceeded his target and got the product on time, which speaks volumes for me..

The code is available, and although I don’t really know how it works, I feel a lot more confident reading it and trying to make sense about what is going on. I believe that if I spend the time I should be able to make things with Ghost.

Then, the first step is to deploy it. I am using my traditional approach, fired a Vagrant machine and started following the instructions (my scripts are hosted in Github). I am halfway through it, it is too late now to do any testing.

As a side result, I just found Flightplan, which is an attempt to replicate Python Fabric but in NodeJS.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Getting started with Docker

During the weekend I was looking a bit at Docker, which is a way to create containers to run your code isolated from the rest of the machine, while still using the common libraries and deployment of the host operating system.

In my case the benefit could be important. I am leaning more and more into the micro server architecture, and the result is that I have around two orders of magnitude more servers to deploy, monitor and maintain.

I do most of my development using Vagrant, which lets me emulate a real life deployment, up to a point. In many cases, I will develop all the services in the same guest machine, but at deployment I might have a couple of machines keeping most of the servers, and then a load balanced layer for the busier services.

In theory I can emulate that with Vagrant, but in practice if I run more than two or three instances my laptop starts to crawl. Then although I test that everything works, going into production means a few sessions of debugging when things are different from theory to practice.

The idea I get from Docker is that using it I should be able to create a machine for each server without killing my laptop, and that would sort the problem of adding a load balancer in my deployment.

To make my life easier, I did some Fabric scripts to deploy Docker in Vagrant. We will see how it works during the week, at the moment it is just following the details in the installation page, but I didn’t do any real deployment (only a hello world).

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

A month’s evenings

I was a bit restless for the last few months.

During daylight I am working trying to give life to a startup with a couple of colleagues, which is an adventure big enough to keep me entertained. But then, at home, after my son goes to sleep and while my wife works around her professional associations, I sit down and doze for a couple of hours, watching trivial TV programs, or reading something easy under low lights (or on the phone, as I keep moving my library to electronic format).

The thing is, usually when I go as an employee and not a founder, generally I have a couple of side projects to maintain the illusion of having my own adventure. But for some months it sounded as too much to have a second startup after the first one, because, if I have time and energy, shouldn’t I have been putting all the effort in the main one?

Many years ago the answer would have been that yes, I had to put every joule of energy behind the main plan. These days, I realised that at least for me, having a startup is a journey and not a destination, and if I arrive wrecked I will not be able to do it again for a long time. Then, instead of obsessing with one thing, I am trying to keep my mind open to other adventures along the road. Not too big, not too difficult, but still interesting enough to wake up ready to solve new challenges in the morning.

The problem then is to pick something to do, something I find interesting enough to be engaging, and simple enough to be solved in a short time. Being happy with the Pomodoro approach to programming, why not to put a time limit in my side project, and see where am I at the end? I really enjoyed following the progress of 3 weeks to live, even their equally fast death, and wondered if I would be able to do it myself. In fairness we tried, very loosely with a couple of friends to do it, but not having full time dedication proved to be a killer for a team trying to work fast.

Would be different if I work on my own, instead of as part of a group? Have technologies evolved as much as I think, to enable to get professional products with off side dedication? That is what I would like to know, and here is the plan to find out:

  • Every evening, for a month, spend an hour or two implementing some code, or learning a piece of technology, or deploying a service, and see how I feel after it.
  • Before going to sleep, or in the early morning before going to work, spend ten minutes wrapping up here the findings of the evening.
  • At the end of the month, see what happened.

The aim is not to have a commercial product, or to make an open source project, or to master any particular technology. What I want to know is what can I achieve if I systematically spend some time for a short period, without external dependencies and not being limited to the technologies I know by trade.

We will see what happens, and hopefully will have some answers by the 24th of April.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

git log enhancement

II found this little edit in Coderwall today. It is a change to the settings in the git log, to receive a nicely formatted report instead os the default one.

To have it as a reference, I am copying it here:

 

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather