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

Adding a Tips and Tricks section to Edge Book and adding the first page for EIB #502

Merged
merged 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion asciidoc/edge-book/edge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ include::../components/system-upgrade-controller.adoc[leveloffset=+1]
include::../components/upgrade-controller.adoc[leveloffset=+1]

//--------------------------------------------
// Third-Party Integration
// How-To Guides
//--------------------------------------------

= How-To Guides
Expand All @@ -98,6 +98,18 @@ include::../guides/metallb-kube-api.adoc[leveloffset=+1]

include::../guides/air-gapped-eib-deployments.adoc[leveloffset=+1]

//--------------------------------------------
// Tips and Tricks
//--------------------------------------------

= Tips and Tricks

[partintro]
Tips and tricks for Edge components

include::../tricks/eib.adoc[leveloffset=+1]


//--------------------------------------------
// Third-Party Integration
//--------------------------------------------
Expand Down
112 changes: 112 additions & 0 deletions asciidoc/tricks/eib.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
= *Edge Image Builder*


.Common
- If you are in a non-Linux OS, then you are running podman via a podman machine. This machine is low on resources on it's default settings and can cause Edge Image Builder to hung for resource intense operations, such as downloading RPMs.
You will need to adjust the resources of the podman machine, either by using Podman Desktop (settings cogwheel -> podman machine edit icon) or directly via the `podman-machine-set` https://docs.podman.io/en/stable/markdown/podman-machine-set.1.html[command]
- To avoid any complications, the image architecture being built must match the one on the system running the Edge Image Builder container, for example if you are using an Apple Silicon MacBook, then you should be building only `aarch64` images:

----
image:
arch: aarch64
imageType: iso
baseImage: slemicro.iso
outputImageName: single-node-k3s.iso
----

.Kubernetes
- You can't create an image for a multi node kubernetes cluster without setting up a networking section in your definition file, more information https://github.com/suse-edge/edge-image-builder/blob/main/docs/building-images.md#kubernetes[here]
- You can't create an image for a multi node kubernetes cluster without setting up an `kubernetes.network.apiVIP` parameter (even better add an `kubernetes.network.apiHost` parameter to the setup as well) in the network section of your definition file, more information https://github.com/suse-edge/edge-image-builder/blob/main/docs/building-images.md#kubernetes[here]

----
kubernetes:
version: v1.31.1+k3s1
network:
apiVIP: 192.168.64.11
apiHost: 192.168.64.11
----

- When creating an image for a multi node kubernetes cluster you need to have a way to declare which machine gets which hostname and if it's a server or agent. While the server/agent configuration is managed in the definition file, for the general networking and setting up proper hostnames for the machines you should add the network configuration files in a networking directory. The easiest approach is to use the https://github.com/suse-edge/nm-configurator[nm-configurator] approach

----
Example:
Definition file excerpt:

---
kubernetes:
version: v1.30.4+k3s1
network:
apiVIP: 192.168.64.11
nodes:
- hostname: node1.suse.com
type: server
initializer: true
- hostname: node2.suse.com
type: agent
---

- Network files location:
├── definition.yaml
└── network
├── node1.suse.com.yaml
└── node2.suse.com.yaml

node1.suse.com.yaml contents:
---
routes:
config:
- destination: 0.0.0.0/0
metric: 100
next-hop-address: 192.168.64.1
next-hop-interface: eth0
table-id: 254
dns-resolver:
config:
server:
- 192.168.64.1
- 8.8.8.8
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: 34:8A:B1:4B:16:E1
ipv4:
address:
- ip: 192.168.64.21
prefix-length: 24
dhcp: false
enabled: true
ipv6:
enabled: false
---

node2.suse.com.yaml contents:
---
routes:
config:
- destination: 0.0.0.0/0
metric: 100
next-hop-address: 192.168.64.1
next-hop-interface: eth0
table-id: 254
dns-resolver:
config:
server:
- 192.168.64.1
- 8.8.8.8
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: 34:8A:B1:4B:16:E2
ipv4:
address:
- ip: 192.168.64.22
prefix-length: 24
dhcp: false
enabled: true
ipv6:
enabled: false
---

----