Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Data Netplan #1705

Merged
merged 9 commits into from
Oct 25, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,57 @@ stages:
insecure_skip_verify: true
```


#### Configure Network With Netplan
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved

You can use the `initramfs` stage and [Netplan](https://netplan.io) to configure network settings before the network initialization. Netplan is a tool that enables you to specify network configurations on Linux systems. Note that this approach is available for Linux systems with Netplan installed. Refer to the [Netplan Documentation](https://netplan.readthedocs.io/en/stable/) for installation guidance and the [Netplan How-to Guides](https://netplan.readthedocs.io/en/stable/examples/) for more information.
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved


```yaml
stages:
initramfs:
- users:
kairos:
groups:
- sudo
passwd: kairos
- commands:
- netplan apply
files:
- content: |
network:
version: 2
renderer: networkd
ethernets:
ens160:
dhcp4: false
addresses:
- 10.10.190.11/18
gateway4: 10.10.128.1
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
encoding: ""
group: 0
owner: 0
ownerstring: ""
path: /etc/netplan/99_config.yaml
permissions: 420
name: Config network with Netplan
```

:::tip

When using the EdgeForge workflow with CanvOS, ensure you add Netplan to the Dockerfile. In the example below, Netplan is installed in an Ubuntu image.
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved
caroldelwing marked this conversation as resolved.
Show resolved Hide resolved

```shell
apt-get update && apt-get install netplan.io -y
```

:::


#### Erase Partitions

You can use the `before-install` stage to remove partitions if needed.
Expand Down Expand Up @@ -167,6 +218,7 @@ stages:
- snap install amazon-ssm-agent --classic
```


#### Pass a Sensitive Information

If you need to transmit sensitive information, such as credentials, during the site installation phase, you can make the Edge installer skip copying specific stages to the edge hosts. The Edge installer will skip copying the stages that follow the `skip-copy-[string]` naming convention. Refer to the [Sensitive Information in the User Data Stages](skip-copying-stages.md) guide to learn more.
Expand Down
Loading