Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (31 sloc) 3.161 kB

Server Configuration & Customization

This article will walk you through the typical configuration applied to servers built by the Spree Deployment Service and how to customize the configuration.

endprologue.

Configuration Management

All servers configured with the Spree Deployment Service are configured as clients to our public Puppet server. Puppet is a ruby based configuration management system (similar to Chef), and using it allows us to centrally control and update all configurations to ensure your server is always running the best possible configuration.

Using Puppet also restricts how you can edit or change certain key configuration files, we provide several extension points when you can make your changes to files while still receiving the benefits of Puppet for other files.

NOTE: Puppet is not configured (or intended) to be run as a client daemon on your server, you should only run the update commands on an as needed basis.

Server Configurations

All servers are currently configured with the following basic elements:

  • Ruby – compiled from source using ruby-build, installed system wide
  • Puppet client 2.7.x
  • Git
  • Foreman – process management

Depending on the role assigned to a server it may get some or all of the following:

Application Servers:

  • Unicorn – rack application server
  • Nginx – web server / unicorn front end

Database Server:

  • MySQL – database server

File Locations

Every server contains a single directory that houses the application and all serves as a location to configure several key aspects of the servers software stack:

  • /data/ – top level directory that contains all application specific data.
  • /data/spree/ – houses the application itself, serves as the deploy destination in Capistrano scripts.
  • /data/spree/current/ – the current live / production version of the application code (symlink to the relevant releases subdirectory).
  • /data/spree/releases/ – contains current and last 5 deployed releases of the application’s code.
  • /data/spree/shared/ – directories and files that are common among all deployed versions of an application (like assets, configuration files, etc).
  • /data/spree/shared/config/ – conatins several application specific configuration files including:
    • - database.yml – Automatically generated configuration file for Rails / ActiveRecord, contains all the details required to connect the associated applications database. This file is sym-linked into place as part of the Capistrano deploy process.
    • - Procfile – Automatically generated process configuration files, for more see the Application Processes article. This file is sym-linked into place as part of the Capistrano deploy process.
    • - unicorn.rb – Automatically generated unicorn configuration file, reference by the Procfile above when starting the application server processes.
  • /etc/ssl – You can upload your SSL certificate files into this directory and the will be automatically used by Puppet in your application Nginx configuration file. See the Requesting and Configuring SSL Guide for more details.
Jump to Line
Something went wrong with that request. Please try again.