Code Monkey home page Code Monkey logo

tw-devvm's Introduction

Instructions and scripts for setting up a Linux development virtual machine


Setting up the vmdk image on your own machine

Installing the VM

  • Install Oracle VM VirtualBox Manager on your machine
  • Create the C:\dev, C:\dotfiles directories on your machine
  • Copy the TW_devVM directory from _T:\Operations\Products\Software\Client_ into your VirtualBox VMs directory
  • Start the image
  • On first boot, you will be asked to choose a username and password

Accessing drives on your machine

By default, you should be able to see the C:\dev, C:\dotfiles, T:, X:\ and Y:
drives. These are mounted in the /media directory e.g. as /media/sf_dev and linked to the home directory. The files are owned by root and belong to the vboxsf group. As a member of the vboxsf group, you should be able to access and change the files.

Some programs have problems following symbolic links, or if you do not own the files that you are working with. In this case it is necessary to connect to them in a different way:

  • Shut down the virtual machine

  • Share the folder (e.g. C:\Users....\plugins\Roadnet) in VirtualBox Manager, but do not make it mount automatically

  • Start the virtual machine

  • Create a directory where you want to access the folder (e.g. /home/..../plugins/Roadnet)

  • Add the following command to the /etc/rc.local file, above exit 0:

    mount -t vboxsf -o rw,gid=1000,uid=1000 sharename /path/to/new/dir
    
  • After a reboot of the virtual machine, you should be able to access the files.

Install IDEs via umake

Eclipse (Luna) and Pycharm can be (were) installed with the umake tool.

umake ide eclipse
umake ide pycharm

You can make them accessible from the command line by linking the executable file into your ~/bin directory:

ln -s /path/to/pycharm /home/username/bin

Install server apps

Server apps are not installed by default. They can be installed with the following commands:

# install packages - Web
sudo apt-get install apache2 tomcat7 tomcat7-admin

# add geoserver from WAR file
wget http://sourceforge.net/projects/geoserver/files/GeoServer/2.4.0/geoserver-2.4.0-war.zip
unzip geoserver-2.4.0-war.zip geoserver.war
sudo mv geoserver.war /var/lib/tomcat7/webapps/

# install packages - Postgres
sudo apt-get install \
postgresql-9.4-postgis-2.1 \
postgresql-contrib \
postgresql-9.4-pgrouting

Other useful commands

  • Switch between installed java versions

    sudo update-alternatives --config java
    sudo update-alternatives --config javac
    java -version
    
  • Pick your default editor

    sudo update-alternatives --config editor
    

Creating the vmdk image

  • Create new virtual machine with 16 Gb disk space called TW_devVM_vanilla
  • Share the C:\dev, C:\dotfiles, T:, X:\ and Y:\ drives with it (automount, full access)
  • Use Linux Mint OEM image, so each user gets to set own preferences
  • Install Linux from the .iso file (username oem, password TWAdm1n)
  • Shut down the virtual machine
  • Make a full clone of TW_devVM_vanilla, called TW_devVM_prep
  • Start up TW_devVM_prep

Preparation of the software and settings

Note that Linux Mint comes with the following installed:

  • virtualbox-guest-utils
  • virtualbox-guest-dkms
  • virtualbox-guest-x11

These are used to communicate with VirtualBox and have to be install manually in some other distributions.

  • Clone the git repository with the installation scripts:

    git clone https://[email protected]/scm/~tw-johns/tw_devvm.git TW_devVM
    
  • Move into the directory and run the setup script:

    cd TW_devVM
    bash dev_VM_setup.sh
    
  • Set up and personalise other settings e.g. install QGIS plugins

    • Zoom to postcode
    • OpenLayers
    • IPython terminal

Sharing the virtual machine image

  • Pause the TW_devVM_prep machine, then close and Save Machine State

  • Make a full clone into TW_dev_VM, and start the new machine

  • Run 'Prepare for shipping to end user' from the desktop

  • Delete desktop icon from the skeleton directory:

    sudo rm /etc/skel/Desktop/Prepare\ for\ shipping\ to\ end\ user
    
  • Shutdown the virtual machine

  • Copy the TW_devVM directory from the VirtualBox VMs directory onto the network at _T:\Operations\Products\Software\Client_

tw-devvm's People

Contributors

volcan01010 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.