All Projects → tablexi → Capistrano3 Unicorn

tablexi / Capistrano3 Unicorn

Licence: mit

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Capistrano3 Unicorn

Cloudlist
Cloudlist is a tool for listing Assets from multiple Cloud Providers.
Stars: ✭ 207 (-12.29%)
Mutual labels:  devops
Helloworld Msa
Main repository with documentation and support files
Stars: ✭ 218 (-7.63%)
Mutual labels:  devops
Vagrant Openstack Provider
Use Vagrant to manage OpenStack Cloud instances.
Stars: ✭ 229 (-2.97%)
Mutual labels:  devops
Jinx
✨jinx - a magical nginx wrapper
Stars: ✭ 215 (-8.9%)
Mutual labels:  devops
Awesome Devsecops
An authoritative list of awesome devsecops tools with the help from community experiments and contributions.
Stars: ✭ 2,805 (+1088.56%)
Mutual labels:  devops
Errbot
Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
Stars: ✭ 2,605 (+1003.81%)
Mutual labels:  devops
Dockerapp
Source code for James Lee's Docker course
Stars: ✭ 210 (-11.02%)
Mutual labels:  devops
Mgmt
Next generation distributed, event-driven, parallel config management!
Stars: ✭ 2,708 (+1047.46%)
Mutual labels:  devops
Nci Ansible Ui
Simple web interface for running Ansible playbooks
Stars: ✭ 217 (-8.05%)
Mutual labels:  devops
Goreplay
As your application grows, the effort required to test it also grows exponentially. GoReplay offers you the simple idea of reusing your existing traffic for testing, which makes it incredibly powerful. Our state of art technique allows you to analyze and record your application traffic without affecting it. This eliminates the risks that come with putting a third party component in the critical path.
Stars: ✭ 14,981 (+6247.88%)
Mutual labels:  devops
Popper
Container-native task automation engine.
Stars: ✭ 216 (-8.47%)
Mutual labels:  devops
Simple Devops Project
Stars: ✭ 215 (-8.9%)
Mutual labels:  devops
Awesome Ci
List of Continuous Integration services
Stars: ✭ 2,737 (+1059.75%)
Mutual labels:  devops
Sfpowerkit
A Salesforce DX Plugin with multiple functionalities aimed at improving development and operational workflows
Stars: ✭ 214 (-9.32%)
Mutual labels:  devops
Kubestriker
A Blazing fast Security Auditing tool for Kubernetes
Stars: ✭ 213 (-9.75%)
Mutual labels:  devops
Bookmarks
🔖 +4.3K awesome resources for geeks and software crafters 🍺
Stars: ✭ 210 (-11.02%)
Mutual labels:  devops
Opensa
资产管理、资产采集、灰度发布、反向代理、批量任务、任务编排、计划任务、日志审计、权限管理、角色管理、部门管理、运维自动化
Stars: ✭ 220 (-6.78%)
Mutual labels:  devops
So You Want To Onboard A Devops Engineer
Guidance on how to make your environment easier to onboard for Web Ops Engineers, SRE's and DevOps Practitioners
Stars: ✭ 236 (+0%)
Mutual labels:  devops
Devops Bash Tools
550+ DevOps Bash Scripts - AWS, GCP, Kubernetes, Kafka, Docker, APIs, Hadoop, SQL, PostgreSQL, MySQL, Hive, Impala, Travis CI, Jenkins, Concourse, GitHub, GitLab, BitBucket, Azure DevOps, TeamCity, Spotify, MP3, LDAP, Code/Build Linting, pkg mgmt for Linux, Mac, Python, Perl, Ruby, NodeJS, Golang, Advanced dotfiles: .bashrc, .vimrc, .gitconfig, .screenrc, .tmux.conf, .psqlrc ...
Stars: ✭ 226 (-4.24%)
Mutual labels:  devops
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+1133.05%)
Mutual labels:  devops

Capistrano3 Unicorn

This is a capistrano v3 plugin that integrates Unicorn tasks into capistrano deployment scripts; it was heavily inspired by sosedoff/capistrano-unicorn but written from scratch to use the capistrano 3 syntax.

Gotchas

  • The unicorn:start task invokes unicorn as bundle exec unicorn by default.

  • When running tasks not during a full deployment, you may need to run the rvm:hook:

    cap production rvm:hook unicorn:start

Conventions

You can override the defaults by set :unicorn_example, value in the config/deploy.rb or config/deploy/ENVIRONMENT.rb capistrano deployment files.

Example Unicorn config examples/unicorn.rb

  • :unicorn_exec

    Default assumes using 'unicorn'. 'unicorn_rails' may be used instead.

  • :unicorn_pid

    Default assumes your pid file will be located in CURRENT_PATH/tmp/pids/unicorn.pid. The unicorn_pid should be defined with an absolute path.

  • :unicorn_config_path

    Default assumes that your Unicorn configuration will be located in CURRENT_PATH/config/unicorn/RAILS_ENV.rb

  • :unicorn_roles

    Roles to run unicorn commands on. Defaults to :app

  • :unicorn_options

    Set any additional options to be passed to unicorn on startup. Defaults to none

  • :unicorn_rack_env

    Set the RACK_ENV. Defaults to deployment unless the RAILS_ENV is development. Valid options are "development", "deployment", or "none". See the RACK ENVIRONMENT section of the unicorn documentation for more information.

  • :unicorn_bundle_gemfile

    REMOVED in v0.2.0

    Set the BUNDLE_GEMFILE in a before_exec block in your unicorn.rb. See sandbox and unicorn-restart-issue-with-capistrano

  • :unicorn_restart_sleep_time

    In unicorn:legacy_restart send the USR2 signal, sleep for this many seconds (defaults to 3), then send the QUIT signal

Setup

Add the library to your Gemfile:

group :development do
  gem 'capistrano3-unicorn'
end

Add the library to your Capfile:

require 'capistrano3/unicorn'

Invoke Unicorn from your config/deploy.rb or config/deploy/ENVIRONMENT.rb:

If preload_app:true use:

after 'deploy:publishing', 'deploy:restart'
namespace :deploy do
  task :restart do
    invoke 'unicorn:restart'
  end
end

If preload_app:true and you need capistrano to cleanup your oldbin pid use:

after 'deploy:publishing', 'deploy:restart'
namespace :deploy do
  task :restart do
    invoke 'unicorn:legacy_restart'
  end
end

Otherwise use:

after 'deploy:publishing', 'deploy:restart'
namespace :deploy do
  task :restart do
    invoke 'unicorn:reload'
  end
end

Note that presently you must put the invoke outside any on block since the task handles this for you; otherwise you will get an undefined method 'verbosity' error.

Ensure that your unicorn_pid directory has been added Capistrano's linked_dirs. Otherwise unicorn workers will not be properly killed/restarted.

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].