1RBM_REMOTE(7) RBM_REMOTE(7)
2
3
4
6 rbm_remote - rbm remote build
7
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.
48
49 remote_finish
50 the template of a command that will stop the remote host after we
51 finished the build. This can be useful for instance if you want to
52 shutdown a VM or remove a temporary container.
53
54 The remote_* options can access the build_id option which is a unique
55 identifier of the current build.
56
58 Some predefined remote_* template to run the builds in docker are
59 available. To enable building in docker, you can set the remote_docker
60 option to 1. The following options will then be used:
61
62 docker_image
63 The name of the docker image you want to use.
64
65 docker_save_image
66 By default the docker image used during the build will be removed
67 when it is finished. If you want to keep it, you can define an
68 image name in this option.
69
70 docker_opts
71 If you want to add some docker command line options, you can define
72 them in this option. This could be useful for instance if you don’t
73 want to use the default docker instance.
74
75 docker_user
76 The user that should be used to run the build inside the container.
77 If that user does not exist, it will be created automatically. The
78 default is rbm.
79
80 For example, if you want to build your software on Fedora 20 using
81 docker, you can do this:
82
83 remote_docker: 1
84 docker_image: fedora:20
85
87 Some predefined remote_* templates are available and can be enabled by
88 setting the remote_ssh option to 1. For instance if you want to build
89 your debian packages on a remote node with ssh, add the following lines
90 to your configuration :
91
92 ssh_host: some_hostname
93 steps:
94 deb_src:
95 remote_ssh: 1
96
97 The following options will be used:
98
99 ssh_host
100 The hostname where to connect. It can also contain a username.
101
102 ssh_port
103 Optionally you can set a port using this option. You could also do
104 it by editing your .ssh/config file.
105
106 ssh_options
107 Optionally you can set some ssh options, for the exec command.
108
110 You can use the remote_chroot option if you want to build in a chroot.
111 This option requires that you have sudo access to the chroot command.
112
113 The following options will be used:
114
115 chroot_path
116 The path to the chroot directory.
117
118 chroot_user
119 The user in the chroot which should run the build.
120
121 Example:
122
123 chroot_path: /chroots/debian-wheezy
124 chroot_user: build
125 steps:
126 deb:
127 remote_chroot: 1
128
130 rbm(1), rbm_config(7)
131
132
133
134 07/23/2021 RBM_REMOTE(7)