Skip to content

Commit 5bc12cd

Browse files
committed
add support for local and container shells
1 parent a904b90 commit 5bc12cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3354
-376
lines changed

docs/reference/hosts.adoc

+31-5
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
= qDup hosts
1+
# qDup hosts
22

33
The `hosts` section in qDup is a YAML mapping that assigns an alias for a username + host combination.
44

55
[source,yaml]
66
----
77
hosts:
88
alias: [email protected] #logs in with ssh key using default port
9+
container: quay.io/example/container #starts a container using podman
10+
local: LOCAL #reserved name for a local connection
911
----
1012
The link:./roles.adoc[roles] then refer to host connections by the alias.
1113
[source,yaml]
1214
----
1315
roles:
14-
example:
15-
hosts: [alias]
16+
one:
17+
hosts:
18+
- alias
19+
two:
20+
hosts:
21+
- container
1622
...
1723
----
1824

1925
Hosts can be a string or mapping but in either case it must contain the information
20-
necessary to connect to the remote host. The previous `alias` used ssh keys with the default
21-
ssh port but a password and port number can be added to the configuration.
26+
necessary to connect to the target host. There are 3 classes of target hosts:
27+
28+
1. shh connections to any host accepting an ssh connection
29+
2. local connection using a local terminal process
30+
3. connection to a container using a supported container platform (default is podman)
31+
32+
33+
## SSH Connection
34+
The previous `alias` used ssh keys with the default ssh port but a password and port number can be added to the configuration.
2235
[source,yaml]
2336
----
2437
hosts:
@@ -50,3 +63,16 @@ java -jar qdup-uber.jar -b /tmp/ -S _password="$(cat /tmp/secret.txt)" qdup.yaml
5063
....
5164
`-S \_password` sets the state variable `password` and the `_` prefix tells qDup to treat the
5265
value as a secret and replace it with `\****` in the logs.
66+
67+
## Local Connection
68+
qDup can also connect to the local computer. Local connections use the `LOCAL` reserved hostname or set `local: true` when defining the host as a mapping.
69+
```yaml
70+
hosts:
71+
example1: LOCAL
72+
example2:
73+
local: true
74+
```
75+
A local connection is helpful when testing scripts or deploying qdup inside a container.
76+
77+
## Container Connection
78+
qDup can start a container on a local or remote container platform. Containerized hosts help isolate changes and control the

0 commit comments

Comments
 (0)