capistrano / capistrano/sshkit
Feature: Ability to login as one user and run all tasks as another
- Lingua principale
- Ruby
- Stelle
- 1.2k
- Fork
- 257
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
We've created a [backend](https://github.com/fundingcircle/sshkit-backends-netssh_global) that allows Capistrano 3 to work with setups that require users to login in as user A, but run all commands as user B.
The backend essentially sets a global `owner` and all tasks (unless explicitly overridden) will run as this user. There are a few other options that can also be globally configured (this helps get around certain use cases) such as `directory` and the ability to forward an SSH agent to the owner for certain commands. This means the existing Capistrano tasks do not need to be reimplemented (instead the backend is switched).
While this kind of server setup is not recommended or ideal, when coming across one it's still useful to be able to use Capistrano to deploy.
The code is pretty ugly at the moment, subclassing and overriding a lot of private methods. However, if core sshkit are interested this could easily be cleaned up. The test suite style and methodology has been retained to try and make it as easy as possible to merge into core sshkit.
Does this look like a feature that you would be interested in merging into core? If so I can raise a PR.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia esaminando il backend sshkit-backends-netssh_global collegato e confrontando il suo approccio con la suite di test esistente di SSHKit, il cui stile e la cui metodologia sono indicati dall’issue come riferimento da seguire. Il lavoro è completo quando il core di SSHKit può eseguire il login come un utente ed eseguire i comandi come un altro, con le opzioni globali descritte e senza reimplementare i task Capistrano esistenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- ruby
- Ambito
- devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100