2016-02-24

Prepare your laptop for OpenShift - Local DNS resolver settings

I wanted to setup OpenShift demo on my laptop running on a virtual machine, running on IP 192.168.122.115 with Virtual Machine Manager.

OpenShift requires you to have a working DNS with wild card resolver, for example *.openshift.example.com should resolve to the IP address of the VM.

Usually you would insert required IP addresses to /etc/hosts -file, but it doesn't support wildcards.

This is where dnsmasq comes very handy, it's a simple local DNS server which can be easily configured for this kind of setup. The trick here is that dnsmasq and NetworkManager overwriting your /etc/hosts -file will cause some funny side effects every time you reconnect to a network.

Luckily NetworkManager nowadays supports dnsmasq, but needs some manual configuration in order to work perfectly for this use case:


edit file:
 /etc/NetworkManager/dnsmasq.d/local.conf
with lines similar to this:
 listen-address=127.0.0.1,192.168.122.1
 address=/.openshift.example.com/192.168.122.115
 dhcp-range=192.168.122.20,192.168.122.30,2h

As we are replacing the normal dnsmasq configuration, it's important to bind to the network interface(s) needed by libvirt, and also to provide dhcp server to your VMs.

edit file:
 /etc/NetworkManager/NetworkManager.conf 

and add dns and dhcp lines, do not touch the plugins line:
 [main]
 plugins=ifcfg-rh,ibft   # note that this is Fedora-specific line
 dns=dnsmasq
 dhcp=internal

Make sure the dnsmasq service is disable because NetworkManager will start it automatically. If it's enabled you will have problems.
 systemctl disable dnsmasq
 systemctl stop dnsmasq


That's it, you are now ready to test everyting.
 systemctl restart NetworkManager

Everything should work now. If you look into /etc/resolve it should have only local host as nameserver:
 # Generated by NetworkManager
 search redhat.com
 nameserver 127.0.0.1

And ensure your wildcard resolver works also:
 host testing.openshift.example.com
 testing.openshift.example.com has address 192.168.122.115


Even when switching wlan networks and connecting to VPN networks the resolver should work.

With this configuration dnsmasq will use the DHCP discovered DNS servers which NetworkManager gives it at the time of connection.






2016-02-21

Silence of the lambs - How to prepare for an open office with technology

While preparing for office relocation it occurred to me that working in an open office would be quite different from my current working environment. Last years I've been working in semi-silent shared room for four persons, with ability to close the door if the person next door was having a marathon conference call on a speaker phone.

In the new open office there are no doors to close, so alternative solutions needed to be found.

The new office will have a fitted carpet which should reduce unnecessary sounds, but wouldn't eliminate the typical human habit of speaking or yelling too loudly across the room.

My initial plan is to not install any speakerphones on the desks. People would need to take the calls on their mobiles which hopefully will reduce the length of the calls. Alternatively headsets should be used when attending conference calls. For larger groups attending conference calls there are meeting rooms available, reducing the noise in the open office.

Finally there's the solution provided by powerful but yet small sized computer: noise-cancelling headset.

Several of my colleagues around the world recommended purchasing Bose QuietComfort 25 headset with noise-cancelling functionality. After trying them for couple of hours I wished the company would allow me to expense them because they are good. 

They are so good that despite the hefty ~290€ retail price in Finland, I ended up paying them from my own pocket as the noise-cancelling feature is very useful when flying.

I do travel a lot between Europe and Asia, enjoying good sound or lack of any sound is probably the best thing one can hope for from a long 10-hour flight.

QC25 comes with a handy hard case which protects the headset from damages during travels. Included in the retail case is also an airplane adapter needed on some older planes.

The headset had two models for sale, depending on if you wanted a remote for iPhone and Android phone. The remote with a microphone is attached on the headset's cable.

I'll update the review later after using the headset for some time, but the initial impression is very good.

The headset sits tight but not too tight on my head, and the sound quality is OK. Due to the noise-cancelling technology there is little noise to be heard if you don't play any music, but I assume it can't be heard if the background is more noisy than my living room during a night.

Some reviewers have experienced malfunction of one of the speakers after one year, I hope my unit isn't one of those "Monday" pieces.




2016-01-24

Try OpenStack at TryStack.org

If you are interested in learning OpenStack but do not have hardware to set it up yourself, one of the easiest ways to test it out is to browse to http://trystack.org and give it a try there.

Trystack is a sandbox installation of OpenStack sponsored by Dell, NetApp, Cisco and Red Hat.

You'll get a free access to test your stuff on Trystack, but there's one important rule:

Rule No. 1: Remember that TryStack is designed exclusively as a testing sandbox. We wanted a fast, easy way for developers to test code against a real OpenStack environment, without having to stand up hardware themselves. It probably goes without saying that this is not the place for production code - you should host only test code and test servers here. In fact, your account on TryStack will be periodically wiped to help make sure no one account tries to rule tyrannically over our democracy. Play nice in the sandbox!

In order to get access you need to use your Facebook account to log in.



IMPORTANT NOTE: In order to log in with the Facebook link, you must be a member of the TryStack Facebook group. API access is available by resetting your password in the web interface using the settings for your account and selecting API Access.

Once you've joined the Facebook group and logged in, you'll find yourself quickly at the rather empty OpenStack view.




If this is your first time testing OpenStack, you'll probably want to click Images, choose one and click Launch Instance.

You won't be able to login into your instance as root password, you'll need to upload your SSH public key first. This seems to be the most common question on the user forum...

Now you are own your way becoming the next OpenStack expert. Have fun!

And once you are ready to setup your own OpenStack installation, go to https://www.rdoproject.org/ for free community version of OpenStack or to http://www.redhat.com/en/technologies/linux-platforms/openstack-platform for Red Hat's enterprise version.



2016-01-17

Streaming videos from Linux to Apple TV

Apple TV is nice and affordable device to access Netflix and Youtube from your television. It also nicely integrates with your Apple computers. But what if you don't have any Apple computers and you have some content on your Linux which you'd like to watch on your TV set using Apple TV?

As we all know Apple is not very famous of following industry standards, for example in this case they don't support DLNA specification which would allow streaming content across different device vendors.

I'm using Fedora Linux on my home computer, and it comes with DLNA compatible sharing built-in. To enable it go to Settings > Sharing > Media Sharing > Add a folder containing some media files.

As Apple TV doesn't have any DLNA compatible applications, and on the devices before 4th generation you can't even install any apps you'll need to work around the problem some way. On 4th gen Apple TV you can install VLC which will fix the problem.

For older Apple TV's you'll need to use your phone as a remote control and trick the Apple TV to start streaming. Magically it actually does support streaming this way... You can install AllConnect app for Android or IOS from http://allconnectapp.com/.

AllConnect is able to browse your shared DLNA library from your Linux computer, and it can use Apple TV as a target device. After you start a media streaming, your phone is not involved in the streaming in any way, it goes directly from your computer to your Apple TV.

Dear Apple, why to make things this complicated? Oh right, to promote iTunes Store.  Standards? Who needs them...