NetworkManager/src/nm-cloud-setup/meson.build
Wen Liang f3404435a9
cloud-setup: configure secondary ip in Aliyun cloud
This is a tool for automatically configuring networking in Aliyun
cloud environment.

This add a provider implementation for Aliyun that when detected fetches
the private ip addressess and the subnet prefix of IPv4 CIDR block.

Once this information is fetched from the metadata server, it instructs
NetworkManager to add private ip addressess and subnet prefix for each
interface detected.

It is inspired by SuSE's cloud-netconfig ([1], [2]) and Aliyun Instance Metadata [3].

[1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/
[2] https://github.com/SUSE-Enceladus/cloud-netconfig
[3] https://www.alibabacloud.com/help/doc-detail/49122.htm

It is also intended to work without configuration. The main point is
that you boot an image with NetworkManager and nm-cloud-setup enabled,
and it just works.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/885

Signed-off-by: Wen Liang <liangwen12year@gmail.com>
2021-07-19 17:41:52 +02:00

67 lines
1.3 KiB
Meson

# SPDX-License-Identifier: LGPL-2.1-or-later
if install_systemdunitdir
nm_cloud_setup_service = configure_file(
input: 'nm-cloud-setup.service.in',
output: '@BASENAME@',
install_dir: systemd_systemdsystemunitdir,
configuration: data_conf,
)
install_data(
'nm-cloud-setup.timer',
install_dir: systemd_systemdsystemunitdir,
)
install_data(
'90-nm-cloud-setup.sh',
install_dir: join_paths(nm_pkglibdir, 'dispatcher.d', 'no-wait.d'),
)
endif
libnm_cloud_setup_core = static_library(
'nm-cloud-setup-core',
sources: files(
'nm-cloud-setup-utils.c',
'nm-http-client.c',
'nmcs-provider-ec2.c',
'nmcs-provider-gcp.c',
'nmcs-provider-azure.c',
'nmcs-provider-aliyun.c',
'nmcs-provider.c',
),
dependencies: [
libnm_dep,
glib_dep,
libcurl_dep,
],
)
executable(
'nm-cloud-setup',
files(
'main.c',
),
dependencies: [
libnm_dep,
glib_dep,
libcurl_dep,
],
link_with: [
libnm_cloud_setup_core,
libnmc_base,
libnm_client_aux_extern,
libnm_core_aux_extern,
libnm_core_aux_intern,
libnm_log_null,
libnm_glib_aux,
libnm_std_aux,
libc_siphash,
],
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
install: true,
install_dir: nm_libexecdir,
)