Category Archives: GNU/Linux

Installing NumPy and SciPy on Mac OSX 10.8 (Mountain Lion)

I am playing with ExpEyes, which is awesome tool for anyone who wants to learn electronics (and physics).

ExpEyes comes with software (written in python) for GNU/Linux and Windows. I intend to run it on Mac OSX, because it can (provided all dependencies are met).

It is generally easy to install python packages on OSX using easy_install or pip, however, installing NumPy and SciPy turned out to be pain on OSX (10.8.2, latest version the time of posting).

In my case, I am using python binary installed via homebrew, so I can’t take advantage of numpy (which comes installed with mountain-lion).

I have XCode 6 installed, which comes with gcc-4.2.1 (llvm build). I figured out, I can build numpy and scipy from source.

Following is what I did to build numpy and scipy. SciPy requires gfortran, so that has to be installed (I used homebrew to do that):

$ git clone https://github.com/numpy/numpy.git
$ git clone https://github.com/scipy/scipy.git
$ cd numpy
$ python setup.py build && python setup.py install
$ brew install gfortran
$ cd ../scipy
$ python setup.py build && python setup.py install

BTW! In case, you are wondering, why didn’t I use Scipy Superpack script, which indeed makes job easier?

I didn’t, because I want to install gnu/unix packages using homebrew, and I already have git and other things. Super Spicypack downloads (gfortran, etc.), builds and installs packages directly to system, making it harder to remove those later? Homebrew makes job easier.

RIP, Kenneth Gonsalves “KG” (1953 — 2012)

Kenneth Gonsalves(Image Courtesy: Linux Bangalore (foss.in))

Kenneth Gonsalves, a champion in Indian (NRC)FOSS, Python and Django community passed away on August 3, 2012. Kenneth’s presence would be hugely missed in the community.

In 2008, Tarun Dua introduced me to Kenneth. I interacted with him at various occasions about NRCFOSS and general stuff. I was very inspired to see his contributions, specially some of his open-source projects.

While checking out NRCFOSS website today, I came to know about this sad news.

May his soul rest in peace.

Development Setup – Updated

I posted about our proposed development setup, during these years a few things have changed a bit. More or less, this is what we have:

  • GNU/Linux (Ubuntu) and Windows(some) boxes for developers
  • Eclipse (PDT) IDE with loads some plugins
  • Version Control: Subversion, GIT, GIT-SVN
  • Browsers
    • Firefox
    • Chrome
    • Opera
    • Safari
    • OperaMini (Simulator)
    • FirefoxMobile (Simulator)
  • Plugins for browsers:
    • Firebug (with loads of plugins – YSlow, etc.)
    • Web Developers Tools (firefox)
    • Others (developer’s preference)
  • Developers also use WINE to run some windows software on GNU/Linux

Testing:

  • Windows Box with different browsers (versions, vendors)
  • Windows Box with different Mobile Emulators/Simulators
  • Selenium Plugin for Firefox

Development Servers/Applications:

  • Apache HTTPD
  • Mysql Server
  • Trac
  • MediaWiki
  • PHPMyAdmin
  • ReviewBoard (limited usage)
  • Hudson (limited usage)

Virtualization with VMware vSphere (ESXi) Hypervisor

One of our servers, collocated in our office, crashed couple of weeks back. We took this opportunity to virtualize most of the stuff, earlier only some intances were virtualized.

Installing and setting up VMware vSphere Hypervisor is a straight forward process, even the process of creating virtual-machines.

Most of time, I spent was figuring out:

  • Storage devices and configuration
  • How many virtual machines, do we need?
  • Which operating systems, do we need?
  • Network configuration

I am not going to cover details of installation and network configuration. I might write more posts in future to cover specifics. Meanwhile, I would love to answer the comments, if I know or share anything I know.

Anyway, this is what we have now:

  • IBM x3250 M2
    • Intel Xeon (Quadcore) x64
    • 4 GB memory
    • 3TB+ storage connected to LSI RAID and SATA controller
  • Host: VMware vSphere Hypervisor – which runs out of  1.5 TB datastore, directly connected to SATA controller (different from LSI)
  • Guest VMs:
    • OpenVPN Access Server for VPN
    • Ubuntu 10.10 Server as Development sandbox
    • Zentyal(eBox) as Internet Gateway (filtering, IDs, proxy)
    • Ubuntu 10.04 LTS Server for SVN, Mails, Local Staging WebServer
    • Windows 2008 Server for ActiveDirectory, FileServer, Windows-Specific-Software (access-control-management-gui, etc.)
    • Others: Project Specific VMs

We are very happy with the improved performance and stability, and the way hardware is properly used. Thanks to VM templates, clones and snapshots, we would be able to provision above infrastructure with minimal downtime.

I would soon replace Windows Server with Zentyal (eBox), which I believe, can handle most of things. However, we would need another Windows XP box to run some software (proprietary), which only runs on windows, to manage various other devices (EPBX, Access-Control-System, etc.).

We now have relatively more scalable infrastructure, more virtual machines can be created to take care of email-server, svn-server, etc.

We are yet to invest in a sophisticated storage device such as DAS or NAS or SAN, hence we are relying on some cheap tricks here:

  • 1.5 TB disk as datastore for VMware vSphere, which stores
    • Guest Operating System VMs
    • Guest Operating System VMs Paging files
    • Virtual Disks (non critical data – programs and configs) required by host virtual-machines
  • 1.5 TB disk via Raw Device Mapping (RDM) shared among virtual machines
  • 500 GB disk via Raw Device Mapping (RDM) shared among virtual machines
  • 1.5 TB USB/Firewire – Backup storage
    • Rsync is used to backup critical data and configs from all virtual machines on daily, weekly and monthly basis.

Things I didn’t like:

  • VMware vSphere client requires Microsoft Windows
  • VMware vSphere client doesn’t allow creating RDMs from GUI, one has to use these instructions

Finally, I could execute some of things I planned more than two years back.

Ideas: FlashDevelop on OSX and GNU/Linux

FlashDevelop is an open-source IDE for Flash Platform development (ActionScript, MXML, HAXE, etc.) on Windows platform. I have extensively used it in past, and still, painfully, use it via windows virtual-machine on OSX host.

Couple of years back, I looked at FlashDevelop code to figure out, if we can port it for other operating-systems, such as Mac OSX and GNU/Linux.

I posted on Flash Develop forum about my experiments:

I have been trying to run FlashDevelop under OSX. In last couple of years, whenever I got sometime, I tried these:-

  1. Run FlashDeveloper with DotGNU: FlashDevelop was running but due to a lot of native (Win32) API calls, lots of components were failing (screenshot: http://pic.im/5Xk)
  2. Run Flash Developer with Mono: I tried to compile FlashDevelop using MonoDevelop and run using Mono for OSX. Most of the problems is one component/library i.e. DockPanelSuite (http://sourceforge.net/projects/dockpanelsuite/), an opensource code that uses a lot of PInvoke calls (Win32 API).

I am really excited about the possibilities, if we can port this one library we can get very closer to run FlashDevelop on OSX using Mono.

Note: pics.im seems to be dead, so I have uploaded new screen-shots
Flash Develop on OSX - ScreenshotFlash Develop on OSX

Some Ideas:

MonoDevelop is good enough and works well on OSX, I guess also GNU/Linux. However, I am yet to look at licensing and possibilities of forking the project (MonoDevelop)?

BTW! I have been lazy to write about such experiments on the blog, but while commenting on Jesse Warden’s post, I thought, it makes sense to post it here, so it lives.

Please let me know, if you have any ideas about making this happen? I would be happy to collaborate, contribute and donate in whatever capacity I can.

AptOnCD – A very useful utility for Ubuntu

What is AptonCD?

APTonCD is a tool with a graphical interface which allows you to create one or more CDs or DVDs (you choose the type of media) with all of the packages you’ve downloaded via APT-GET or APTITUDE, creating a removable repository that you can use on other computers.
APTonCD will also allow you to automatically create media with all of your .deb packages located in one specific repository, so that you can install them into your computers without the need for an internet connection.

How are we using it?

We have started moving most of our machines to use Ubuntu as primary operating system. This time, we wanted to streamline installation process and make it easier, so that our system-admin, who doesn’t know much about GNU/Linux can do things easily.

I documented most of the process on our internal wiki, I was wondering:

  • What would the easiest way to upgrade packages on new installations?
  • How can we save bandwidth consumed in upgrade process?
  • Importantly, how can we save time?

Now there were couple of options:

  • Set up a local apt-archive-mirror
  • Install via net-boot using local mirror.
  • Setup a local internet-proxy, which can cache things during first installation and serves cached data during further requests.

I am not an expert in GNU/Linux world, I have just basic knowledge and I am yet to learn a lot of things. Above options looked good to me, but I was not sure, I want to do all these (apt-mirror, etc) on our windows-server. Yes we are still using windows as server and we hope to replace with Linux server, after we are done moving all workstations.

I learnt about APTonCD while finding out an easier option for our requirements, I can say, APTonCD makes life lot easier. This is what I did:

  1. Installed Ubuntu
  2. Downloaded all latest updates using Update Manager
  3. Rebooted machine
  4. Installed APTonCD using sudo apt-get install aptoncd
  5. Installed LAMP using sudo tasksel install lamp-server
  6. Installed Likewise for Active Directory integration using sudo likewise-open
  7. Installed Subversion
  8. Replaced default Network Manager with WICD
  9. Installed many other packages
  10. Rebooted machine
  11. Configured likewise-open (i.e. joined AD domain)
  12. Configured all other (WICD, LAMP, etc)
  13. Launched APTonCD and created an ISO

APTonCD ISO image is stored on our NAS. While setting a new box, we just skip #2 from above list and instead use APTonCD to restore the packages from ISO image.

Now, we all understand, new updates keep coming every next day, how to keep machines updated in that case? Well, developers would be suggested to update, if they find it relevant. In any case, we would be doing update on each machine in scheduled way. On every Saturday, we would create a new APTonCD ISO image and use it on all other machines.

I think, we could manage to save a lot of time and bandwidth without really getting into a lot of hassle as shown in first list of this post.

I hope, you find APTonCD useful too. BTW! I think, APTonCD should work on other Debian based distros too, as said, I am no expert hence just can’t confirm except my gut-feeling :-)

Technorati Tags: , , , ,

Development Setup

I have been thinking a lot about a good and scalable development setup for small teams.That means, as team size grows, things don’t have to be changed.

Server machine(s):-

I am planning to have all of these one server machine (IBM) in virtualized environment. Subversion and Trac can go in one VM, perhaps under Apache. Second VM can have Apache for web-apps, third VM can have mysql, fourth VM can have MailServer and ActiveDirectory/LDAP?

Do you think above makes sense?

Developer/Designer workstations:-

Though there should not be any restrictions on using a development IDE of choice, but I have realized if entire team uses same IDE things get far easier. The development workflow is easy, knowledge sharing and management is easy. Eclipse, which Aptana is based on, can be used for variety of projects.

Ubuntu is good operating system, I have been using for over one year, not regularly but quite often. There might be Windows/OSX boxes for designers.

Why do we need Apache and MySQL on each workstation?

I think, developers are more effective if they have their own sandbox. They can play with code freely, take certain risks and innovate. There is no harm done. We do face issues, when it comes to sync mysql data into local mysql instances, I think it can be done via some scripts.

Virtualization can be done on client and I am thinking to do it, specially for folks who are not comfortable with Linux, so they can be on Windows while they also have access to Linux VM, they are encouraged to use Linux VM. They can use Windows box (Host), if something is messed up in Linux VM and there is strict timeline that doesn’t allow to fix VM.

Over the period, these developers would be comfortable with Linux and that is the time they can start using real Linux box :-)

These are some thoughts, I might be missing something here. I hope, I would write more in another post.

As you know, I have been on break and been thinking on all these things. BTW! I don’t work with Yahoo! anymore, once I am done with break I have to figure out what to do. Perhaps, time to be in my own city and do something my own (consultancy, startup or something like that). Heh, that’s news, if you have read so far :-)

Technorati tags: , , , , , , , , , , , , , ,