Eve Development Environment

Overview

The following guide covers details on how to setup your own Eve Development Environment on your local machine. Using these directions you can create a master Virual Machine template, import the Eve Static Data set into a MySQL database, and query it with a database management program.

I plan on having further guides on running other pieces of software. I want to write guides for Lockefox’s Eve-Prosper tools and the once active Wallet Manager program that I have blogged about; once I learn how to create a public repository on GitHub, I will have a guide on how to run it from a template VM as outlined in this guide.

Virtual Box Setup

Rather than install server services on your local machine, we’re going to isolate them in a Virtual Machine that can be backed up and cloned into unique instances for our needs.

  1. Download and install Virtual Box here.
  2. Download Ubuntu Server ISO image here. Since we won’t be interfacing over the GUI, we can lessen the resource consumption of the VM by going with the Server edition.
  3. Create a new Virtual machine named evedev1
  4. 2014-03-14_vm_setup
  5. Select 512 or 1,024 MB of RAM depending on how much you have on your desktop and how quickly you want your Development machine to run. The more RAM the better, but with the Eve static data set coming it at 525 MB, you will reach a diminishing return after the majority of the data gets into RAM. You can always adjust this setting by powering off the VM if you find performance to be problematic.
  6. Create a virtual hard drive now.
  7. I’m partial to the VMDK format given my VMware background.
  8. Select Dynamically allocated as not to claim empty space on your machine.
  9. Specify 8 GB of storage to start or more depending on how much free space you have available. The base server install will take around 1.2 GB.
  10. Go to Settings on the evedev1 machine and Chose a virtual CD/DVD disk file. Select the Ubuntu Server ISO that you previously downloaded.
  11. 2014-03-14_vm_iso
  12. Start the VM.

Ubuntu Server OS Setup

I prefer Ubuntu but you may want to use any number of Linux distributions.

  1. If your ISO is mounted correctly, you will be presented with a Ubuntu boot screen.
  2. 2014-03-14_vm_boot
  3. Select Install Ubuntu Server.
  4. Select your language, location, and keyboard mappings.
  5. Name the machine evedev1
  6. Create a evedev user.
  7. Create a password for the evedev user.
  8. Under partition disks select Guided – use entire disk. Since this is a Development VM, we will most likely not be using LVM.
  9. Select the partition and on the next screen write the changes.
  10. Allow apt to run to update packages.
  11. Select Install security updates automatically.
  12. Only select the OpenSSH server for now as we will be installing the database separately.
  13. Install the GRUB boot loader.
  14. After the installer finishes, reboot the VM.
  15. If everything is setup correctly, you should see a login prompt.

Creating a Template VM Image

This process gets us to a point where we have a base OS with patches installed. If we make any steps we can revert back to this image and also use this to spin off future copies of VM instances.

  1. Login as evedev with the password set during the install.
  2. Update local package database index with sudo apt-get update
  3. Update local packages with sudo apt-get upgrade. This process will take a while depending on the speed of your machine.
  4. Shut down the VM with sudo shutdown -h now
  5. If you want to make a backup of this file, do it now. We will consider this our Template VM image for making future clones.

Database Setup on a New Clone

  1. Create a Clone of evedev1 by right-clicking on the evedev1 machine and selecting Clone
  2. Name this clone evedev1-mysql and select Reinitialize the MAC address of all network cards.
  3. Select Full Clone.
  4. Power on the evedev1-mysql instance.
  5. Log in and check the IP address of the machine by using ifconfig.
  6. SSH into the IP address of your VM using PuTTY. I find that using PuTTY is more efficient than the Virtual Box interface since we will be pasting a long URL and will enable us to remotely access the database later.
  7. Install MySQL with sudo apt-get install mysql-server
  8. Set the mysql root user password.
  9. Find the latest MySQL conversion of the Eve Static Data at https://www.fuzzwork.co.uk/dump/.
  10. Copy the link of the latest conversion to your clipboard and download it with wget https://www.fuzzwork.co.uk/dump/mysql56-example.tbz2
  11. Uncompress the file with bunzip2 mysql56-example
  12. Un-tar the file with tar -xvf mysql56-example
  13. Change directory with cd rubicon-1.3-95173
  14. Enter the MySQL Monitor with sudo mysql -u root -p
  15. Create a new empty database with create database rubicon95173;
  16. Exit with exit;
  17. Import the extracted .sql with sudo mysql -u root -p -h localhost rubicon95173 < mysql56-rubicon-1.3-95173.sql
  18. Wait for the import process to complete. The import took around 6 minutes on my laptop.
  19. 2014-03-14_db_import

Remote Database Management

I prefer HeidiSQL to access the database, store queries, and edit table structures.

  1. Download and install HeidiSQL.
  2. Create a new Session and fill in the details for your VM. The details on the Settings tab will be the MySQL root user credentials for Hostname 127.0.0.1.
  3. Under the SSH tunnel tab, specify the location of your PuTTY executable. The SSH host + port will be the IP address of your VM such as 192.168.0.20 on port 22. The credentials on this tab will be for the evedev account.
  4. If successful, you should see our imported database and tables.
  5. 2014-03-14_db_tables

Running Queries

I wrote a guide on the basics of the Eve Static Dataset and some sample queries here.


5 Comments on “Eve Development Environment”

  1. Achanjati says:

    Hi,
    nice writing. I use a slithly differnt way to get the current dump because I wanted to do all the steps on a regular basis, ie via cron:

    echo “Get the dump and extract it to dump/, ignoring internal folder names”
    rm dump/*.sql
    wget https://www.fuzzwork.co.uk/dump/mysql-latest.tar.bz2
    tar -jxvf mysql-latest.tar.bz2 –strip=1 -C dump/

    echo “Make the dump name usable”
    cd dump/
    mv *.sql eve.sql

    With that I always have the dump in the folder “dump/” with the name “eve.sql”. From that point all other steps go further. I never have to type the name of the expansion the dumo belongs to.
    Great for putting in a shell script.

  2. raath says:

    Ah padawan. I’ve been remiss in passing this bit on.

    I’ve found that a lot of time can be saved by using a provisioning framework such as vagrant to create the VM. This can save a lot of time as the basic OS is done for you and there are loads of provisioning shell scripts out there to set up a standard LAMP (or LEMP if that’s your passion) environment. I tend to try and make my local environments as close to production as I can and use the same provisioning scripts on both environments so I have an exact match.

    Also if using any frameworks there are package managers available to create the correct additional services needed. I use fuelphp and have started to use composer.phar to install the added extras needed for each app I write.

    If VMs are not up your street then there are also application container frameworks such as Docker which is probably a smarter choice for small scale apps.

    • NightCypher says:

      Came here to say this essentially. A combination of Vagrant and a provisioning framework like Chef, Puppet or Ansible make everything a thousand times easier.The provisioning frameworks are complex and extremely powerful, but it’s usually pretty easy to find existing setups for each that will do things like set up a basic PHP/Apache/MySQL or Django/Postgres/Nginx/Gunicorn stack, all you’ll have to do is tweak where they’re loading the code from.

  3. Thank you good sir, I did have to add another network card in order to get the ssh to work for whatever reason but everything is working. I am looking forward to further posts.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.