Giter Site home page Giter Site logo

mina-setup_ssh's Introduction

Mina Setup SSH

mina-setup_ssh provides SSH provisioning for mina.

Requirements

rsync is required (by default) to copy SSH keys during setup task.

Configuration

The following configuration variables are available:

Key Type
setup_ssh_keys Array or Hash
setup_ssh_sync_command Array or String
setup_ssh_load_command Array or String

Depends on the following settings:

  • user
  • domain

When setup_ssh_keys is a Hash, keys are used to name files received by the server. When an Array file naming is symetric.

Executable dependencies

Executable
rsync required (as default) both on client and server
ssh-add required on server
ssh required on client (OpenSSH)

Sample Minafile

# frozen_string_literal: true

require 'mina/rails'
require 'mina/git'
require 'mina/setup_ssh/tasks'

set :application_name, 'foobar'
set :domain, '172.17.0.2'
set :user, 'root'
set :deploy_to, '/var/www/foobar.com'
set :repository, 'ssh://[email protected]:/var/git/foobar.git'
set :branch, 'master'
set :forward_agent, true

set :setup_ssh_keys, {
  git: '~/.ssh/git_rsa'
}

task :remote_environment do
  invoke :'setup:ssh:load'
end

task :setup do
  invoke :'setup:ssh:sync'
end

task :deploy do
  deploy do
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'

    on :launch do
      in_path(fetch(:current_path)) do
        command %{mkdir -p tmp/}
        command %{touch tmp/restart.txt}
      end
    end
  end
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.