github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/tutorials/varlink_remote_client.md (about) 1 # Podman varlink remote-client tutorial [DEPRECATED] 2 3 ## What is the varlink client 4 5 This API has been deprecated by the [REST API](https://docs.podman.io/en/latest/_static/api.html). 6 For usage on Windows and Mac, please reference the [Podman Mac/Windows tutorial](https://github.com/containers/podman/blob/master/docs/tutorials/mac_win_client.md) 7 Varlink support is in maintenance mode, and will be removed in a future release. 8 For more details, you can see [this blog](https://podman.io/blogs/2020/01/17/podman-new-api.html). 9 10 The purpose of the Podman remote-client is to allow users to interact with a Podman "backend" 11 while on a separate client. The command line interface of the remote client is exactly the 12 same as the regular Podman commands with the exception of some flags being removed as they 13 do not apply to the remote-client. 14 15 ## What you need 16 To use the remote-client, you will need a binary for your client and a Podman "backend"; hereafter 17 referred to as the Podman node. In this context, a Podman node is a Linux system with Podman 18 installed on it and the varlink service activated. You will also need to be able to ssh into this 19 system as a user with privileges to the varlink socket (more on this later). 20 21 ## Building the remote client 22 At this time, the Podman remote-client is not being packaged for any distribution. It must be built from 23 source. To set up your build environment, see [Installation notes](https://github.com/containers/podman/blob/master/install.md) and follow the 24 section [Building from scratch](https://github.com/containers/podman/blob/master/install.md#building-from-scratch). Once you can successfully 25 build the regular Podman binary, you can now build the remote-client. 26 ``` 27 $ make podman-remote 28 ``` 29 Like building the regular Podman, the resulting binary will be in the *bin* directory. This is the binary 30 you will run on the remote node later in the instructions. 31 32 ## Setting up the remote and Podman nodes 33 34 To use the remote-client, you must perform some setup on both the remote and Podman nodes. In this case, 35 the remote node refers to where the remote-client is being run; and the Podman node refers to where 36 Podman and its storage reside. 37 38 39 ### Podman node setup 40 41 Varlink bridge support is provided by the varlink cli command and installed using: 42 ``` 43 $ sudo dnf install varlink-cli 44 ``` 45 46 The Podman node must have Podman (not the remote-client) installed as normal. If your system uses systemd, 47 then simply start the Podman varlink socket. 48 ``` 49 $ sudo systemctl start io.podman.socket 50 ``` 51 52 If your system cannot use systemd, then you can manually establish the varlink socket with the Podman 53 command: 54 ``` 55 $ sudo podman --log-level debug varlink --timeout 0 unix://run/podman/io.podman 56 ``` 57 58 ### Required permissions 59 For now, the remote-client requires that you be able to run a privileged Podman and have privileged ssh 60 access to the remote system. This limitation is being worked on. 61 62 ### Remote node setup 63 64 #### Initiate an ssh session to the Podman node 65 To use the remote client, an ssh connection to the Podman server must be established. 66 67 Using the varlink bridge, an ssh tunnel must be initiated to connect to the server. Podman must then be informed of the location of the sshd server on the targeted server 68 69 ``` 70 $ export PODMAN_VARLINK_BRIDGE=$'ssh -T -p22 root@remotehost -- "varlink -A \'podman varlink \$VARLINK_ADDRESS\' bridge"' 71 $ bin/podman-remote images 72 REPOSITORY TAG IMAGE ID CREATED SIZE 73 docker.io/library/ubuntu latest 47b19964fb50 2 weeks ago 90.7 MB 74 docker.io/library/alpine latest caf27325b298 3 weeks ago 5.8 MB 75 quay.io/cevich/gcloud_centos latest 641dad61989a 5 weeks ago 489 MB 76 k8s.gcr.io/pause 3.1 da86e6ba6ca1 14 months ago 747 kB 77 ``` 78 79 The PODMAN_VARLINK_BRIDGE variable may be added to your log in settings. It does not change per connection. 80 81 If coming from a Windows machine, the PODMAN_VARLINK_BRIDGE is formatted as: 82 ``` 83 set PODMAN_VARLINK_BRIDGE=C:\Windows\System32\OpenSSH\ssh.exe -T -p22 root@remotehost -- varlink -A "podman varlink $VARLINK_ADDRESS" bridge 84 ``` 85 86 The arguments before the `--` are presented to ssh while the arguments after are for the varlink cli. The varlink arguments should be copied verbatim. 87 - `-p` is the port on the remote host for the ssh tunnel. `22` is the default. 88 - `root` is the currently supported user, while `remotehost` is the name or IP address of the host providing the Podman service. 89 - `-i` may be added to select an identity file.