Infrastructure

We run a lot of projects at NECOLT, and don’t reinvent the wheel with every new project. Instead, we craft reusable and very stable infrastructures. Most of our projects share same infrastructure setup, so developers feel like at home when moving from one project to another.

In some of our projects we use containers (particularly Docker). But majority of our developed applications are deployed to traditional virtual servers on AWS or other trustful platforms.

We automate our infrastructures with Chef. Manual setup without automation tools is rarely done.

Chef

In our company Chef is used for automated servers provisioning. We chose this tool, because it has a wide range of open source cookbooks for virtually any service you may need and uses Ruby DSL. Berkshelf is also used to manage cookbooks. We prefer to use cookbooks from master branch and update it every month or so. Our Berkshelf file:

source "https://api.berkshelf.com"

cookbook 'user',                git: 'git://github.com/fnichol/chef-user.git'
cookbook 'openssh',             git: 'git://github.com/opscode-cookbooks/openssh.git'
cookbook 'sudo',                git: 'git://github.com/opscode-cookbooks/sudo.git'
cookbook 'postgresql',          git: 'git://github.com/necolt/postgresql.git', ref: 'ec17bbc4233901cebc132e178cb2969bcdf46fae' # waiting for patch approval
cookbook 'mysql',               git: 'git://github.com/opscode-cookbooks/mysql.git'
cookbook 'redisio',             git: 'git://github.com/brianbianco/redisio.git'
cookbook 'monit',               git: 'git://github.com/kreeti/monit.git'
cookbook 'logrotate',           git: 'git://github.com/opscode-cookbooks/logrotate.git'
cookbook 'newrelic',            git: 'git://github.com/escapestudios/chef-newrelic.git'
cookbook 'backup_scripts',      git: 'git://github.com/binarymarbles/chef-backup-scripts.git'
cookbook 'database',            git: 'git://github.com/opscode-cookbooks/database.git'
cookbook 'hostname',            git: 'git://github.com/3ofcoins/chef-cookbook-hostname.git'
cookbook 'nodejs',              git: 'git://github.com/redguide/nodejs.git'
cookbook 'chef-unattended-upgrades', git: 'git://github.com/firstbanco/chef-unattended-upgrades.git'
cookbook 'fail2ban',            git: 'git://github.com/opscode-cookbooks/fail2ban.git'
cookbook 'cron',                git: 'git://github.com/opscode-cookbooks/cron.git'
cookbook 'users',               git: 'git://github.com/sethvargo-cookbooks/users.git'
#cookbook 'rvm',                 git: 'git://github.com/fnichol/chef-rvm.git'
cookbook 'bluepill',            git: 'git://github.com/opscode-cookbooks/bluepill.git'
cookbook 'ohai',                git: 'git://github.com/opscode-cookbooks/ohai.git', ref: 'v2.1.0'
cookbook 'runit',               git: 'git://github.com/hw-cookbooks/runit.git'
cookbook 'firewall',            git: 'git://github.com/opscode-cookbooks/firewall.git'
cookbook 'ufw',                 git: 'git://github.com/opscode-cookbooks/ufw.git'
cookbook 'ntp',                 git: 'git://github.com/gmiranda23/ntp.git'
cookbook 'linode',              git: 'git://github.com/sauliusgrigaitis/linode-cookbook.git'
cookbook 'nginx',               git: 'git://github.com/necolt/nginx.git'
cookbook 'solr',                git: 'git://github.com/dwradcliffe/chef-solr.git'
cookbook 'memcached',           git: 'git://github.com/opscode-cookbooks/memcached.git', ref: 'v2.0.3' #newer requires latest compat_resourse, which is broken
cookbook 'compat_resource',     "12.5.14" #newer requires latest compat_resourse, which is broken
cookbook 'locale',              git: 'git://github.com/hw-cookbooks/locale.git'
cookbook 'ark',                 git: 'git://github.com/burtlo/ark.git'
cookbook 'java',                git: 'git://github.com/agileorbit-cookbooks/java.git'
cookbook 'omnibus-gitlab',      git: 'https://gitlab.com/gitlab-org/cookbook-omnibus-gitlab.git'
cookbook 'jenkins',             git: 'git://github.com/chef-cookbooks/jenkins.git'
cookbook 'letsencrypt',         git: 'git://github.com/schubergphilis/letsencrypt.git'
cookbook 'chromedriver',        git: 'git://github.com/dhoer/chef-chromedriver.git'
cookbook 'chrome',              git: 'git://github.com/dhoer/chef-chrome.git'
cookbook 'aws',                 git: 'git://github.com/chef-cookbooks/aws.git'
cookbook 'ebs',                 git: 'git://github.com/albertsj1/chef-ebs.git'
cookbook 'timezone-ii',         git: 'git://github.com/l2g/timezone-ii.git'

We freeze particular cookbook version only if the latest version is broken or isn’t compatible with other cookbooks. The goal is to have latest cookbook versions from main repositories. If we fix a bug or implement a new feature, we open pull request on GitHub.