Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deploying Ruby on Rails applications on Product...

Deploying Ruby on Rails applications on Production Servers

This talk guides Ruby on Rails Developers on what they should think about when designing ,developing and deploying a web application on production servers such as Google Compute Engine, Amazon EC2, Digital Ocean, Linode or Rackspace Servers

Kenneth Kinyanjui

May 05, 2016
Tweet

More Decks by Kenneth Kinyanjui

Other Decks in Technology

Transcript

  1. This Talk: ❖ Devops ❖ Version Control ❖ Git Flow

    ❖ Configuration Management ❖ Monitoring and Logging ❖ Deployment
  2. What is DevOps ? • Software Development ◦ Code ◦

    Test ◦ Deploy • Quality Assurance ◦ Testing ◦ Continuous Integrations • Operations ◦ Orchestration ◦ Logging ◦ Monitoring Credits @jmwai
  3. What are this configurations ? ❖ Environment Variable ❖ Nginx

    Configuration ❖ Passenger Configuration ❖ Database Configuration
  4. Capistrano ❖ Written in Ruby ❖ Popular in the Rails

    community ❖ Can be used with other languages as well ❖ Organises operative directions in files known as recipes ❖ Not just userful with deployment, you can use it to build servers, install applications, maintenance and monitoring ❖ Great documentation at http://capistranorb.com/#
  5. Ansible ❖ According to the creators, Ansible is the simplest

    way to automate apps and IT infrastructure ❖ Uses YAML syntax. ❖ Configuration details are organised in roles with each roles containing it’s own files, tasks, handlers, vars, templates. ❖ Playbooks contain roles and target hosts. ❖ Plenty of free tested roles available on https://galaxy.ansible.com ❖ Recently acquired by Redhat
  6. Ansible Playbook Example - name: Install Nginx sudo: yes apt:

    pkg=nginx state=installed update_cache=yes - name: Disable the default site sudo: yes file: path=/etc/nginx/sites-enabled/default state=absent - name: Install Nginx Configuration File. sudo: yes copy: src={{ project_name }} dest=/etc/nginx/sites-enabled/{{ project_name }} notify: Reload Nginx
  7. Monitoring ❖ Stack Driver - Google Monitoring and Logging solution

    ❖ New Relic - Collect and display data on your apps, infrastructure. Real time updates. ❖ Cloud Watch - Monitoring as a service for AWS resources. Can monitor EC2 servers, RDS, DynamoDB... ❖ Nagios - Monitor your entire infrastructure - Systems, networks, infrastructure. nagios.org
  8. Logging ❖ Sentry - Real Time exception tracking for webapps.

    Started in the Django community. Now a paid service. ❖ LogStash - Collect and analyze logs from various sources. ❖ Kibana - Collect, analyze, visualize, search your logs. ❖ Datadog - Collect and visualize various performance metrics from your apps.
  9. Deploying an RoR App Guidelines ❖ Version Control with Git

    ❖ Git Flow Guidelines within the team ❖ Configuration Management & Orchestration with Ansible ❖ Daily, Weekly Builds ❖ Monitoring and Logging with Papertrail ❖ Issue Tracking and process of Solving bugs ❖ Think Agile
  10. What is a Modern Web Developer? ❖ Can you make

    a build in one step? ❖ Do you make daily builds? ❖ Do you use configuration management tools to automate Infrastructure? ❖ Is the development documented and automated? ❖ Can you roll out and roll back deployments in one step? Credits @jmwai