1RBM_REMOTE(7)                                                    RBM_REMOTE(7)
2
3
4

NAME

6       rbm_remote - rbm remote build
7

DESCRIPTION

9       It can be useful to run the build of your package on an external
10       server, a VM or a chroot. For instance if you are running an rpm based
11       distribution and want to build a Debian package.
12
13       To do do this, you can define the remote_exec option.
14
15       The following options are used to configure the remote execution of the
16       build:
17
18       remote_exec
19           the template of a command used to execute a command on a remote
20           host. The command to be executed is available in the option
21           exec_cmd. The option exec_as_root indicate whether the script
22           should be run as a normal user, or as root. Some commands such as
23           the pre and post scripts need to be run as root. The name of the
24           command we are running is available in the option exec_name.
25
26       remote_mktemp
27           the template of a command to create a temporary directory. If
28           undefined, mktemp -d -p /var/tmp will be used.
29
30       remote_put
31           the template of a command used to put a file on a remote host. The
32           source file is available in the put_src option and the destination
33           directory in the put_dst option. The default is to use tar with the
34           remote_exec option.
35
36       remote_get
37           the template of a command used to fetch a file from a remote host.
38           The source directory is available in the get_src option, and the
39           destination directory in the get_dst option. The default is to use
40           tar with the remote_exec option.
41
42       remote_start
43           the template of a command that will start the remote host before we
44           can access it. This can be useful for instance if you need to start
45           a VM, or fetch a container. If access to an input file is needed,
46           the remote_srcdir option is pointing to a temporary directory
47           containing the input files. The input files are hard links to their
48           original location, if it is on the same filesystem, and
49           link_input_files has not been set to 0.
50
51       remote_finish
52           the template of a command that will stop the remote host after we
53           finished the build. This can be useful for instance if you want to
54           shutdown a VM or remove a temporary container.
55
56       The remote_* options can access the build_id option which is a unique
57       identifier of the current build.
58

REMOTE BUILD WITH ROOTLESS CONTAINERS

60       rbm includes a rbmcontainer script which allows creating rootless
61       containers (ie. creating some Linux namespaces, without requiring root
62       priviledges).
63
64       It requires the newuidmap and newgidmap commands. On Debian systems
65       this means installing the uidmap package.
66
67       Some predefined remote_* options to use containers are available. They
68       can be enabled by setting container/use_container to true.
69
70       When the use of containers is enabled, the input_files of your build
71       should include a chroot tarball, with a filename starting with
72       container-image_. When starting a build, this chroot tarball will be
73       extracted to a temporary directory, and the build script will be run
74       chrooted in this directory.
75
76       The following options can be used:
77
78       container/disable_network/script_name
79           Disable the use of network when running script_name (replace it
80           with the name of the script). By default network is disabled in the
81           build script and enabled in all other scripts.
82
83       container/global_disable
84           When this option is set, container/use_container and containers are
85           not used.
86

REMOTE BUILD WITH DOCKER

88       Some predefined remote_* template to run the builds in docker are
89       available. To enable building in docker, you can set the remote_docker
90       option to 1. The following options will then be used:
91
92       docker_image
93           The name of the docker image you want to use.
94
95       docker_save_image
96           By default the docker image used during the build will be removed
97           when it is finished. If you want to keep it, you can define an
98           image name in this option.
99
100       docker_opts
101           If you want to add some docker command line options, you can define
102           them in this option. This could be useful for instance if you don’t
103           want to use the default docker instance.
104
105       docker_user
106           The user that should be used to run the build inside the container.
107           If that user does not exist, it will be created automatically. The
108           default is rbm.
109
110       For example, if you want to build your software on Fedora 20 using
111       docker, you can do this:
112
113           remote_docker: 1
114           docker_image: fedora:20
115

REMOTE BUILD WITH SSH

117       Some predefined remote_* templates are available and can be enabled by
118       setting the remote_ssh option to 1. For instance you can add the
119       following lines to your configuration:
120
121           ssh_host: some_hostname
122           remote_ssh: 1
123
124       The following options will be used:
125
126       ssh_host
127           The hostname where to connect. It can also contain a username.
128
129       ssh_port
130           Optionally you can set a port using this option. You could also do
131           it by editing your .ssh/config file.
132
133       ssh_options
134           Optionally you can set some ssh options, for the exec command.
135

BUILD IN A CHROOT

137       You can use the remote_chroot option if you want to build in a chroot.
138       This option requires that you have sudo access to the chroot command.
139
140       The following options will be used:
141
142       chroot_path
143           The path to the chroot directory.
144
145       chroot_user
146           The user in the chroot which should run the build.
147
148       Example:
149
150           chroot_path: /chroots/debian-wheezy
151           chroot_user: build
152           steps:
153             deb:
154               remote_chroot: 1
155

SEE ALSO

157       rbm(1), rbm_config(7)
158
159
160
161                                  07/25/2022                     RBM_REMOTE(7)
Impressum