This page (revision-5) was last changed on 23-Nov-2023 19:46 by Peter Hormanns 

This page was created on 01-Jul-2020 13:31 by Peter Hormanns

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
5 23-Nov-2023 19:46 1 KB Peter Hormanns to previous toten Link entfernt
4 01-Jul-2020 17:50 1 KB Peter Hormanns to previous | to last
3 01-Jul-2020 14:11 1 KB Peter Hormanns to previous | to last
2 01-Jul-2020 13:57 1 KB Peter Hormanns to previous | to last Tags
1 01-Jul-2020 13:31 1 KB Peter Hormanns to last

Page References

Incoming links Outgoing links
Sshoogr...nobody

Version management

Difference between version and

!!!sshoogr

''sshoogr'' ist ein Werkzeug für Automatisierung. (Konfigurations-)Dateien werden über '' ssh'' verteilt, und es werden Kommandos auf dem Server ausgeführt. Die Funktionalität ist mit Konfigurationsmanagementwerkzeugen wie Ansible vergleichbar, wenn die Auswahl in fertigen Modulen auch wesentlich geringen ist.

!!Installation

Die Installation erfolgt am einfachsten mit ''sdkman'':

{{{
curl -s get.sdkman.io | bash
sdk install sshoogr
}}}

!!Erste Schritte

Meine erste Konfiguration mit ''sshoogr'':

{{{
reuseConnection = true
trustUnknownHosts = true
defaultUser = 'tux'
defaultPassword = 'geheim'
defaultPort = 22

remoteSession('klaas.example.com') {
  def myname = 'Paul'
  connect()
  exec 'cat /etc/debian_version'
  exec 'uname -a'
  remoteFile('/tmp/tux/hallo.txt').text =
  """Hallo ${myname}!
     Wie geht es Dir?"""
 disconnect()
}
}}}

Die Datei kann mit dem Kommando ''sshoogr'' ausgeführt werden:

{{{
sshoogr config.sshoogr
}}}

!!ssh Key

Es ist natürlich sinnvoll, dass die Kommandos mit einem ssh-Key autorisiert ausgeführt werden. Dazu muss der ssh-Key in ein PEM-Format überführt werden. Ein RSA-Key kann zum Beispiel wie folgt konvertiert werden:

{{{
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa.pem
}}}

!!Links

* [sshoogr Projekt auf Github|https://github.com/sshoogr/sshoogr]
* [Präsentation des Entwicklers auf Slideshare|https://www.slideshare.net/aestasit/sshoogr-for-your-infrastructure]

<<
[{Tag Ssh Groovy}]