Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
New Components:
Browse files Browse the repository at this point in the history
- Intel Service Mesh
- MinIO Object Storage
- Intel Power Manager (Power Operator)
- Platform Aware Scheduling (Telemetry Aware Scheduling + GPU Aware Scheduling)
- Intel DLB (Dynamic Load Balancer)
New Platforms:
- Taylors Falls Reference Design (Intel Xeon-D)
Updates/Changes:
- Playbooks and profile config files are generated automatically
- Profiles list expanded with 'Storage'
- RHEL bumped to version 8.5 as base operating system
- Version upgrades for key components:
	DPDK = 21.11
	Kubernetes = 1.22
	Kubespray = 2.17
	KMRA = 1.4
Removed support:
- Intel CPU Manager for Kubernetes (CMK)
- CentOS (all distro versions) as base operating system

Co-authored-by: Ali Shah, Syed Faraz <[email protected]>
Co-authored-by: Gherghe, Calin <[email protected]>
Co-authored-by: Joel A Gibson <[email protected]>
Co-authored-by: Klimowicz, Patryk <[email protected]>
Co-authored-by: Konefal, Szymon <[email protected]>
Co-authored-by: Krystian M.ynek <[email protected]>
Co-authored-by: Li, Jennifer <[email protected]>
Co-authored-by: Liu, Mark <[email protected]>
Co-authored-by: Lv, Carry <[email protected]>
Co-authored-by: Park, Seungweon <[email protected]>
Co-authored-by: Pedersen, Michael <[email protected]>
Co-authored-by: Prokes, Jiri <[email protected]>
Co-authored-by: Puzikov, Dmitrii <[email protected]>
Co-authored-by: Rymsza, Monika <[email protected]>
Co-authored-by: Weber, Karol <[email protected]>
  • Loading branch information
16 people committed Feb 22, 2022
1 parent 3a27e8a commit 7aedebd
Show file tree
Hide file tree
Showing 514 changed files with 20,869 additions and 7,770 deletions.
73 changes: 73 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributing to Container Experience Kits

Anyone is welcome to contribute.

Please file bugs under github issues.

Please submit git commits and request PRs for review and inclusion. Titles should be clear and concise
with details provided in commit log explaining the purpose and method. Please include reference to github
issue if applicable. Providing testing details will expedite the review process.

## Licenses

The container-experience-kits source is covered under the Apache 2.0 License.
See http://www.apache.org/licenses/

Before submitting a patch, ensure there are no licensing issues by following the Developer Certificate of
Origin (DCO) process.

The DCO is an attestation attached to every contribution. The commit log must have a Signed-off-by line
(-signoff option), which certifies that you wrote it and/or have the right to submit it. The format of the
sign-off message is expected to appear on each commit in the pull request like so:

```
Signed-off-by: First Last <[email protected]>
```

For additional explanation, see below or at https://developercertificate.org/.

```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

## Releases

Our primary release mechanism is based on a calendar versioning standard, formatted as YY.MM.
- YY as the last two digits of the year.
- MM as the zero padded month of the year.

Fixes for issues will most often be rolled into a follow on release. Any exceptions added outside of a release
cycle will be accompanied by a tag update for the current released version.
85 changes: 80 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,87 @@
BMRA_DIRECTORIES_WITH_SHELL_FILES ?= roles/ examples/ playbooks/infra/ playbooks/intel/
CEK_DIRECTORIES_WITH_SHELL_FILES ?= roles/ examples/ playbooks/infra/ playbooks/intel/
ARCH ?= 'icx'
PLAYBOOKS_DIRS = playbooks playbooks/infra playbooks/intel
PLAYBOOK_NAMES = access basic full_nfv on_prem regional_dc remote_fp storage

# set default target available with simple 'make' command
.DEFAULT_GOAL := examples

.PHONY: shellcheck ansible-lint all-profiles clean clean-playbooks help k8s-profiles vm-profiles

shellcheck:
find $(BMRA_DIRECTORIES_WITH_SHELL_FILES) -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' -o -name '*.bashrc' -o -name '*.bash_profile' -o -name '*.bash_login' -o -name '*.bash_logout' \) \
find $(CEK_DIRECTORIES_WITH_SHELL_FILES) -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' -o -name '*.bashrc' -o -name '*.bash_profile' -o -name '*.bash_login' -o -name '*.bash_logout' \) \
| xargs shellcheck

ansible-lint:
ansible-lint playbooks/* roles/* -c .ansible-lint

profile ?= ''
bmra-profiles:
python3 profiles/render.py --config profiles/profiles.yml --host profiles/host_vars.j2 --group profiles/group_vars.j2 --inventory profiles/inventory.j2 --output examples -p $(profile)
# make sure PROFILE is set to an 'all_examples' string for 'examples' and empty target
ifeq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS),examples ''))
override PROFILE = 'all_examples'
endif

# make sure PROFILE is defined for mode-related targets
ifndef PROFILE
ifeq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS),k8s-profile vm-profile))
$(error please specify which profile should be generated, e.g. PROFILE=basic. Run 'make help' for more information.)
endif
endif

examples: k8s-profile vm-profile

k8s-profile: clean-playbooks
python3 generate/render.py \
--config generate/profiles_templates/k8s/profiles.yml \
--host generate/profiles_templates/common/host_vars.j2 \
--group generate/profiles_templates/common/group_vars.j2 \
--inventory generate/profiles_templates/k8s/inventory.j2 \
--output examples/k8s \
--mode k8s \
-p $(PROFILE) \
-a $(ARCH)

vm-profile: clean-playbooks
python3 generate/render.py \
--config generate/profiles_templates/vm/vm_host_profiles.yml \
--vmsconfig generate/profiles_templates/vm/vms_profiles.yml \
--host generate/profiles_templates/common/host_vars.j2 \
--group generate/profiles_templates/common/group_vars.j2 \
--inventory generate/profiles_templates/vm/inventory.j2 \
--output examples/vm \
--mode vm \
-p $(PROFILE) \
-a $(ARCH)

clean: clean-playbooks clean-project-root-dir

clean-backups:
rm -rf backups

clean-project-root-dir:
rm -rf examples host_vars group_vars inventory.ini

clean-playbooks:
for d in $(PLAYBOOKS_DIRS) ; do for n in $(PLAYBOOK_NAMES) ; do rm -f $$d/$$n.yml ; done done

help:
@echo "Cleaning targets:"
@echo " clean - removes examples directory,"
@echo " all host_vars and group_vars dirs,"
@echo " inventory files and playbooks"
@echo ""
@echo " clean-backups - clean generated backup files."
@echo ""
@echo "Genertare example profiles:"
@echo " make, examples - generate sample files of all available profiles."
@echo ""
@echo "Generating k8s profile:"
@echo " k8s-profile PROFILE=<profile_name> - generate files required for deployment of specific profile in k8s mode."
@echo ""
@echo "Generating VM profile:"
@echo " vm-profile PROFILE=<profile_name> - generate files required for deployment of specific profile in vm mode."
@echo ""
@echo "For more information about:"
@echo " - profiles generation"
@echo " - supported architectures"
@echo " - available profiles"
@echo "please read the docs/generate_profiles.md file."
66 changes: 50 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The software provided here is for reference only and not intended for production
git submodule update --init
```

2. Decide which configuration profile you want to use and optionally export environmental variable. (> **_NOTE:_** It will be used only to ease execution of the steps listed below.)
2. Decide which configuration profile you want to use and optionally export environmental variable.
> **_NOTE:_** It will be used only to ease execution of the steps listed below.
- For **Kubernetes Basic Infrastructure** deployment:

```bash
Expand Down Expand Up @@ -49,33 +50,43 @@ The software provided here is for reference only and not intended for production
export PROFILE=full_nfv
```

- For **Kubernetes Storage Infrastructure** deployment:

```bash
export PROFILE=storage
```

3. Install dependencies

```bash
pip3 install -r profiles/requirements.txt
pip3 install -r requirements.txt
```

4. Generate example host_vars, group_vars and inventory for BMRA profiles.
4. Generate example host_vars, group_vars and inventory files for Intel Container Experience Kits profiles.

> **_NOTE:_** It is **highly recommended** to read [this](docs/generate_profiles.md) file before profiles generation.

```bash
make bmra-profiles
make examples
```

> **_NOTE:_** You can provide the optional `profile` argument to automatically copy files needed for deployment. Then, you can skip both the 4th and the 6th steps.
5. Copy example inventory file to the project root dir.

```bash
make bmra-profiles profile=$PROFILE
cp examples/k8s/${PROFILE}/inventory.ini .
```

5. Copy example inventory file to the project root dir.
or, for VM case:

```bash
cp examples/${PROFILE}/inventory.ini .
cp examples/vm/${PROFILE}/inventory.ini .
```

6. Update inventory file with your environment details.

> **_NOTE:_** at this stage you can inspect your target environment by running:
For VM case: update details relevant for vm_host

> **_NOTE:_** At this stage you can inspect your target environment by running:

```bash
ansible -i inventory.ini -m setup all > all_system_facts.txt
Expand All @@ -86,14 +97,26 @@ The software provided here is for reference only and not intended for production
7. Copy group_vars and host_vars directories to the project root dir.

```bash
cp -r examples/${PROFILE}/group_vars examples/${PROFILE}/host_vars .
cp -r examples/k8s/${PROFILE}/group_vars examples/k8s/${PROFILE}/host_vars .
or
For VM case:
cp -r examples/vm/${PROFILE}/group_vars examples/vm/${PROFILE}/host_vars .
```

8. Update group and host vars to match your desired configuration. Refer to [this section](#configuration) for more details.

> **_NOTE:_** Please pay special attention to the `http_proxy`, `https_proxy` and `additional_no_proxy` vars if you're behind proxy.
9. RECOMMENDED: Apply bug fix patch for Kubespray submodule (Required for RHEL 8+).
For VM case:
- update details relevant for vm_host (e.g.: datalane_interfaces, ...)
- update VMs definition in host_vars/host-for-vms-1.yml
- update/create host_vars for all defined VMs (e.g.: host_vars/vm-ctrl-1.yml and host_vars/vm-work-1.yml)
Needed details are at least dataplane_interfaces
For more details see [VM case configuration guide](docs/vm_config_guide.md)
9. **Recommended:** Apply bug fix patch for Kubespray submodule (Required for RHEL 8+).
```bash
ansible-playbook -i inventory.ini playbooks/k8s/patch_kubespray.yml
Expand All @@ -105,23 +128,34 @@ The software provided here is for reference only and not intended for production
ansible-playbook -i inventory.ini playbooks/${PROFILE}.yml
```
or, for VM case:
```bash
ansible-playbook -i inventory.ini playbooks/vm.yml
```
> **_NOTE:_** VMs are accessible from ansible host via ssh vm-ctrl-1 or ssh vm-work-1
## Configuration
Refer to the documentation linked below to see configuration details for selected capabilities and deployment profiles.
- [SRIOV Network Device Plugin and SRIOV CNI plugin](docs/sriov.md)
- [MinIO Operator](docs/storage.md)
- [VM case configuration guide](docs/vm_config_guide.md)
## Prerequisites and Requirements
- Python present on the target servers depending on the target distribution. Python 3 is highly recommended, but Python 2 is still supported for CentOS 7.
- Ansible 2.9.20 installed on the Ansible host machine (the one you run these playbooks from).
> **_NOTE:_** Packages requirements might be installed in 3rd step.
- Python present on the target servers depending on the target distribution. Python3 is required.
- Ansible 3.4.0 and ansible-base 2.10.15 installed on the Ansible host machine (the one you run these playbooks from).
- python-pip3 installed on the Ansible machine.
- python-netaddr installed on the Ansible machine.
- SSH keys copied to all Kubernetes cluster nodes (`ssh-copy-id <user>@<host>` command can be used for that).
- Internet access on all target servers is mandatory. Proxy is supported.
- At least 8GB of RAM on the target servers/VMs for minimal number of functions (some Docker image builds are memory-hungry and may cause OOM kills of Docker registry - observed with 4GB of RAM), more if you plan to run heavy workloads such as NFV applications.
- For the `RHEL`-like OSes `SELinux` must be configured prior to the BMRA deployment and required `SELinux`-related packages should be installed.
`BMRA` itself is keeping initial `SELinux` state but `SELinux`-related packages might be installed during `k8s` cluster deployment as a dependency, for `Docker` engine e.g.,
- For the `RHEL`-like OSes `SELinux` must be configured prior to the CEK deployment and required `SELinux`-related packages should be installed.
`CEK` itself is keeping initial `SELinux` state but `SELinux`-related packages might be installed during `k8s` cluster deployment as a dependency, for `Docker` engine e.g.,
causing OS boot failure or other inconsistencies if `SELinux` is not configured properly.
Preferable `SELinux` state is `permissive`.
For more details, please, refer to the respective OS documentation.
2 changes: 1 addition & 1 deletion action_plugins/validate_isolcpus.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020-2021 Intel Corporation.
# Copyright (c) 2020-2022 Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 7aedebd

Please sign in to comment.