Skip to content

hiroyuki-sato/digdag-plugin-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

digdag-plugin-ssh

Digdag ssh> operator plugin to execute a remote command via ssh.

This plugin supports two type of authentications. One is public key authentication(default). The other is password authentication.

Configuration

Release list.

Public key authentication

_export:
  ssh:
    host: host.add.re.ss
    user: username
    stdout_log: true # Output stdout log (default true)
    stderr_log: true # Output stderr log (default false)
  plugin:
    repositories:
      - https://jitpack.io
    dependencies:
      - com.github.hiroyuki-sato:digdag-plugin-ssh:0.1.4 # Modify latest version.

+step1:
  ssh>: ls
#  host: remote.host.name
#  port: 22
#  user: hiroysato

Register private and public key into secrets.

Local mode

digdag secrets --local --set ssh.private_key=@id_rsa
digdag secrets --local --set ssh.public_key=@id_rsa.pub

Server mode

digdag secrets --project <project> --set ssh.private_key=@id_rsa
digdag secrets --project <project> --set ssh.public_key=@id_rsa.pub

Password authentication

digdag secrets --local --set ssh.password=@alice_passwd_file
digdag secrets --local --set ssh.bob_passwd=@bob_passwd_file
_export:
  ssh:
    # global setting
    #host: host.add.re.ss
    #user: username
    stdout_log: true # Output stdout log (default true)
    stderr_log: true # Output stderr log (default false)
    password_auth: true #
  plugin:
    repositories:
      - https://jitpack.io
    dependencies:
      - com.github.hiroyuki-sato:digdag-plugin-ssh:0.1.4 # Modify latest version.

+step1:
  ssh>: ls
  host: remote.host.name
  port: 22
  user: alice
  # `ssh.password` value used by default.

+step2:
  ssh>: another_command
  host: remote.host.name2
  port: 22
  user: bob
  password_override: bob_passwd

Development

1) build

./gradlew publish

Artifacts are build on local repos: ./build/repo.

2) run an example

digdag selfupdate

rm -rf .digdag/plugin
digdag run -a --project sample plugin.dig -p repos=`pwd`/build/repo

Maintainers

  • Hiroyuki Sato(@hiroyuki-sato)
  • Yuki Iwamoto(@yuhiwa)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages