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

Qos patch and fixes #6

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f738bac
helm linuxptp: Fix bug with license header
ninjab3s Dec 21, 2023
081b3e7
helm linuxptp: Fix default image tag
ninjab3s Dec 21, 2023
db59b09
helm srsran: Fix default image tag
ninjab3s Dec 21, 2023
4327898
helm srsran: Disable requests in values.yaml
ninjab3s Dec 21, 2023
5a10696
helm srsran: Disable gnb_id_bit_length in values.yaml
ninjab3s Dec 21, 2023
75bf49c
helm srsran: Fix problem with license header
ninjab3s Dec 21, 2023
a672a19
helm srsran: Disable hugepages
ninjab3s Dec 21, 2023
140273c
helm srsran: Update config default values for new release
ninjab3s Dec 21, 2023
6de5aca
helm linuxptp: Remove comments
ninjab3s Dec 22, 2023
c8a7ac9
helm: Updated version and README for release of v1.0.0
ninjab3s Dec 20, 2023
09e9e2e
helm srsran: Fix default image tag
ninjab3s Dec 21, 2023
5d82888
helm srsran: Disable gnb_id_bit_length in values.yaml
ninjab3s Dec 21, 2023
d700704
helm srsran: Update config default values for new release
ninjab3s Dec 21, 2023
9f69caa
helm srsran: Activate hugepages and autostart_stdout_metrics
ninjab3s May 24, 2024
886000a
helm srsran: Update configmap for srsRAN config
ninjab3s May 28, 2024
a4af50e
helm srsran: Add multicell support to configmap
ninjab3s Jun 3, 2024
36bf3cf
helm linuxptp: Remove hardcoded update rate for sink
ninjab3s Jun 3, 2024
6ed7e96
helm linuxptp: Update Ubuntu version to 24.04 and downgrade to linuxp…
ninjab3s Jun 4, 2024
cbdeee5
helm srsran: Fix errors in configmap
ninjab3s Jun 4, 2024
aaef6fd
helm grafana: Initial version of srsran Grafana Metrics server
ninjab3s Jun 4, 2024
eb4e973
images srsran: Change default DPDK version to 23.11 for OFH container
ninjab3s Jun 6, 2024
7771824
helm ru_emulator: Initial version of helm chart
ninjab3s Jun 9, 2024
efe05ec
images ru_emulator: Add ru_emulator image
ninjab3s Jun 9, 2024
cf6dbfc
helm srsran: Only mount hugepages in case hal args a specified
ninjab3s Jun 9, 2024
0cd7e5c
images srsran: Fix DPDK linking in srsran build
ninjab3s Jun 9, 2024
2f91b6e
helm srsran: Fix configmap values for booleans
ninjab3s Jun 10, 2024
fdd4680
helm srsran: Move autostart metrics to config
ninjab3s Jun 10, 2024
d14a1d1
helm srsran: Update slicing part in configmap
ninjab3s Jun 13, 2024
4047d4c
helm srsran: Add volume for persistant storage
ninjab3s Jun 13, 2024
c879ff7
helm srsran: Set dnsPolicy to ClusterFirstWithHostNet to enable hostn…
ninjab3s Jun 14, 2024
5fe4351
helm linuxptp: Remove -2 from entry point of ptp4l
andrepuschmann Jun 13, 2024
ef698f3
helm linuxptp: Bump linuxptp version to v4.3
andrepuschmann Jun 13, 2024
c499c8a
readme: Fix size of AGPL v3 License banner
ninjab3s Jun 17, 2024
32fdf0a
helm linuxptp: Update container version and linuxptp version
ninjab3s Jun 17, 2024
6c18587
ci: update configuration
asaezper Jun 18, 2024
8ea24ea
ci: update tools reference
asaezper Jun 18, 2024
80f0245
images ubuntu: remove dockerfiles due to new location in main repo
asaezper Jun 18, 2024
847db48
check if configMap in sync with gnb
qarlosalberto Jun 18, 2024
e52e38c
ci: helm lint and linuxptp push fixed
asaezper Jun 19, 2024
1a456d0
ci: change if rules when sync with gnb pipeline
asaezper Jun 24, 2024
24380df
ci: change if rules when sync with gnb pipeline
asaezper Jun 24, 2024
5bbc86b
ci: only allow config checker to fail in MR
asaezper Jun 24, 2024
b1c9a5b
helm grafana: Fix datasource example
ninjab3s Jun 30, 2024
3e2dba3
helm srsran: Modify hostNetwork from values.yaml
ninjab3s Jun 30, 2024
8c66715
helm srsran: Fix issues in configmap.yaml and remove comments
ninjab3s Jun 30, 2024
2e6d518
helm open5gs: Add example values.yaml for Gradient Open5GS helm chart
ninjab3s Jul 1, 2024
9816ec4
helm metrics_server: Update default values of values.yaml
ninjab3s Jul 1, 2024
aba0cfd
helm metrics_server: Add srsRAN license header
ninjab3s Jul 1, 2024
029c75c
helm grafana: Add srsRAN license header
ninjab3s Jul 1, 2024
be74338
hem grafana: Change path of helm chart
ninjab3s Jul 1, 2024
7e19cef
helm grafana: Set image and tag of influxdb in values.yaml
ninjab3s Jul 1, 2024
1e2c6ca
Update configmap.yml - qos + prach ports list fix
hudouseko Sep 12, 2024
baf8b9a
Update deployment.yaml - fix debugging enabled issue
hudouseko Sep 12, 2024
6815918
Update values.yaml - vlan_tag fix
hudouseko Sep 12, 2024
49e9958
Update configmap.yml - fixed dash issue
hudouseko Sep 12, 2024
2bfb160
Update values.yaml - qos default/example
hudouseko Sep 12, 2024
2f84e89
Update configmap.yml - fixed bugs in qos section
hudouseko Sep 12, 2024
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
117 changes: 67 additions & 50 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

include:
- project: softwareradiosystems/ci/tools
ref: "12"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- project: softwareradiosystems/ci/tools
ref: "12"
ref: "20"
file: .gitlab/ci-shared/features/all.yml
- project: softwareradiosystems/ci/tools
ref: "12"
ref: "20"
file: .gitlab/ci-shared/tools/tagger.yml

stages:
Expand All @@ -24,80 +24,98 @@ stages:
- release

################################################################################
## Launch Downstream
## Images
################################################################################

.ubuntu-22.04:
linuxptp image:
stage: child
variables:
SRSRAN_VERSION: "2023.11"
CONTEXT: "/builds/softwareradiosystems/ci/srsgnb_k8s/images"
UHD_VERSION: "UHD-4.1"
DPDK_VERSION: "dpdk-23.07"
SOFTWARE_USED: ""
trigger:
include: images/Ubuntu-2204/.gitlab-ci.yml
strategy: depend
needs: []

Ubuntu-22.04-UHD:
extends: .ubuntu-22.04
LINUXPTP_VERSION: "v4.3"
CT_VERSION: "1.0.4"
rules:
- if: $ON_MR
changes:
paths:
- images/Ubuntu-2204/UHD/**/*
- images/Ubuntu-2204/.gitlab-ci.yml
- images/linuxptp/**/*
- if: $ON_DEFAULT_BRANCH
changes:
paths:
- images/Ubuntu-2204/UHD/**/*
- images/Ubuntu-2204/.gitlab-ci.yml
- images/linuxptp/**/*
compare_to: refs/tags/latest
- if: $ON_SCHEDULE
variables:
DOCKERFILE: "images/Ubuntu-2204/UHD"
CT_VERSION: "1.0.3"
SOFTWARE_USED: $UHD_VERSION
trigger:
include: images/linuxptp/.gitlab-ci.yml
strategy: depend
needs: []

Ubuntu-22.04-OFH:
extends: .ubuntu-22.04
################################################################################
## Charts
################################################################################

grafana-deployment chart:
stage: child
rules:
- if: $ON_MR
changes:
paths:
- images/Ubuntu-2204/OFH/**/*
- images/Ubuntu-2204/.gitlab-ci.yml
- if: $ON_DEFAULT_BRANCH
- .gitlab/ci/helm_utils.yml
- charts/grafana/grafana-srsran/**/*
trigger:
include: charts/grafana/grafana-srsran/.gitlab-ci.yml
strategy: depend
needs: []

metrics_server chart:
stage: child
rules:
- if: $ON_MR
changes:
paths:
- images/Ubuntu-2204/OFH/**/*
- images/Ubuntu-2204/.gitlab-ci.yml
compare_to: refs/tags/latest
- if: $ON_SCHEDULE
variables:
DOCKERFILE: "images/Ubuntu-2204/OFH"
CT_VERSION: "1.0.3"
SOFTWARE_USED: $DPDK_VERSION
- .gitlab/ci/helm_utils.yml
- charts/grafana/metrics_server/**/*
trigger:
include: charts/grafana/metrics_server/.gitlab-ci.yml
strategy: depend
needs: []

linuxptp:
linuxptp chart:
stage: child
variables:
LINUXPTP_VERSION: "v4.1"
CT_VERSION: "1.0.3"
rules:
- if: $ON_MR
changes:
paths:
- images/linuxptp/**/*
- if: $ON_DEFAULT_BRANCH
- .gitlab/ci/helm_utils.yml
- charts/linuxptp/**/*
trigger:
include: charts/linuxptp/.gitlab-ci.yml
strategy: depend
needs: []

ru_emulator chart:
stage: child
rules:
- if: $ON_MR
changes:
paths:
- images/linuxptp/**/*
compare_to: refs/tags/latest
- if: $ON_SCHEDULE
- .gitlab/ci/helm_utils.yml
- charts/ru_emulator/**/*
trigger:
include: images/linuxptp/.gitlab-ci.yml
include: charts/ru_emulator/.gitlab-ci.yml
strategy: depend
needs: []

srsran-project chart:
stage: child
rules:
- if: $ON_MR
changes:
paths:
- .gitlab/ci/helm_utils.yml
- charts/srsran-project/**/*
- if: $CI_DESCRIPTION =~ /Synchronization with srsGNB/
variables:
CI_DESCRIPTION: $CI_DESCRIPTION
trigger:
include: charts/srsran-project/.gitlab-ci.yml
strategy: depend
needs: []

Expand All @@ -110,7 +128,6 @@ create-latest-tag:
stage: release
rules:
- if: $ON_DEFAULT_BRANCH
- if: $ON_SCHEDULE
script:
- delete_tag_if_exist latest
- create_tag latest
3 changes: 3 additions & 0 deletions .gitlab/ci/checkers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.txt
*.log
*.json
109 changes: 109 additions & 0 deletions .gitlab/ci/checkers/generate_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import yaml
import re
import argparse
import json
import textwrap

def parse_config_from_file(file_path):
with open(file_path, 'r') as file:
content = file.read()

# Regex to find the [CONFIG ] block and capture everything up to the next timestamp
config_pattern = re.compile(r'\[CONFIG\s*\](.*?)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+', re.DOTALL)
match = config_pattern.search(content)

if match:
config_text = match.group(1).strip()
# Remove the first line
config_lines = config_text.split('\n')
config_text = '\n'.join(config_lines[1:]).strip()
try:
config_data = yaml.safe_load(config_text)
return config_data
except yaml.YAMLError as e:
print(f"Error parsing YAML: {e}")
return None
else:
print("Configuration block not found")
return None

def generate_template(data, prefix="Values.config", indent=0):
template = ""
indent_str = " " * indent
for key, value in data.items():
if isinstance(value, dict):
template += f"\n{indent_str}{{{{- if .{prefix}.{key} }}}}\n{indent_str}{key}:\n"
template += generate_template(value, f"{prefix}.{key}", indent + 1)
template += f"{indent_str}{{{{- end }}}}\n"
else:
template += f"{indent_str}{{{{- if .{prefix}.{key} }}}}\n{indent_str}{key}: {{{{ .{prefix}.{key} }}}}\n{indent_str}{{{{- end }}}}\n"
return template

def generate_schema(data):
def _generate_schema(data):
schema = {"type": "object", "properties": {}, "additionalProperties": False}
for key, value in data.items():
if isinstance(value, dict):
schema["properties"][key] = _generate_schema(value)
elif isinstance(value, list):
if len(value) > 0 and isinstance(value[0], dict):
schema["properties"][key] = {"type": "array", "items": _generate_schema(value[0])}
else:
schema["properties"][key] = {"type": "array", "items": {"type": "string"}}
elif isinstance(value, int):
schema["properties"][key] = {"type": "integer"}
elif isinstance(value, float):
schema["properties"][key] = {"type": "number"}
elif isinstance(value, bool):
schema["properties"][key] = {"type": "boolean"}
else:
schema["properties"][key] = {"type": "string"}
return schema

base_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": _generate_schema(data)["properties"],
"additionalProperties": False
}
return base_schema

def main():
parser = argparse.ArgumentParser(description="Parse configuration file and generate Jinja2 template.")
parser.add_argument('--input', type=str, required=True, help='Path to the log file.')
parser.add_argument('--mode', choices=['parse', 'configMap', 'schema'], required=True, help='Mode of operation: "parse" or "template".')
args = parser.parse_args()

config_data = parse_config_from_file(args.input)

if not config_data:
print("No configuration found or error parsing YAML.")
return

if args.mode == 'parse':
print(json.dumps(config_data, indent=4))
elif args.mode == 'schema':
schema = generate_schema(config_data)
print(json.dumps(schema, indent=4))
elif args.mode == 'configMap':
template = generate_template(config_data)
full_template = f"""#
# Copyright 2021-2024 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#

apiVersion: v1
kind: ConfigMap
metadata:
name: srsgnb-configmap
data:
gnb-config.yml: |
{textwrap.indent(template, ' ')}
"""
print(full_template)

if __name__ == "__main__":
main()
37 changes: 37 additions & 0 deletions .gitlab/ci/checkers/generate_from_chart_values.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import yaml
import argparse
import json
from jsonschema import validate, ValidationError

def validate_yaml(input_json_schema, yaml_data):
with open(input_json_schema, 'r', encoding="UTF8") as f:
json_schema = json.load(f)

try:
validate(instance=yaml_data, schema=json_schema)
print("YAML data is valid against the schema")
except ValidationError as e:
print("Validation error:", e)
exit(1)
print("Configuration parsed successfully")

def main():
parser = argparse.ArgumentParser(description="Check chart configuratoin.")
parser.add_argument('--input-chart-config', type=str, required=True, help='Path to the chart configuration file.')
parser.add_argument('--output-config', type=str, required=True, help='Path to save the configuration.')
args = parser.parse_args()

with open(args.input_chart_config, 'r', encoding="UTF8") as f:
chart_config = f.read()

config_yaml = None
for config in chart_config.split("---\n"):
if not "kind: ConfigMap" in config:
continue
config_yaml = yaml.safe_load(yaml.safe_load(config)["data"]["gnb-config.yml"])

with open(args.output_config, "w", encoding="UTF8") as f:
yaml.dump(config_yaml, f)

if __name__ == "__main__":
main()
35 changes: 35 additions & 0 deletions .gitlab/ci/helm_utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright 2013-2024 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#

include:
- project: softwareradiosystems/ci/tools
ref: "20"
file: .gitlab/ci-shared/setup/all.yml

.helm lint:
image: alpine/helm:3.15.2
stage: static
retry: 2
variables:
CHART_PATH: ${CI_PROJECT_DIR}
rules:
- if: $ON_MR
script:
- |
# Installing kubeconform
cd /tmp
apk add --no-cache curl unzip
curl -LO https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz
tar -xzf kubeconform-linux-amd64.tar.gz
mv kubeconform /usr/local/bin/
chmod +x /usr/local/bin/kubeconform
cd ${CI_PROJECT_DIR}
- helm dependency update ${CHART_PATH}/
- helm lint --strict --with-subcharts ${CHART_PATH}/
- helm template --debug ${CHART_PATH}/ | kubeconform --debug --strict
- helm template ${CHART_PATH}/
Loading