Make Your Development Environment Ready While You Drink a Coffee

Vyacheslav Voronenko
4 min readOct 19, 2016

--

Introduction

As a contractor — software developer, I remaster my work environment often, depending on project requirements. Depending on NDA, sometimes I work remotely on provided boxes. It is important for me to get a typical set of work tools quickly. Let me share how I get my new environment done while I am drinking coffee.

Important: This tip was tested for workplaces based on ubuntu 14.04 LTS or 16.04 LTS only.

Background

This tip demonstrates an approach for unattended environment configuration with ansible. Why ansible? It has no dependencies except python, which by default is installed on the box. List of available software recipes:

Databases

  • MySQL MySQL Community database server
  • MongoDB Popular NoSQL database

Database Tools

  • DBeawer Great GUI tool to work with MySQL, Postgres and bunch or another DBs
  • Robomongo Awesome free gui client for MongoDB
  • Common schema DBA’s framework for MySQL

Development

  • [Python] Includes most recent packet manager — pip installation and update
  • [Java] Installs java runtime environment 6,7, or 8 on the box
  • [NodeJS] Installs nodeJS 0.10 or 0.12 with set of most popular tools, including grunt, gulp, bower, npm
  • [PHP] Installs PHP for apache or nginx as Fast-CGI

Documentation Tools

Tools to ensure your project documentation does not get lost

  • Apiary Markdown based grammar do describe your REST API
  • Aglio Custom renderer for apiary based syntax for REST API — zero dependency on apiary itself
  • PlantUML — Plain text grammar to describe project UML diagrams
  • Bizagi modeler Bizagi modeler — BMPN2.0 compatible tool for drawing business flow diagrams (Windows only)
  • Gliffy html5 based online diagramming tool with BMPN 2.0 support

Virtualization

  • Docker Necessary docker components to build and run docker containers locally
  • Oracle Virtual Box Free virtualization environment for Linux
  • Vagrant Create and configure lightweight, reproducible, and portable development environments
  • ESXi client tools When I work under ESXi — provides better experience

Webservers

  • Apache Classic WebServer (recipe supports both prefork and worker models)
  • Nginx Compact effective webserver for highload

Workplace Handy Tools

Collaboration

  • HipChat Crossplatform atlassian HipChat
  • Slack Crossplatform slack client
  • Speak.io custom video/screen/sound communication for teams. Free unlimited trial period.
  • Teamviewer Most known tool for screen sharing and remote control
  • Appear.in Client-less online multiplatform WebRTC collaboration tool with screen sharing support

Using the Code

Installation as simple, as:

  • get your brand new ubuntu 14.04 LTS or 16.04 LTS
  • install git, curl: sudo apt-get install curl git
  • clone repository: git clone git@github.com:Voronenko/ansible-developer_recipes.git
  • copy local.yml.template to local.yml
  • uncomment portions of software you want to install + adjust variables if needed
  • run bootstrap.sh to install ansible, and temporary make you sudoer w/o password
  • run local.sh to provision your box.

Bundled recipes:

#     - include: tasks_cleanupubuntu.yml                   # removes games, lens, etc
# - include: tasks_python.yml # basic updates to py & pip
# - include: tasks_worktools.yml # swiss knife for desktop utilities
# - include: tasks_mongodb_3.yml # mongodb 3.0
# - include: tasks_mysql.yml # MYSQL 5.5
# - include: tasks_percona_toolkit.yml # percona tools for mysql
# - include: tasks_nginx.yml # nginx
# - include: tasks_apache.yml # apache prefork|worker
# - include: tasks_nodejs.yml # node 0.10.* 0.12.*
# - include: tasks_java.yml # java 6-7-8
# - include: tasks_php_apache.yml # php 5.5 for apache
# - include: tasks_jetbrains_phpstorm.yml # PHP IDE
# - include: tasks_jetbrains_pycharm_community.yml # PY IDE
# - include: tasks_jetbrains_rubymine.yml # RUBY IDE
# - include: tasks_jetbrains_intellij_community.yml # JAVA IDE
# - include: tasks_robomongo.yml # mongo GUI tool
# - include: tasks_dbeawer.yml # mysql | postgre GUI tool
# - include: tasks_docker.yml # docker# - include: tasks_oracle_virtualbox.yml # Oracle Virtual Box
# - include: tasks_vagrant.yml # Vagrant
# - include: tools/tasks_expect.yml # expect tool
# - include: tools/tasks_plantuml.yml # plant uml
# - include: tools/tasks_toggle.yml # toggle time tracker
# - include: tools/tasks_dpr.yml # d.pr screenshoting tool
# VMWARE
# - include: vmware/tasks_vmware_tools.yml # ESX vmware tools
# DEVELOPMENT
# - include: tools/tasks_mailhog.yml # Web and API based SMTP testing

Optional recipes for local or vagrant based LAMP debugging:

# - include: "{{root_dir}}/vagrant/tasks_vagrant_php_webgrind.yml"         # Webgrind
# - include: "{{root_dir}}/vagrant/tasks_vagrant_phpmyadmin.yml" # PhpMyAdmin
# - include: "{{root_dir}}/vagrant/tasks_vagrant_php_xdebug.yml" # XDebug extension
# db import script, python venv init scripts
# - include: "{{root_dir}}/vagrant/tasks_vagrant_write_tools.yml"
# - include: "{{root_dir}}/vagrant/tasks_vagrant_import_mysqldb_databag.yml"
# (re)imports databases from db folder
# - include: "{{root_dir}}/vagrant/tasks_vagrant_apache2_devsites.yml"
# register apache websites on vagrant

Software versions:

apps_dir: "/home/YOURUSER/apps"
mysql_root_user: root
mysql_root_password: devroot
apache_mode: worker # use prefork or worker variables
dbeawer_version: 3.4.5
intellij_version: 14.1.4
java_version: 8
mailhog_version: 0.1.6
mongo_version: 3
nodejs_version: "0.12" # 0.10 0.12
oracle_vbox_version: 4.3
phpstorm_version: 10.0 # | 9.0.2 | 8.0.3 | 8.0.1 | 7.1.4 | 6.0.3 | 5.0.4
php_xdebug_version: 2.2.4
pycharm_version: 4.5.4
robomongo_version: 0.8.5
rubymine_version: 7.1.4
vagrant_version: 1.7.4
php_family: default # 5.4 | 5.5 | 5.6 | default
hypervisor: esx

If you want to apply similar set of recipes for virtual machine — you might be interested in taking a look at this example: https://github.com/voronenko/lamp-box and https://github.com/Voronenko/ansible-developer_recipes for standalone deploy.

Points of Interest

Looking for forks, pull requests. Some similar projects that will allow to configure Mac box in a similar way. Hope this way of developer box configuration will be useful for you.

--

--

Vyacheslav Voronenko
Vyacheslav Voronenko

Written by Vyacheslav Voronenko

Software engineer, with project management background. Founder @ softasap.com — cool automation for the people :) — have a problem that needs to be solved?

No responses yet