1. Remove unused kernels

    Removes all but current kernel and headers for freeing up disk space. This is a note for internal use and tested for Ubuntu Precise. Use at your own risk :)

    dpkg-query -f '${Package}\n' -W |  egrep 'linux-(headers|image)-[[:digit:]].*(|-generic)' | grep -v $(uname -r | sed 's/-generic//') | sudo xargs apt-get -q -q -yy --purge remove
    

    Breakdown

    1. List all packages.
    2. Find only linux-image and linux-header packages with version number, not the two main meta packages.
    3. Remove the linux-image and linux-header for running kernel from the list.
    4. Purge all listed packages from system without asking any questions.
    vim: set syn=markdown spell spl=en:

    Read more...


  2. Vagrant with OpenStack

    If you want to use Vagrant with OpenStack, you need to prepare Vagrant with installing the vagrant-openstack-plugin. I had some problems installing it directly through vagrant plugin install. I had to clone it from Github and install it manually.

    One time configuration

    Install OpenStack plugin in Vagrant

    sudo apt-get install ruby1.9.1 git virtualbox
    cd /tmp
    # At writing moment the latest version of Vagrant is the following version.
    wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb
    sudo dpkg -i vagrant_1.7.2_x86_64.deb
    git clone https://github.com/cloudbau/vagrant-openstack-plugin
    cd vagrant-openstack-plugin
    gem build vagrant-openstack-plugin.gemspec
    vagrant plugin install vagrant-openstack-plugin-*.gem
    

    Add a dummy box to Vagrant thats needed by the plugin.

    vagrant box add dummy https://github.com/cloudbau/vagrant-openstack-plugin/raw/master/dummy.box
    

    Download OpenStack RC file

    • Log into OpenStack
    • Download OpenStack API RC file
    • Go to Project -> Compute -> Access & Security -> API Access
    • Down ...

    Read more...


Page 1 / 1