diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-06-10 15:19:27 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-06-28 15:11:46 +0200 |
commit | 5440500624a503b3f91852cd17089aab76afe806 (patch) | |
tree | 29ee9c6efe6d9879c34271c60471765099f63474 /mcp/reclass/classes/cluster/mcp-iec-noha | |
parent | f50cd4f58b2971c07c1ad37dbb4ebbf044ab1dc6 (diff) |
[iec] Add basic CentOS support (virtual only)
- reclass: iec: CentOS compatibility changes:
* drop `proto: static` in favor of letting the linux formula set
the appropiate default based on target OS;
* replace `proto: manual` with `proto: none` on RHEL systems;
* system.file: Avoid using non-existing `shadow` group for system
files;
* load br_netfilter kernel module to avoid `linux.network` state
failures;
* disable `at`, `cron` due to incomplete defaults in
salt-formula-linux (since we don't use them on iec nodes anyway);
- jumpserver/VCP VMs: centos: enable predictable interface names:
* CentOS cloud image defaults to old 'eth' naming scheme;
* add necessary kernel boot options via linux state;
* cleanup auto-generated udev rules for old eth interface names;
- salt-formula-linux: network: RHEL: Set bridge for member interfaces
* Find the bridge containing the interface being currently
configured (if any) and pass it to the `network.managed` Salt call;
- deploy.sh: Add new deploy argument `-o` for specifying the operating
system to preinstall on jumpserver and/or VCP VMs;
* defaults to 'ubuntu1604';
* only iec scenarios will also support 'centos' for now;
- user-data: minor tweaks for CentOS compatability:
* use `systemctl` instead of `service` utility;
* explicitly enable `salt-minion` service, since it defaults to
disabled on RHEL systems;
* explicitly call `ldconfig` to work around stale cache on RHEL,
preventing `salt-minion` from using OpenSSL library;
- states: virtual_init: Skip non-existing sysctl options on CentOS:
* CentOS currently uses a 3.x kernel which lacks certain sysctl
options that were only introduced in 4.x kernels, so skip them;
- state: akraino_iec: Add centos support:
* move iec repo to `/var/lib/akraino/iec` on both Salt Master and
cluster nodes;
- scenario defaults: Add CentOS configuration:
* OS-dependent configuration split;
* CentOS base image, default packages etc.;
- AArch64 deploy requirements: Add `xz` dependency
* CentOS AArch64 cloud image is archived using xz, install xz tools
for decompression;
- xdf_data: Make yaml parsing OS agnostic:
* rename `apt` to `repo` where appropiate;
* OS-dependent configuration parsing;
- lib_jump_deploy: CentOS handling changes:
* skip filesystem resize of cloud image for CentOS;
* add repo handling, package intallation/removal handling for CentOS;
* unxz base image if necessary (CentOS AArch64 cloud image);
Change-Id: Ic3538bacd53198701ff4ef77db62218eabc662e7
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/reclass/classes/cluster/mcp-iec-noha')
-rw-r--r-- | mcp/reclass/classes/cluster/mcp-iec-noha/akraino/iec.yml.j2 | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-iec-noha/akraino/iec.yml.j2 b/mcp/reclass/classes/cluster/mcp-iec-noha/akraino/iec.yml.j2 index d3e6b6673..ccd378b73 100644 --- a/mcp/reclass/classes/cluster/mcp-iec-noha/akraino/iec.yml.j2 +++ b/mcp/reclass/classes/cluster/mcp-iec-noha/akraino/iec.yml.j2 @@ -32,12 +32,40 @@ parameters: single_nic: {{ ma.interface_str(nm.ctl01.nic_mgmt, nm.vlan_mgmt) }} {%- endif %} linux: +{%- if 'centos' not in conf.MCP_OS %} +{%- set proto_manual = 'manual' %} +{%- else %} +{%- set proto_manual = 'none' %} + system: + file: + /etc/gshadow: + group: root + /etc/shadow: + group: root + /etc/udev/rules.d/70-persistent-net.rules: + contents: '' +{%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %} + /etc/modprobe.d/vfat.conf: + contents: '' + /boot/efi/EFI/centos/grub.cfg: + source: /boot/grub2/grub.cfg +{%- endif %} + kernel: + boot_options: + - net.ifnames=1 + - biosdevname=1 + modules: + - br_netfilter + at: + enabled: False + cron: + enabled: False +{%- endif %} network: interface: pxe_admin_int: enabled: true name: ${_param:pxe_admin_interface} - proto: static type: eth address: ${_param:pxe_admin_address} netmask: ${_param:opnfv_net_admin_mask} @@ -49,28 +77,27 @@ parameters: {%- do nics.pop(nm.ctl01.nic_admin) %} {%- endif %} -{{ ma.linux_network_interfaces_nic(nics) }} +{{ ma.linux_network_interfaces_nic(nics, proto_manual) }} -{{ ma.linux_network_interfaces_vlan(vlans) }} +{{ ma.linux_network_interfaces_vlan(vlans, proto_manual) }} {%- if '-vcp-' in conf.MCP_DEPLOY_SCENARIO %} single: enabled: true type: eth - proto: manual + proto: {{ proto_manual }} name: ${_param:single_nic} mtu: ${_param:interface_mtu} external: enabled: true type: eth - proto: manual + proto: {{ proto_manual }} name: ${_param:external_nic} mtu: ${_param:interface_mtu} {%- endif %} br-ctl: enabled: true type: bridge - proto: static address: ${_param:single_address} netmask: ${_param:opnfv_net_mgmt_mask} noifupdown: true @@ -80,7 +107,6 @@ parameters: br-ex: enabled: true type: bridge - proto: static address: ${_param:external_address} netmask: ${_param:opnfv_net_public_mask} noifupdown: true |