Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit b883d1b

Browse files
committed
Smart Edge Open 22.03 release
1 parent 64658a4 commit b883d1b

File tree

226 files changed

+9850
-2295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+9850
-2295
lines changed

Pipfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# SPDX-License-Identifier: Apache-2.0
2-
# Copyright (c) 2021 Intel Corporation
2+
# Copyright (c) 2021-2022 Intel Corporation
33

44
[[source]]
55
url = "https://pypi.python.org/simple"
66
verify_ssl = true
77
name = "pypi"
88

99
[packages]
10-
ansible = "==2.9.20"
10+
ansible = "==2.9.27"
1111
ansible-lint = "==5.0.8"
12-
bandit = "== 1.7.0"
13-
jinja2 = "==2.11.3"
12+
jinja2 = "==3.0.3"
1413
pylint = "==2.7.2"
1514
netaddr = "==0.7.18"
1615
sh = "==1.14.1"

Pipfile.lock

Lines changed: 190 additions & 212 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

default_config.yml

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright (c) 2021 Intel Corporation
3+
4+
# GitHub Credentials.
5+
#
6+
# Required if using non-public repositories.
7+
# It can be generated on following website https://github.com/settings/tokens (SSO authorization might be needed).
8+
#
9+
# If provided, both user and token are required.
10+
# It is assumed that every repository defined in this file is part of the same git instance (e.g. https://github.com).
11+
git:
12+
user: ''
13+
password: '' # The 'password' field accepts one of two values git password or token.
14+
15+
# Edge Software Provisioner repository settings.
16+
esp:
17+
# URL of the ESP's repository.
18+
url: https://github.com/intel/Edge-Software-Provisioner
19+
# Branch to be checked out.
20+
branch: v2.0.3
21+
# ESP destination path.
22+
# This will be a path where ESP will be cloned to (relative to the script working directory).
23+
dest_dir: './esp'
24+
25+
# Settings related to dnsmasq which provides DHCP and PXE services.
26+
#
27+
# In case of USB-only provisioning (e.g. in corporate network with existing DHCP services),
28+
# the dnsmasq should be disabled to not interfere with existing network infrastructure.
29+
#
30+
# Rest of the settings in this section are related to the DHCP configuration that
31+
# will be sent to machines provisioned with PXE.
32+
# If left empty, these settings will be automatically deduced by the ESP,
33+
# however custom values might be required in some cases.
34+
dnsmasq:
35+
# If true, then the dnsmasq will be started with rest of the Provisioning System suite.
36+
enabled: false
37+
38+
# Domain Name System (DNS) settings
39+
# These values should be changed in case of default DNS (8.8.4.4 and 8.8.8.8) are not reachable.
40+
network_dns_primary: '' # e.g. 8.8.4.4
41+
network_dns_secondary: '' # e.g. 8.8.8.8
42+
43+
# DHCP and network settings
44+
dhcp_range_minimum: '' # e.g. 192.168.1.100
45+
dhcp_range_maximum: '' # e.g. 192.168.1.250
46+
network_broadcast_ip: '' # e.g. 192.168.1.255
47+
network_gateway_ip: '' # e.g. 192.168.1.1
48+
49+
# IP address of the Provisioning System
50+
host_ip: '' # e.g. 192.168.1.2
51+
52+
# Docker settings
53+
docker:
54+
# List of registry mirrors
55+
# The list will be propagated to the machine under provisioning.
56+
#
57+
# WARNING: This won't be applied to the Provisioning System.
58+
registry_mirrors: []
59+
60+
# DockerHub Credentials
61+
# If values are supplied, then docker login will be performed during Operating System provisioning.
62+
#
63+
# WARNING: This won't be applied neither to the Provisioning System
64+
# nor the machine under provisioning (with Experience Kits).
65+
dockerhub:
66+
username: ""
67+
password: ""
68+
69+
# Address of the NTP server used during deployment
70+
ntp_server: ''
71+
72+
# List of ESP profiles for Smart Edge Open.
73+
profiles:
74+
- name: Smart_Edge_Open_Developer_Experience_Kits
75+
76+
# Address of the profile repository
77+
url: https://github.com/smart-edge-open/profiles.git
78+
79+
# Branch to be checked out
80+
branch: smart-edge-open-22.03
81+
82+
# Profile scenario
83+
# Possible values: single-node, multi-node
84+
scenario: single-node
85+
86+
# Settings of Experience Kit that will be deployed
87+
experience_kit:
88+
# Address of the Experience Kit repository
89+
url: https://github.com/smart-edge-open/open-developer-experience-kits.git
90+
# Branch to be checked out
91+
branch: smart-edge-open-22.03
92+
# Deployment to be performed
93+
# Possible values: dek
94+
deployment: dek
95+
96+
# MAC address of the controlplane's primary interface.
97+
# This value is used only in multi-node scenario.
98+
controlplane_mac: ''
99+
100+
# Credentials of the operating system account that will be created.
101+
# Account will be added to the sudoers.
102+
account:
103+
username: smartedge-open
104+
password: smartedge-open
105+
106+
# Secure boot and trusted media platform options.
107+
bios:
108+
secure_boot: true
109+
tpm: true
110+
111+
112+
# Experience Kit group_vars overrides.
113+
# This section can be used to supply extra variables to influence the deployment of the Experience Kit.
114+
# The variables will be copied as-is to the destination group_vars on the machine.
115+
# Refer to the Experience Kit documentation for more examples.
116+
#
117+
# Example:
118+
# group_vars:
119+
# groups:
120+
# all:
121+
# topology_manager:
122+
# policy: "none"
123+
# controller_group:
124+
# edgeenode_group:
125+
group_vars:
126+
groups:
127+
all:
128+
controller_group:
129+
edgenode_group:
130+
131+
# Experience Kit host_vars overrides.
132+
# This section works analogous to the group_vars section, but influences the settings of specific host.
133+
host_vars:
134+
hosts:
135+
controller:
136+
node01:
137+
138+
# Experience Kit sideloads.
139+
# This section can be used to copy certain files required in the process of Experience Kit deployments.
140+
#
141+
# It is a list of items with following fields:
142+
# file_path is an absolute path on the Provision System. It can point to a file or to a folder.
143+
# dest_path is a target path on the system under provisioning. The path can be absolute
144+
# or relative (relative to /opt/seo). If file_path points to a file and dest_path looks
145+
# like a dir path (ends with '/'), filename will be automatically appended to that dir path.
146+
sideload:
147+
# Example entries:
148+
# This will cause a file /opt/extra_package.zip to be copied to /opt/seo/extra/extra_package_renamed.zip
149+
# - file_path: "/opt/extra_package.zip"
150+
# dest_path: "./extra/extra_package_renamed.zip"
151+
# This will cause a file /root/extra_package.zip to be copied to /opt/seo/extra/extra_package.zip
152+
# - file_path: "/root/extra_package.zip"
153+
# dest_path: "extra/"
154+
# This will cause a content of a folder /root/extra_sideload_dir to be copied under /opt/offline_files
155+
# - file_path: "/root/extra_sideload_dir"
156+
# dest_path: "../offline_files"
157+
158+
# Define additional inventory groups where hosts belong to.
159+
# Possible host names: controller, node01
160+
# Note: some Experience Kits require to provide at least a group name with no hosts.
161+
extra_inventory_groups:
162+
# Example:
163+
# ptp_slave_group:
164+
# controller:
165+
# node01:
166+
# ptp_master:
167+
# controller:
168+
169+
# example hosts section defining host special settings and bmc access data
170+
# hosts:
171+
# # full example for this element
172+
# - name: master # this will be set as a hostname
173+
# mac: 11:22:33:44:55:66 # this host can be identified from the profile to set a hostname
174+
# bmc: # bmc settings
175+
# address: 1.2.3.4 # bmc address
176+
# user: user # bmc user name
177+
# password: password # bmc password
178+
# bios: # bios settings
179+
# tpm: false # TPM
180+
# secure_boot: false # Secure Boot
181+
# # example without bmc, the profile will just set hostname
182+
# - name: node1
183+
# mac: AA:BB:CC:DD:EE:FF # this host can be identified from the profile to set a hostname
184+
# # example node without mac, the profile cannot identify host and set a hostname so no hostname here
185+
# - name: node2
186+
# bios:
187+
# tpm: false
188+
# secure_boot: true
189+
# bmc: # bmc data allows to switch TPM and Secure Boot
190+
# address: 1.2.3.4
191+
# user: user
192+
# password: password
193+
194+
# global bmc section used for uniform inhost bmc access
195+
# bmc:
196+
# address: 169.254.0.1
197+
# user: user
198+
# password: password
199+
200+
# global bios settings
201+
# bios:
202+
# tpm: false
203+
# secure_boot: false
204+
205+
# Configuration of USB images.
206+
#
207+
# Generated images are in form of raw .img disk.
208+
# ESP's flashusb.sh utility can be used to the image onto the USB drive.
209+
usb_images:
210+
# Build USB images.
211+
# If false, then no USB image will be produced.
212+
build: true
213+
214+
# Build images for legacy BIOS.
215+
bios: true
216+
217+
# Build images for UEFI BIOS.
218+
efi: true
219+
220+
# Build an all-in-one image for each BIOS.
221+
# If false, then an image for each of the profiles will be produced separately.
222+
# If true, then a single image per BIOS with all of the profiles will be produced.
223+
all_in_one: false
224+
225+
# Path where built images will be placed.
226+
# This is relative path to the script's working directory.
227+
output_path: './out'

dek_provision.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import os
99
import sys
1010

11-
_CFG_FILE = "my.yml"
12-
1311
if __name__ == "__main__":
1412
sys.path.insert(
1513
1, os.path.join(os.path.dirname(os.path.realpath(__file__)), "scripts", "deploy_esp"))

deploy.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22

33
# SPDX-License-Identifier: Apache-2.0
4-
# Copyright (c) 2021 Intel Corporation
4+
# Copyright (c) 2021-2022 Intel Corporation
55

66
"""
77
Deploy Smart Edge with inventory.yml file.
@@ -187,7 +187,7 @@ def handle_cluster_inventory_dir(cluster_inventory_path, group_vars_path, host_v
187187
create_symlinks_for_inventory(DEFAULT_HOST_VARS_PATH, host_vars_path)
188188

189189

190-
def run_deployment(inventory):
190+
def run_deployment(inventory, cleanup=False, redeploy=False):
191191
"""Deploys Smart Edge with given settings, returns Popen object"""
192192
inventory_dir = os.path.join(ALT_INVENTORIES_PATH, inventory.cluster_name)
193193
inventory_location = inventory.dump_to_yaml(inventory_dir)
@@ -197,10 +197,18 @@ def run_deployment(inventory):
197197

198198
handle_deployment_type(inventory.deployment, group_vars_path)
199199

200-
if inventory.is_single_node:
201-
playbook = "single_node_network_edge.yml"
200+
# DEK do not support extra arguments like "clean" or "redeploy"
201+
extra_options_supported = inventory.deployment in ["pwek-all-in-one"]
202+
203+
if extra_options_supported and cleanup:
204+
playbook = "network_edge_5g_cleanup.yml"
205+
elif extra_options_supported and redeploy:
206+
playbook = "network_edge_5g_redeploy.yml"
202207
else:
203-
playbook = "network_edge.yml"
208+
if inventory.is_single_node:
209+
playbook = "single_node_network_edge.yml"
210+
else:
211+
playbook = "network_edge.yml"
204212

205213
playbook = os.path.join(SCRIPT_PARENT_DIR, playbook)
206214

@@ -352,14 +360,22 @@ def print_deployment_recap(deployments):
352360

353361
def parse_arguments():
354362
"""Parse argument passed to function"""
355-
script_description = ("Script for Deploying Smart Edge using inventory.yml file."
363+
script_description = ("Script for deploying Smart Edge using inventory.yml file. "
356364
"Deployment is controlled through inventory.yml.\n"
357365
"Available deployments:\n")
358366
script_description += "\n".join([d.name for d in os.scandir(DEPLOYMENTS_PATH) if d.is_dir()])
359367
parser = argparse.ArgumentParser(
360368
description=script_description, formatter_class=argparse.RawTextHelpFormatter)
361369
parser.add_argument("-f", "--any-errors-fatal", dest="any_errors_fatal", action="store_true",
362370
help="Terminate all running actions when any of them fail")
371+
parser.add_argument("-c5g", "--clean5g", dest="clean", action="store_true",
372+
help="Run 5G cleanup scripts on clusters. Supported only in 5G "
373+
"Private Wireless Experience Kit. Not supported in Open Developer"
374+
"Experience Kit.")
375+
parser.add_argument("-r5g", "--redeploy5g", dest="redeploy", action="store_true",
376+
help="Run 5G re-deployment scripts on clusters. Supported only in 5G "
377+
"Private Wireless Experience Kit. Not supported in Open Developer "
378+
"Experience Kit.")
363379
return parser.parse_args()
364380

365381

@@ -392,7 +408,7 @@ def main(args):
392408

393409
prepare_alt_dir_layout()
394410
for inventory in inventory_handler.get_inventories:
395-
deploy_wrapper = run_deployment(inventory)
411+
deploy_wrapper = run_deployment(inventory, args.clean, args.redeploy)
396412
deployment_wrappers.append(deploy_wrapper)
397413
time.sleep(DEPLOYMENT_INTERVAL)
398414

deployments/verification_controller/all.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,8 @@ sriov_network_operator_enable: false
77
## SR-IOV Network Operator configuration
88
sriov_network_operator_configure_enable: false
99

10-
# Grafana
11-
telemetry_grafana_enable: false
12-
13-
# Prometheus
14-
telemetry_prometheus_enable: false
15-
16-
# Prometheus-statsd-exporter
17-
telemetry_statsd_exporter_enable: false
18-
19-
# Collectd
20-
telemetry_collectd_enable: false
21-
22-
# CAdvisor
23-
telemetry_cadvisor_enable: false
10+
# Disable telemetry
11+
telemetry_enable: false
2412

2513
# Disable Harbor Registry
2614
harbor_registry_enable: false
@@ -45,5 +33,13 @@ isecl_ta_san_list: ""
4533
# Enable PCCS deployment
4634
pccs_enable: true
4735

36+
# Enable KMRA app-hsm deployment
37+
kmra_enable: true
38+
39+
# Enable Pod Security Policy. This option enables PSP admission controller and creates minimal set of rules.
40+
psp_enabled: true
41+
42+
#SGX GID
43+
sgx_prv_gid: 1002
4844
# Disable CPU reservation for kubelet
4945
cpu: {}

0 commit comments

Comments
 (0)