All Projects → aleks → Ansible Rails

aleks / Ansible Rails

Ansible: Ruby on Rails Server

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Ansible Rails

Ansible Roles
Ansible Roles
Stars: ✭ 375 (+18.3%)
Mutual labels:  ansible, ansible-playbook, ansible-playbooks
useful-playbooks
🚚 Useful Ansible playbooks for easily deploy your website or webapp to absolutely fresh remote virtual server and automation many processes. Only 3 minutes from the playbook run to complete setup server and start it.
Stars: ✭ 52 (-83.6%)
Mutual labels:  ansible-playbook, deployment, ansible-playbooks
Ansible Rails
Ruby on Rails deployment using Ansible - with Lets Encrypt, Sidekiq, PostgreSQL, nginx & puma
Stars: ✭ 199 (-37.22%)
Mutual labels:  ansible, rails, deployment
Centos7 Cis
Ansible CentOS 7 - CIS Benchmark Hardening Script
Stars: ✭ 64 (-79.81%)
Mutual labels:  ansible, ansible-playbook, ansible-playbooks
Ansible Playbooks
Ansible Playbook for Icinga 2
Stars: ✭ 224 (-29.34%)
Mutual labels:  ansible, ansible-playbooks
Spamscope
Fast Advanced Spam Analysis Tool
Stars: ✭ 223 (-29.65%)
Mutual labels:  ansible, ansible-playbook
Ansible Playbook Grapher
A command line tool to create a graph representing your Ansible playbook tasks and roles
Stars: ✭ 234 (-26.18%)
Mutual labels:  ansible, ansible-playbook
swiss-army
Ansible-driven configuration management for maintaining a preferred environment (base system and app dotfiles / configurations)
Stars: ✭ 44 (-86.12%)
Mutual labels:  ansible-playbook, ansible-playbooks
Graylog Ansible Role
Ansible role which installs and configures Graylog
Stars: ✭ 173 (-45.43%)
Mutual labels:  ansible, ansible-playbook
ansible-palybooks
Ansible Palybooks Written and Published by www.server-computer.com. NO WARRANTY for any damages and loss of data.
Stars: ✭ 24 (-92.43%)
Mutual labels:  ansible-playbook, ansible-playbooks
RHEL7-CIS
Ansible RHEL 7 - CIS Benchmark Hardening Script
Stars: ✭ 28 (-91.17%)
Mutual labels:  ansible-playbook, ansible-playbooks
Shiva
An Ansible playbook to provision a host for penetration testing and CTF challenges
Stars: ✭ 220 (-30.6%)
Mutual labels:  ansible, ansible-playbook
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (-31.23%)
Mutual labels:  ansible, deployment
Rollback
Ansible role to rollback scripting applications like PHP, Python, Ruby, etc. in a capistrano style
Stars: ✭ 230 (-27.44%)
Mutual labels:  ansible, deployment
Tomo
A friendly CLI for deploying Rails apps ✨
Stars: ✭ 260 (-17.98%)
Mutual labels:  rails, deployment
ansible-st2
Ansible Roles and Playbooks to deploy StackStorm
Stars: ✭ 85 (-73.19%)
Mutual labels:  deployment, ansible-playbooks
Elasticsearch Rails
Elasticsearch integrations for ActiveModel/Record and Ruby on Rails
Stars: ✭ 2,896 (+813.56%)
Mutual labels:  rails, ruby-on-rails
Ansible Playbooks
Playbooks for automating server procedures based on our Community guides
Stars: ✭ 285 (-10.09%)
Mutual labels:  ansible, ansible-playbooks
Dellemc Openmanage Ansible Modules
Dell EMC OpenManage Ansible Modules
Stars: ✭ 169 (-46.69%)
Mutual labels:  ansible, ansible-playbook
Deploy
Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
Stars: ✭ 2,141 (+575.39%)
Mutual labels:  ansible, deployment

Ansible: Ruby on Rails Server

Use this ansible playbook to setup a fresh server with the following components:

  • Nginx
  • Puma App Server
  • Certbot (Let's Encrypt)
  • MySQL
  • Memcached
  • Redis
  • Sidekiq
  • Monit (to keep Puma and Sidekiq runnig)
  • Elasticsearch
  • ruby-install
  • chruby
  • Directories to deploy Rails with Capistrano and Puma App Server (see below)
  • Swapfile (useful for small DO instances)
  • Locales
  • Tools (tmux, vim, htop, git, wget, curl etc.)

Prerequisites & Config

  1. Rename hosts.example to hosts and modify the contents.

  2. Rename group_vars/all.example to group_vars/all and modify the contentes.

    There are a bunch of things you can set in group_vars/all. Don't forget to add your host address to hosts.

Install Playbook

Run ansible-playbook site.yml -i hosts.

Rails Setup

This is just a loose guideline for what you need to deploy your app with this playbook and server config. Please keep in mind, that you need to modify some values depending on your setup (especially passwords and paths!)

Gemfile

Add the following gems to your Gemfile and install via bundle install:

group :development do
  gem 'capistrano', '~> 3.6'
  gem 'capistrano-rails', '~> 1.2'
  gem 'capistrano-chruby'
  gem 'capistrano3-puma'
  gem 'capistrano-sidekiq'
  gem 'capistrano-npm'
end

Capfile

Add the following lines to your Capfile:

# General
require 'capistrano/rails'
require 'capistrano/bundler'
require 'capistrano/rails/migrations'
require 'capistrano/rails/assets'
require 'capistrano/chruby'
require 'capistrano/npm'

# Puma
require 'capistrano/puma'
install_plugin Capistrano::Puma  # Default puma tasks
install_plugin Capistrano::Puma::Workers  # if you want to control the workers (in cluster mode)
# install_plugin Capistrano::Puma::Jungle # if you need the jungle tasks
install_plugin Capistrano::Puma::Monit  # if you need the monit tasks
install_plugin Capistrano::Puma::Nginx  # if you want to upload a nginx site template

# Sidekiq
require 'capistrano/sidekiq'
require 'capistrano/sidekiq/monit'

config/deploy.rb

Please edit "deploy_app_name", "repo_url", "deploy_to" and "chruby_ruby" (if you've changed the Ruby version in group_vars/all).

Your config/deploy.rb should look similar to this example:

set :application, 'deploy_app_name'
set :repo_url, 'YOUR_GIT_REPO'
set :deploy_to, '/home/deploy/deploy_app_name'
set :chruby_ruby, 'ruby-2.3.3'
set :nginx_use_ssl, true
set :puma_init_active_record, true
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system')
set :keep_releases, 5

config/deploy/production.rb

Add the target host:

server 'your_host_address', user: 'deploy', roles: %w{app db web}

Feedback

Feel free to send feedback or report problems via GitHub issues!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].