-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from larsks/feature/bond0-beta
Configure bond0 interface (alternative implementation)
- Loading branch information
Showing
15 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MACHINECONFIGS = \ | ||
machineconfig.yaml | ||
|
||
%.yaml: src/%.bu $(wildcard src/*.nmconnection) | ||
butane -o $@ -d src $< | ||
|
||
all: $(MACHINECONFIGS) | ||
|
||
clean: | ||
rm -f $(MACHINECONFIGS) |
7 changes: 7 additions & 0 deletions
7
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Including file content in ignition configs is a pain, because it has to be base64 encoded. The `Makefile` in this directory uses [Butane][] to transpile `MachineConfig` resources, automatically including and encoding content from files. | ||
|
||
Read "[Creating machine configs with Butane][]" in the [OpenShift documentation][] for more information. | ||
|
||
[butane]: https://coreos.github.io/butane/ | ||
[openshift documentation]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html | ||
[creating machine configs with butane]: https://docs.openshift.com/container-platform/4.10/installing/install_config/installing-customizing.html#installation-special-config-butane_installing-customizing |
4 changes: 4 additions & 0 deletions
4
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- machineconfig.yaml |
26 changes: 26 additions & 0 deletions
26
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/machineconfig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: configure-bond0 | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/0zMwaqDMBCF4f15FyXeKxfvYp5EskiTKQY6M6IToW9fLEK7O/BzvjmbKmevphG10M20BPhz5fdEVeftnjJ3moSvnJrb9SPfGuOD9F+t2x/p4J0GYGZfeFP2CPFG/yEEYD61CLHCNIWf/jcVSK1iSsN49roeY4SwL1bohFGWvHZeha05TX9jCHgFAAD///WlE5PCAAAA | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/bond0.nmconnection | ||
- contents: | ||
source: data:,%5Bconnection%5D%0Aid%3Dnic1%0Atype%3Dethernet%0Ainterface-name%3Dnic1%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/nic1.nmconnection | ||
- contents: | ||
source: data:,%5Bconnection%5D%0Aid%3Dnic2%0Atype%3Dethernet%0Ainterface-name%3Dnic2%0Amaster%3Dbond0%0Aslave-type%3Dbond%0Aautoconnect%3Dtrue%0A%0A%5Bethernet%5D%0Amtu%3D9000%0A | ||
mode: 384 | ||
path: /etc/NetworkManager/system-connections/nic2.nmconnection |
17 changes: 17 additions & 0 deletions
17
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/bond0.nmconnection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[connection] | ||
id=bond0 | ||
type=bond | ||
interface-name=bond0 | ||
autoconnect=true | ||
connection.autoconnect-slaves=1 | ||
|
||
[ethernet] | ||
mtu=9000 | ||
|
||
[bond] | ||
mode=802.3ad | ||
miimon=140 | ||
|
||
[ipv4] | ||
method=auto | ||
dhcp-timeout=86400 |
20 changes: 20 additions & 0 deletions
20
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/machineconfig.bu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: configure-bond0 | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
storage: | ||
files: | ||
- path: /etc/NetworkManager/system-connections/bond0.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: bond0.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic1.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic1.nmconnection | ||
- path: /etc/NetworkManager/system-connections/nic2.nmconnection | ||
mode: 0600 | ||
contents: | ||
local: nic2.nmconnection |
10 changes: 10 additions & 0 deletions
10
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/nic1.nmconnection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[connection] | ||
id=nic1 | ||
type=ethernet | ||
interface-name=nic1 | ||
master=bond0 | ||
slave-type=bond | ||
autoconnect=true | ||
|
||
[ethernet] | ||
mtu=9000 |
10 changes: 10 additions & 0 deletions
10
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/configure-bond0/src/nic2.nmconnection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[connection] | ||
id=nic2 | ||
type=ethernet | ||
interface-name=nic2 | ||
master=bond0 | ||
slave-type=bond | ||
autoconnect=true | ||
|
||
[ethernet] | ||
mtu=9000 |
13 changes: 13 additions & 0 deletions
13
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/disable-net-ifnames.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: disable-net-ifnames | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
kernelArguments: | ||
- net.ifnames=0 | ||
- biosdevname=0 |
10 changes: 10 additions & 0 deletions
10
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/mellanox-udev-rules/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MACHINECONFIGS = \ | ||
machineconfig.yaml | ||
|
||
%.yaml: src/%.bu | ||
butane -o $@ -d src $< | ||
|
||
all: $(MACHINECONFIGS) | ||
|
||
clean: | ||
rm -f $(MACHINECONFIGS) |
4 changes: 4 additions & 0 deletions
4
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/mellanox-udev-rules/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- machineconfig.yaml |
18 changes: 18 additions & 0 deletions
18
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/mellanox-udev-rules/machineconfig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Butane; do not edit | ||
apiVersion: machineconfiguration.openshift.io/v1 | ||
kind: MachineConfig | ||
metadata: | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
name: mellanox-udev-rules | ||
spec: | ||
config: | ||
ignition: | ||
version: 3.2.0 | ||
storage: | ||
files: | ||
- contents: | ||
compression: gzip | ||
source: data:;base64,H4sIAAAAAAAC/woOdQqODA5x9bW1VcpLLVHScQnyDHMNCra1VcrNqTCNT84vSlXS8XYN8nP1AQkaGBgYWBmYWRkY6Bko6Tg6h3j6+9naKiWmpCjp+Dn6utoq5WUmGypxUWCuIU5zjZS4AAEAAP//AAlzT7AAAAA= | ||
mode: 420 | ||
path: /etc/udev/rules.d/90-mellanox.rules |
12 changes: 12 additions & 0 deletions
12
...ter-scope/overlays/nerc-ocp-infra/machineconfigs/mellanox-udev-rules/src/machineconfig.bu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variant: openshift | ||
version: 4.10.0 | ||
metadata: | ||
name: mellanox-udev-rules | ||
labels: | ||
machineconfiguration.openshift.io/role: master | ||
storage: | ||
files: | ||
- path: /etc/udev/rules.d/90-mellanox.rules | ||
contents: | ||
local: mellanox.rules | ||
mode: 0644 |
2 changes: 2 additions & 0 deletions
2
cluster-scope/overlays/nerc-ocp-infra/machineconfigs/mellanox-udev-rules/src/mellanox.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SUBSYSTEM=="net",DRIVERS=="mlx5_core",KERNELS=="0000:06:00.0",ACTION=="add",NAME="nic1" | ||
SUBSYSTEM=="net",DRIVERS=="mlx5_core",KERNELS=="0000:06:00.1",ACTION=="add",NAME="nic2" |