Resizing an EC2 Instance Volume

Diaster. You login and the first thing you see is that you only have 11.1% of space left

System load:  0.0               Processes:           68
  Usage of /:   89.9% of 7.87GB   Users logged in:     0
  Memory usage: 8%                IP address for eth0: 10.220.117.134
  Swap usage:   0%

  => / is using 89.9% of 7.87GB

  $: sudo resize2fs /dev/xvda1
     resize2fs 1.41.14 (22-Dec-2010)
     Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
     old desc_blocks = 1, new_desc_blocks = 4
     Performing an on-line resize of /dev/xvda1 to 13107200 (4k) blocks.

  $: df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/xvda1             50G  7.1G   40G  16% /
    none                  293M  108K  293M   1% /dev
    none                  298M     0  298M   0% /dev/shm
    none                  298M   48K  298M   1% /var/run
    none                  298M     0  298M   0% /var/lock

How missing a ‘>’ killed my EC2 machine and how I brought it back to life

After spending a number of hours configuring an EC2 machine

id_rsa.pub > authorised_keys

id_rsa.pub >> authorised_keys

Panic!

Just lost all the configuration. To make matters worse, I hadn’t done a push to github. Was I just about to lose all my effort?

Thankfully, with some black magic I got the box back. One of the beautys of EC2 is the AMI. Exact machine images, yet modified with your own private key at create – exactly what I needed.

Stop machine

Create Image

Update with private key

Start.

IT WORKED LIKE A DREAM!

Couple of things like the hostname had been changed, but apart from that it was back and with all the configuration as I felt it – yet I could login. Wonderful.

Join @maydayhq as a start-up co-founder

Cross-posted with http://blog.maydayhq.com/2011/08/31/join-mayday-as-a-start-up-co-founder/

We currently have an exciting opportunity to join the founding team of Mayday. Ideally, the person would bring a level of visual design / UI / UX expertise in the role of a front-end developer and help us build an amazing product. As a co-founder, you’ll be a key member of the company at an early stage, involved in building the vision, product and the company.

The product is SaaS-based, enabling clients to improve their website by alerting them when and where users experience problems. Combining lightweight integration with ‘Big Data’ technologies, we monitor users engagement, interaction and client details allowing us to identity why they’re having problems.
Our concept is still evolving, and you’ll be in a position to make your mark. Mayday has the potential to have a huge impact on development, testing and production systems and impact how we handle modern software issues and their related testing concerns.

Mayday recently graduated from the Springboard Accelerator Programme in Cambridge and has been covered by sites including TechCrunch and TheNextWeb. The next stages for the company involve a funding round, building an amazing team to allow us to change the world and then achieving profit. The product is currently an early alpha, with a small number of users providing valuable feedback before opening it up to the private invite list. A demo is available at http://app.maydayhq.com/demo

Key characteristics for the role include:
– Passionate about startups. Building a company is amazing and extremely rewarding, but it takes a certain type of person.
– Passionate about building amazing products and changing the world.
– Capable of producing amazing visual design.
– Capable of turning an amazing visual design into reality via HTML, CSS, Javascript and any other cool tools you fancy.
– Understands the importance of UX, workflows and the key metrics required to monitor and improve.
– Self motivated, proactive while taking pride in their work and looking for ways to learn / improve.

Remuneration: Variable; let’s discuss. As a co-founder you’ll be a key part of the business with significant founder share options available.

Location: Old Street, London (open minded to other locations.)


Interested?
Email workwithus {at} Maydayhq.com and tell us about yourself. It would be great to hear about recent projects you’ve been excited about, examples of your work and links to github, Twitter, LinkedIn, blog etc.

Why not add something different to the mix by telling us what features you would love to see in Mayday and how you see it growing over the next few years? What other startups currently excite you and why?

If you don’t fit the role of front-end developer, but feel you could make a difference to the company and add value in a different role, please email and tell us – we’d love to hear from you!

Increase size of AWS instance without recreating the AMI

Today I started wondering, how could you move an existing Amazon Web Services machine to a bigger instance without having to recreate the machine. For example, moving from a t1.micro to m1.small.

With the help of the command line tools, it’s a fairly simply process.

First, you need to find the instanceId for the machine you want to upgrade. The command “ec2-describe-instances” will list your running instances, with the instanceId being the number starting with a i-, for example “i-0000000”.

To make the change, you need to stop the machine using “ec2-stop-instances i-0000000”

ec2-modify-instance-attribute –instance-type m1.small i-0000000

INSTANCE i-8b1fddea running stopping

Client.IncorrectInstanceState: The instance ‘i-8b1fddea’ is not in the ‘stopped’ state.

instanceType i-8b1fddea m1.small

ec2-create-snapshot vol-af477dc4 –description “Moved to small 20/Aug/2011”

SNAPSHOT snap-020cce62 vol-af477dc4 pending 2011-08-20T22:30:05+0000 132482013338 8 Moved to small 20/Aug/2011

ec2-start-instances i-0000000

Count number of times a file has been download via HTTP logs

Today, I wanted to find out how many times a file had been downloaded from a web server.  Without Google Analytics, it was time to pull out the big guns – grep.

The command I used was:

grep -o /e.js /var/log/lighttpd/access.log | wc -w

/e.js is the file I’m interested in, while access.log is the file.

The output of grep will be a long list of the string /e.js to indicate the matches.  wc counts number of words. With the use of the pipe, you have a lovely quick command to find out how many times a file has been downloaded via your logs.

SXSW 2012 Proposal: Lean Testing

For the past few years I’ve been kicking myself for not attending South-by-Southwest (SXSW). Every year it sounds like an amazing conference, so this year I decided to submit a talk – what’s the worse that could happen?

The session is titled “How Lean Testing removes waste and software bugs” where I’ll discuss how to take a lean approach to testing and how it can enable you to remove the waste causing delays to releasing and delays to customer feedback among other things. Over the next few months I’ll be blogging related items here and on the Mayday blog.

As such, I have a request. SXSW receive a huge amount of sessions every year. To help, they ask for the community to vote. If you could take a moment to vote for my session proposal then I would be most grateful!! http://bit.ly/leantestingsxsw2012

Every vote helps! Thank you!

First play with the Cloud-Based Amazon Reader

In the last few hours Amazon announced their “Cloud Reader”, enabling you to read your Kindle collection from a browser. Sounds great, but what’s the implementation like?
Webkit based means no Firefox
Firstly they’re promoting it as a web-based reader, however with their use of WebSQL database they only support Chrome and Safari. Attempting to use the service using the FireFox 8 Nightly builds results in the message “Your web browser isn’t supported yet. Download Chrome or Safari below.”.
Initially I was surprised they didn’t use an abstraction layer allowing them to support IndexDB (Firefox IE) and WebSQL (Webkit). From reading articles, it looks like their target market is tablet devices meaning Webkit based browsers, making supporting only WebSQL an obvious choice. This is an important point for developers – understand your user-base when developing products. Release a product that works for your target audience, only add additional time and complexity if there is demand.
When I jumped into the product, there were a few more interesting surprises. I was shown was an option to setup Offline Reading. From a users point of view this was very surprising – most people would assume offline reading would be enabled by default.
Instead, it expects me to install a Chrome Extension. Amazon knows they will always have HTML5 and WebSQL available so I’m guessing this allows them to get around DNS lookups when no wi-fi is found.


Sadly, after clicking Install I was shown a blank tab with no explanations and nothing listed under my browser extensions. Not a great experience. I do have an Amazon Reader WebApp icon, however this process feels confusing and unnecessary mainly because of the time within the journey they asked me but also the lack of indication from Chrome about if it’s an App or Extension.
Explicit Offline Mode
Within the reader the offline mode becomes even more confusing. They have made a separation between Cloud and Downloaded which makes sense with a large library but if your currently reading a book is that classed as cloud based or downloaded? From what I could tell it was cloud based which could become annoying. Having the separation of Cloud vs Available Offline would have made more sense based on other terms and phasing used in the application.

However, the reader is impressive. It shows how HTML5 and Javascript based applications can create compelling experiences, reaching beyond the web browser.


Yet, with functionality such as reading preferences not being used across different browsersdevices the reader still has a long way to go.
No wifi but still works
As proof of the potential, what actually happens when you don’t have wifi? The first attempt was a complete failure.

After closing and reopening browsers it worked as expected and I was shown my offline book which was pretty impressive.
This is the start of an interesting future for HTML5 readers with fellow Springboard team Publification creating BrowserBooks which works without having to download extensions and where offline reading is implicit – just like you would have expected.

My blog has a few javascript errors… visualise them at MaydayHQ

I knew my blog had a few issues, but I had no idea how many!

I’m not the only one. Every day users are encountering bugs and errors with websites that causes them confusion, creates a terrible experience and encourages them to a competitor resulting in companies losing revenue! Companies try and have a friendly “Oops – something went wrong” approach, but it doesn’t hide the problem that the user had a problem.

To make matters worse, companies are unaware of the problems real users are experiencing and instead wait for them to contact customer support – this worked in physical stores, it doesn’t work for the web. With more powerful javascriptHTML5 applications, the buzz around web stores and the wide range of devices pushing the boundaries then problems only going to get worse.

This is why we (Meerkatalyst) created Mayday (MaydayHQ.com). A product designed to capture the problems users experience allowing companies to fix problems before anyone even complains. This means more happy users and as such more revenue. With big plans for the future we’re taking small steps and iterating quick. Currently we’re alerting companies to javascript and in-browser errors and potential reasons for the problem.

You can visualise the errors affecting visitors of my blog at http://app.MaydayHQ.com/demo and you can sign up at http://www.MaydayHQ.com/

We’d love to hear your feedback on this, you can reach us at @MaydayHQ or if your in the London Cambridge area then we’d love to meetup for a coffeebeer.