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.
46
47       remote_finish
48           the template of a command that will stop the remote host after we
49           finished the build. This can be useful for instance if you want to
50           shutdown a VM or remove a temporary container.
51
52       The remote_* options can access the build_id option which is a unique
53       identifier of the current build.
54

REMOTE BUILD WITH DOCKER

56       Some predefined remote_* template to run the builds in docker are
57       available. To enable building in docker, you can set the remote_docker
58       option to 1. The following options will then be used:
59
60       docker_image
61           The name of the docker image you want to use.
62
63       docker_save_image
64           By default the docker image used during the build will be removed
65           when it is finished. If you want to keep it, you can define an
66           image name in this option.
67
68       docker_opts
69           If you want to add some docker command line options, you can define
70           them in this option. This could be useful for instance if you don’t
71           want to use the default docker instance.
72
73       docker_user
74           The user that should be used to run the build inside the container.
75           If that user does not exist, it will be created automatically. The
76           default is rbm.
77
78       For example, if you want to build your software on Fedora 20 using
79       docker, you can do this:
80
81           remote_docker: 1
82           docker_image: fedora:20
83

REMOTE BUILD WITH SSH

85       Some predefined remote_* templates are available and can be enabled by
86       setting the remote_ssh option to 1. For instance if you want to build
87       your debian packages on a remote node with ssh, add the following lines
88       to your configuration :
89
90           ssh_host: some_hostname
91           steps:
92             deb_src:
93                remote_ssh: 1
94
95       The following options will be used:
96
97       ssh_host
98           The hostname where to connect. It can also contain a username.
99
100       ssh_port
101           Optionally you can set a port using this option. You could also do
102           it by editing your .ssh/config file.
103
104       ssh_options
105           Optionally you can set some ssh options, for the exec command.
106

BUILD IN A CHROOT

108       You can use the remote_chroot option if you want to build in a chroot.
109       This option requires that you have sudo access to the chroot command.
110
111       The following options will be used:
112
113       chroot_path
114           The path to the chroot directory.
115
116       chroot_user
117           The user in the chroot which should run the build.
118
119       Example:
120
121           chroot_path: /chroots/debian-wheezy
122           chroot_user: build
123           steps:
124             deb:
125               remote_chroot: 1
126

SEE ALSO

128       rbm(1), rbm_config(7)
129
130
131
132                                  02/02/2019                     RBM_REMOTE(7)
Impressum