diff options
Diffstat (limited to 'recipes-test')
6 files changed, 66 insertions, 1 deletions
diff --git a/recipes-test/demo-network-config/files/25-dhcp-server.network b/recipes-test/demo-network-config/files/25-dhcp-server.network new file mode 100644 index 0000000..4766f9a --- /dev/null +++ b/recipes-test/demo-network-config/files/25-dhcp-server.network | |||
@@ -0,0 +1,12 @@ | |||
1 | [Match] | ||
2 | Name=enp0s4 | ||
3 | |||
4 | [Network] | ||
5 | Description=Private internal network between aktualizr Primary and Secondary nodes | ||
6 | DHCPServer=yes | ||
7 | Address=10.0.3.1/24 | ||
8 | IPForward=yes | ||
9 | IPMasquerade=yes | ||
10 | |||
11 | [DHCPServer] | ||
12 | PoolOffset=10 \ No newline at end of file | ||
diff --git a/recipes-test/demo-network-config/files/26-dhcp-client.network b/recipes-test/demo-network-config/files/26-dhcp-client.network new file mode 100644 index 0000000..319664f --- /dev/null +++ b/recipes-test/demo-network-config/files/26-dhcp-client.network | |||
@@ -0,0 +1,6 @@ | |||
1 | [Match] | ||
2 | Name=enp0s4 | ||
3 | |||
4 | [Network] | ||
5 | Description=Private internal network between aktualizr Primary and Secondary nodes | ||
6 | DHCP=yes | ||
diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb new file mode 100644 index 0000000..78678a2 --- /dev/null +++ b/recipes-test/demo-network-config/primary-network-config.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "Sample network configuration for an Uptane Primary" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | inherit allarch | ||
5 | |||
6 | SRC_URI = "file://25-dhcp-server.network" | ||
7 | |||
8 | |||
9 | FILES_${PN} = "/usr/lib/systemd/network" | ||
10 | |||
11 | PR = "1" | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}/usr/lib/systemd/network | ||
15 | install -m 0644 ${WORKDIR}/25-dhcp-server.network ${D}/usr/lib/systemd/network/ | ||
16 | } | ||
diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb new file mode 100644 index 0000000..492d3ca --- /dev/null +++ b/recipes-test/demo-network-config/secondary-network-config.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "Sample network configuration for an Uptane Secondary" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | inherit allarch | ||
5 | |||
6 | SRC_URI = "file://26-dhcp-client.network" | ||
7 | |||
8 | |||
9 | FILES_${PN} = "/usr/lib/systemd/network" | ||
10 | |||
11 | PR = "1" | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}/usr/lib/systemd/network | ||
15 | install -m 0644 ${WORKDIR}/26-dhcp-client.network ${D}/usr/lib/systemd/network/ | ||
16 | } | ||
diff --git a/recipes-test/images/primary-image.bb b/recipes-test/images/primary-image.bb new file mode 100644 index 0000000..6c06527 --- /dev/null +++ b/recipes-test/images/primary-image.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | include recipes-core/images/core-image-minimal.bb | ||
2 | |||
3 | SUMMARY = "A minimal Uptane Primary image running aktualizr, for testing with a Linux secondary" | ||
4 | |||
5 | LICENSE = "MIT" | ||
6 | |||
7 | IMAGE_INSTALL_remove = " \ | ||
8 | " | ||
9 | |||
10 | IMAGE_INSTALL_append = " \ | ||
11 | primary-network-config \ | ||
12 | " | ||
diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index c7a91db..c1ce57a 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb | |||
@@ -15,4 +15,7 @@ IMAGE_INSTALL_remove = " \ | |||
15 | aktualizr-implicit-prov \ | 15 | aktualizr-implicit-prov \ |
16 | " | 16 | " |
17 | 17 | ||
18 | IMAGE_INSTALL_append = " aktualizr-secondary " \ No newline at end of file | 18 | IMAGE_INSTALL_append = " \ |
19 | aktualizr-secondary \ | ||
20 | secondary-network-config \ | ||
21 | " | ||