Monday, December 24, 2012

Assign "Elastic IP" Fixed Public IP to your Amazon EC2

Amazon AWS EC2 Elastic IP 2012-12-24_07-15-34Amazon AWS EC2 (Elastic Compute Cloud, or basically, paravirtual servers you can rent from Amazon) initially assigns a non-fixed public IP address to your server instance. This means when you reboot your instance, the public hostname and public IP address will change. This is fine when you are experimenting, but not fine for a production server, and can be the source of not a little surprise, when you restart and the server "disappears". 

This behavior is by design, and makes sense, because IPv4 IP addresses are relatively scarce and a large provider like Amazon would need to conserve on them where possible. But if you need a fixed IP, Amazon allows you to assign what they call an "elastic IP" address. The beauty of this design, is that the elastic IP is associated with your account, and not locked to a single instance. You can re-allocate it from server to server. 

So, say you have a production server in the Tokyo AWS region, and a backup server with the same configuration but that is idling in the US East AWS region. If for whatever reason, the Tokyo EC2 region or your server there has an outage, you theoretically could just visit the AWS EC2 console, and re-assign that elastic IP from the Tokyo server to the other server, reboot and you're on your way. Issues of DNS changes and propagation are therefore not a factor, and you have pretty quick failover.

The screenshot shows what the interface for allocating these looks like. 

Wednesday, October 10, 2012

Apple OS X "Mountain Lion" Upgrade

There is not much over-the-top wow about the OS X 10.8 "Mountain Lion" upgrade, and it seems like the small upgrade fee goes to more subtle changes this time around. The upgrade itself was uneventful, but took a while due to database changes in Mail and Calendar, which needed to convert.

As for functionality after the upgrade, here are a few things I found to be worth remembering - 

  • More apps that work with Retina displays. Personally, I am all for better displays, and am pleased with the Retina displays on both my MacBook Pro and iPad. There are some apps, such as Acrobat X which render fonts horribly on a Retina display, but Preview still works for displaying PDFs. I am hopeful for Acrobat XI.
  • Safari finally has a combined address and search bar, like Chrome, and also lets you pinch-in to make the open tabs act like on iOS. 
  • Really solid integration between the OS and social networking services Twitter and Facebook. Check out the nice integration in Address Book. You can also share to Flickr from a Quick Look popup. Try going to System Preferences, Mail/Contacts/Calendars, add your Twitter account, and click "Update Contacts." It is quite convenient to be able to grab Twitter handles and Facebook profile photos. 
  • You can rename files from some apps now. Notice the drop down menu to the right of the file name, in say, Preview.
  • There are Sharing actions you can take from Quick Look. Press space with a file selected in Finder, then use the sharing icon. Also, find the sharing icon in other apps, such as Preview, Notes, Textedit, Safari as well. You can share entire web pages via email, in Safari now. 
  • Double tap/click in the Sort By bar at the top of Mail's message list, to jump to the first message. Much easier than grabbing those fiddly scroll bars, and is something I have wanted for a long time. 
  • Speaking of Scroll Bars, they now grow under your mouse to let you grab them. 50% less fiddly, compared to previous iterations. 
  • Gatekeeper is a good change and requirement, I think. Apple have made it a little more difficult to run apps from unknown sources. See System Preferences, Security and Privacy. 
  • Dictation is pretty cool, if you turn it on (System Preferences, Dictation) but note that it sends data to Apple's servers, and requires an Internet connection. 
  • You can search directly from Launch Pad, but I still just use the Spotlight icon and type the name of the app, to search for it. 
  • Calendar (previously iCal) seems to work better with Google Calendar. I gave up on iCal in Lion, and switched to BusyCal, but I might give Calendar a try once again. 
  • Message center is irritating, to me - I am not a fan. I like Growl better, and I had to mess around with Calendar delegates, otherwise I was getting popup reminders for all the staff in my company. Maybe it will grow on me. I will give it a chance. 

Hope you find something you can use. Enjoy!

Sunday, June 10, 2012

LinkedIn Listing eSolia and Other Tokyo Companies Incorrectly

I pointed this out to LinkedIn 10 days ago, but am getting nowhere with support who seems to think I will just let it drop hearing their platitudes, so I will post about the problem here in the hope that another company with a similar problem will join me in requesting a fix.

Linked-In has re-located us outside Tokyo...

The problem is, when I enter search phrases that bring my company eSolia up in search results, we and other like companies are listed as being "outside the 23 wards of Tokyo." You can see it in the screenshot attached below. This is the exact opposite of the reality - we are inside the 23-wards, and to me, it just seems like a programmer got their logic switched up. 

LinkedIn support informs me as follows - 

I sent your message to our research and development team for review and consideration in future developments.

Even though we’re not able to respond individually to numerous recommendations we receive, we’d like to invite you to check out the LinkedIn Blog http://blog.linkedin.com for the latest notifications on site improvements. It’s our way of keeping you and our other members informed on all the exciting work we’re doing behind the scenes.

We appreciate the feedback and believe that together we can create great products for everyone!

Seriously?! Well, gee, I am so happy that maybe someday, you will get your act together and maybe deem it worthy to fix your bug. 

Please LinkedIn, this seems like a simple logic error that is happening to multiple companies in various places inside the 23 wards of Tokyo. We hope for a fix sooner rather than later, or I will have to go to my landlord and request a rent reduction, as my company has been relocated outside the 23 wards of Tokyo. 

Anyone else having search listing problems with LinkedIn? Log in and contact their support via this page - http://help.linkedin.com/app/home. 

LinkedIn - Incorrect Locations for Tokyo Companies

Thursday, May 10, 2012

OS X Lion 802.1q Tagged VLAN Setup

Apple obviously works hard to make things as easy as possible for users, but sometimes in their zeal for simplicity, technical things that should be represented simply in the GUI, are actually made more difficult and opaque. 

One such example is setting up 802.1q VLANs in OS X Lion 10.7. In  System Preferences, Network, you can use the gear icon at the bottom of the interface list, to Manage Virtual Interfaces, but you can only link a vlan you create there (or in the CLI) to the main Ethernet interface, and not to any secondary interface you create. However, it is indeed possible to create the vlan on the main interface, then give it the IP address you require. 

How to Setup an 802.1q Tagged VLAN in OS X 10.7, with a Manual IP Address

The reason I needed to have a tagged VLAN, is my switches' management interface is on a tagged VLAN. We are using an untagged VLAN as the general VLAN in our network, because you never know what systems will not support 802.1q tagging, and, you can have only one untagged VLAN in a switch infrastructure. (That makes sense if you think about it. How could you have two untagged VLANs, when the point is separation.) We wanted the security of a separate VLAN, for infrastructure management functions. 

So my goal was - 

 

  • to have a single NIC working for all the networks I need. 
  • to be able to connect to our standard untagged internal VLAN where we have servers and printers, on 10.81.1.0.
  • to be able to connect to our tagged management VLAN which is the only way to manage our switches, on 10.81.254.0.

 

Connecting to the standard untagged internal VLAN is easy. It is the "Ethernet" interface listed in System Preferences Network, and connects via DHCP. The steps to make the third bullet point work, were as follows -

First, open System Preferences, Network, then use the gear icon at the bottom of the list of interfaces, to see a submenu, that has "Manage Virtual Interfaces". 

OS X 10.7 802.1q Tagged VLAN - 1OS X 10.7 802.1q Tagged VLAN - 2

Click on "Manage Virtual Interfaces" and use the plus button to add the VLAN interface, entering a name, and the correct VLAN tag number. In this example, it is 254. At least on my MacBook Pro, I was able to select only the one physical NIC - Ethernet - to bind the VLAN to. 

After you click Done, you will see the VLAN interface listed in the main list of interfaces. You then select this, and change DHCP to Manual configuration, and set it up as a normal Network interface. The difference is, this interface has the 802.1q tag on all its packets. 

OS X 10.7 802.1q Tagged VLAN - 3OS X 10.7 802.1q Tagged VLAN - 4

Once this is set up, you will be able to communicate with other devices, like switches, servers, or storage, that have the same VLAN tag. 

I hope this information helps someone. Enjoy!

OS X 10.7 802.1q Tagged VLAN - 1OS X 10.7 802.1q Tagged VLAN - 2OS X 10.7 802.1q Tagged VLAN - 3OS X 10.7 802.1q Tagged VLAN - 4 

 

Sunday, January 08, 2012

Efficient Gmail with OS X Mail.app

1000 Cranes - one by one effortGreetings and Happy New Year. I am using Mail.app on OS X Lion, to retrieve mail in my Google Apps for Business Gmail account, and I wanted to blog about my setup, because I think it is relatively efficient and might help others. My goals are:

  • To keep my inbox small, to allow Mail.app to perform well. This goes for any mailer, really. The larger the mail store, the slower it will get.
  • To keep minimize network traffic and keep round trip copying up and down to Gmail, to a minimum.
  • To be able to have a backup of mail just in case, outside the mail client.

My Formula for Mail.app Gmail Efficiency

Here is what I am doing:

To minimize network traffic, in GMail settings, I uncheck the "Show in IMAP" setting for the All Mail label, so that it does not copy down to Mail.app. If a message comes into Gmail, and this is turned on, it will download twice - to the Inbox folder and to the All Mail folder. Gmail does not store in folders, but rather works with labels, so there is some strangeness in interaction with typical IMAP clients as a result.

To keep the size of the local Inbox small, I am Archiving mail. Archiving mail in Gmail means to remove its Inbox label. It is important to note that when you Archive mail in Gmail, it just makes it disappear from the Inbox, but it is still present in All Mail.

To Archive inside the Gmail web GUI, select or open the mail, then -

  • … press "e" on the keyboard (see other keyboard shortcuts for Gmail). Or,
  • … click the Archive button on the toolbar (looks like a box with a downward-facing arrow).

There is an Archive button in Mail.app, and what this does is to move the selected mail into an Archive IMAP folder, which will be synced up to Gmail. To Archive mail using Mail.app, select or open the mail in Mail.app, then -

  1. … press Ctrl-⌘-A to Archive it.
  2. Confirm the email is present in the local "Archive" IMAP folder, which should be present in your Gmail folder list (in Mail.app, scroll down, in the left-hand folder list to find it).
  3. In Gmail, once the email is copied up and synced, select the mail or mails and click the "Remove Label" button, or, press "y" on the keyboard. Use Mail.app menu Window, Activity to confirm the sync, and, observe the labels in Gmail. At first, you will still see all the mails in the Archive label marked with an Inbox label as well, but, as they are synced up, these will be removed. Once it settles down, you can Remove the Label.

Why do it this way, taking more steps? I do this because it is easier to search and select in Mail.app, than it is in Gmail. You can search on a date range in Gmail, but it is a bit fiddly.

To keep a backup of mail, just in case, I use the excellent MailSteward utility. This lets me automatically keep a database of all my mail, which I can then periodically offload to DVD, Amazon S3 or Dropbox.

Bonus Tip

If you are happy deleting unneeded mail in Gmail and not Mail.app, then you can uncheck "Move deleted messages to the Trash Mailbox" in preferences (Mail.app, Preferences, Select Account, "Mailbox Behaviors"). This way, when you delete on Mail.app, the mail is removed from the Inbox on your local system, but, only the Inbox label is removed from the message up in Gmail. You would then have to go to Gmail and delete what you want to delete.

I hope these tips help someone.