Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sonoma-remote

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sonoma-remote

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sonoma::Remote

Manage Docker-based apps on remote servers.

Installation

# gemfile
gem "sonoma-remote"

# Capfile
load "sonoma/remote/tasks/all.rake" # or specific ones

Sonoma::Deploy.configure!({
  application: "your_app_name",
  docker_registry: "host_of_registry",
  docker_repository: "path_in_docker_registry",
  user: "your_deploy_user"
})

# config/deploy.rb
lock "{capistrano-version}"

# config/uat.rb
server("localhost", { roles: %W{app db worker}, user: fetch(:user), primary: true })

Configuration

load "sonoma/remote/tasks/all.rake" # or specific ones
Sonoma::Deploy.required_config # see required config for loaded tasks
Sonoma::Deploy.optional_config # see optional config for loaded tasks

Sample

load "sonoma/remote/tasks/all.rake"

verify = ->(host) do
  deployed_correct_version = false;
  on(host) do
    response = capture("curl", "localhost/status")
    json_response = JSON.parse(response)
    deployed_correct_version = (json_response["revision"] == fetch(:revision))
  end
  deployed_correct_version
end

docker_options =  -> {[
  "-e HOSTS_IN_ENVIRONMENT=[#{roles(:app).collect(&:hostname).join(",")}]",
  "-v /var/groupon/#{fetch(:application)}/log:/usr/src/app/log",
  "-v /var/groupon/#{fetch(:application)}/config/local:/usr/src/app/config/local"
]}

Sonoma::Remote.configure!({
  application: "gstream",
  docker_options: docker_options,
  docker_registry: "docker.groupondev.com",
  docker_repository: "grpn_stream/gstream",
  load_balancer_delay: 3,
  server_boot_time: 3,
  user: "gstream_deploy",
  verify: verify
})

FAQs

Package last updated on 07 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc