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

Release/1.11.2 #56

Merged
merged 22 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bcec9af
update internal dev.cray.com addresses to new hpc domain
Aug 8, 2022
c018128
Merge pull request #47 from Cray-HPE/CASMCMS-8149
rbak-hpe Aug 10, 2022
b11ec1d
Merge pull request #46 from Cray-HPE/feature/CASMCMS-8141
rbak-hpe Aug 11, 2022
055c36f
Merge pull request #49 from Cray-HPE/mergeback-master-release/1.11.0-…
rbak-hpe Aug 11, 2022
5495d58
CASMCMS-8041: Spelling corrections
mharding-hpe Aug 25, 2022
69a3318
Update changelog
mharding-hpe Aug 25, 2022
3233575
Merge pull request #50 from Cray-HPE/feature/CASMCMS-8041
mharding-hpe Sep 7, 2022
d60f24e
CASMCMS-8252: Update Chart with correct version strings during builds
mharding-hpe Sep 28, 2022
c3a7bc6
CASMCMS-8252: Enable building of unstable artifacts
mharding-hpe Sep 28, 2022
987e089
Merge pull request #51 from Cray-HPE/CASMCMS-8252
mharding-hpe Sep 29, 2022
33b00e7
Make all of CMS CODEOWNERS
jsollom-hpe Oct 31, 2022
3ef20bb
Merge branch 'develop' into mergeback-master-hotfix/CASMCMS-8353-1671…
jsollom-hpe Dec 21, 2022
0a5b13d
Merge pull request #54 from Cray-HPE/mergeback-master-hotfix/CASMCMS-…
jsollom-hpe Dec 21, 2022
251f8ec
CASMINST-6067 Provide helm auth for shared charts-lint-test-scan action
mtupitsyn Mar 29, 2023
74fbdcc
VSHA-547 make build architecture and build kind configurable
erl-hpe Mar 16, 2023
2299043
VSHA-547 add changelog info
erl-hpe Mar 16, 2023
b9e39ed
VSHA-547 update copyright dates
erl-hpe Mar 16, 2023
19f68c1
VSHA-547 Make image repository track stable / unstable correctly
erl-hpe Apr 7, 2023
d4253f4
Update CHANGELOG.md
mharding-hpe Apr 11, 2023
e269730
Merge pull request #55 from Cray-HPE/feature/VSHA-547
mharding-hpe Apr 14, 2023
9b3d2b2
Release 1.11.2
mharding-hpe Apr 14, 2023
0c298c1
Merge branch 'master' into release/1.11.2
mharding-hpe Apr 14, 2023
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# the repo. Unless a later match takes precedence, the
# owners listed in this stanza will be requested for review
# when someone opens a pull request.
* @Cray-HPE/CMS-core-boot-services
* @Cray-HPE/Cray-Management-Systems
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.11.2] - 2023-04-14

### Fixed

- Make the build architecture and kind configurable to allow use on platforms that require KPXE binaries.

### Changed

- Spelling corrections.
- Enabled building of unstable artifacts
- Updated header of update_versions.conf to reflect new tool options

### Fixed

- Update Chart with correct image and chart version strings during builds.

## [1.11.1] - 2022-12-20

### Added

- Add Artifactory authentication to Jenkinsfile

## [1.11.0] - 20222-08-10
Expand All @@ -17,12 +37,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update internal domain addresses


## [1.10.0] - 2022-06-22

### Changed

- Convert to gitflow/gitversion.
- CASMCMS-7992 - Allow for changing ipxe binary names.
- Update internal domain addresses

## [1.9.4] - (no date)
4 changes: 2 additions & 2 deletions kubernetes/cms-ipxe/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#
apiVersion: v2
name: cms-ipxe
version: 0.0.0
version: 0.0.0-chart
description: Kubernetes resources for cms-ipxe
home: https://github.com/Cray-HPE/cms-ipxe
sources:
Expand All @@ -35,5 +35,5 @@ dependencies:
annotations:
artifacthub.io/images: |
- name: cray-bss-ipxe
image: artifactory.algol60.net/csm-docker/stable/cray-bss-ipxe:0.0.0
image: artifactory.algol60.net/csm-docker/S-T-A-B-L-E/cray-bss-ipxe:0.0.0-image
artifacthub.io/license: MIT
4 changes: 3 additions & 1 deletion kubernetes/cms-ipxe/templates/configmap-settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
MIT License

(C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
(C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -36,3 +36,5 @@ data:
cray_ipxe_token_host: {{ .Values.ipxe.api_gw }}
cray_ipxe_binary_name: {{ .Values.ipxe.cray_ipxe_binary_name }}
cray_ipxe_debug_binary_name: {{ .Values.ipxe.cray_ipxe_debug_binary_name }}
cray_ipxe_build_arch: {{ .Values.ipxe.cray_ipxe_build_arch }}
cray_ipxe_build_kind: {{ .Values.ipxe.cray_ipxe_build_kind }}
2 changes: 1 addition & 1 deletion kubernetes/cms-ipxe/templates/post-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
restartPolicy: Never
containers:
- name: cms-ipxe-migration
image: "artifactory.algol60.net/csm-docker/stable/cray-bss-ipxe:{{ .Chart.AppVersion }}"
image: "{{ .Values.post_upgrade.image.repository }}:{{ .Chart.AppVersion }}"
command:
- '/bin/sh'
- '-c'
Expand Down
19 changes: 16 additions & 3 deletions kubernetes/cms-ipxe/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -43,7 +43,7 @@ cray-service:
cray-ipxe:
name: cray-ipxe
image:
repository: artifactory.algol60.net/csm-docker/stable/cray-bss-ipxe
repository: artifactory.algol60.net/csm-docker/S-T-A-B-L-E/cray-bss-ipxe
volumeMounts:
- name: cray-tftp-data
mountPath: /shared_tftp
Expand Down Expand Up @@ -127,7 +127,7 @@ ipxe:
bss_max_attempts: 1024

# The longest period of time to wait between attempts for contacting BSS over NICs
# interated in cray_nic-boot_order. This number is effectively influenced by the
# iterated in cray_nic-boot_order. This number is effectively influenced by the
# number of nodes expected to be booted simultaneously, and the effective number
# of requests per second that BSS can serve out, assuming an average number of
# requests per second. The exact number of requests per second is probably not
Expand All @@ -147,3 +147,16 @@ ipxe:

cray_ipxe_binary_name: ipxe.efi
cray_ipxe_debug_binary_name: debug-ipxe.efi

# Allow specification of an architecture other than x86_64 and a kind other than
# EFI. Currently, the only supported architecture is 'x86_64' and the supported
# kinds are 'efi' and 'kpxe'.
#
# If you set the kind to 'kpxe' here, you also want to set the binary name (above)
# to 'undionly.kpxe' and the debug binary name to 'debug-undionly.kpxe'.
cray_ipxe_build_arch: x86_64
cray_ipxe_build_kind: efi

post_upgrade:
image:
repository: artifactory.algol60.net/csm-docker/S-T-A-B-L-E/cray-bss-ipxe
2 changes: 1 addition & 1 deletion src/crayipxe/liveness/ipxe_timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def value(self):
data = json.load(timestamp_file)
return datetime.datetime.fromtimestamp(float(data['timestamp']))
except FileNotFoundError:
LOGGER.warning("Timestamp never intialized to '%s'" % (self.path))
LOGGER.warning("Timestamp never initialized to '%s'" % (self.path))
return datetime.datetime.fromtimestamp(0)

def delete(self):
Expand Down
21 changes: 14 additions & 7 deletions src/crayipxe/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP
# (C) Copyright 2019-2023 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -284,7 +284,7 @@ def token_expiring_soon(bearer_token, min_remaining_valid_time):
return True

# Just decode the token to extract the value. THe token has already been
# obtianed from Keycloak here and verification gets handled
# obtained from Keycloak here and verification gets handled
# by the API GW when the token is checked.
tokenMap = None
try:
Expand Down Expand Up @@ -458,12 +458,17 @@ def main():
bearer_token_changed = True
bearer_token = bearer_token_new

# Touch the relevent source to force a recompile.
# Touch the relevant source to force a recompile.
os.utime('/ipxe/net/tcp/httpcore.c', None)

# ipxe script setting
bss_script_raw = api_instance.read_namespaced_config_map('cray-ipxe-bss-ipxe', 'services')
bss_script_new = bss_script_raw.data['bss.ipxe']

# ipxe binary type and architecture settings...
build_arch = settings.get('cray_ipxe_build_arch', 'x86_64')
build_kind = settings.get('cray_ipxe_build_kind', 'efi')

if bss_script_new != bss_script:
bss_script_changed = True
bss_script = bss_script_new
Expand All @@ -472,15 +477,16 @@ def main():

if any([settings_changed, ca_public_key_changed, bss_script_changed,
bearer_token_changed]):
# Create a file to indicate the build is in progress. A Kuberenetes
# Create a file to indicate the build is in progress. A Kubernetes
# livenessProbe can check on this file to see if it has stayed around
# longer than expected, which would indicate a build failure.
ipxe_timestamp = ipxeTimestamp(IPXE_PATH, os.getenv('IPXE_BUILD_TIME_LIMIT', 40))

new_ipxe_binary = create_binaries(api_instance, ipxe_binary_name, bss_script, cert=public_cert,
bearer_token=bearer_token,
ipxe_build_debug=ipxe_build_debug,
ipxe_build_debug_level=cray_ipxe_debug_level)
ipxe_build_debug_level=cray_ipxe_debug_level,
arch=build_arch, kind=build_kind)

if not ipxe_binary == new_ipxe_binary:
if ipxe_binary and os.path.exists(ipxe_binary):
Expand All @@ -504,7 +510,7 @@ def main():
shell_script = shell_script_new
if any([settings_changed, ca_public_key_changed, shell_script_changed,
bearer_token_changed]):
# Create a file to indicate the build is in progress. A Kuberenetes
# Create a file to indicate the build is in progress. A Kubernetes
# livenessProbe can check on this file to see if it has stayed around
# longer than expected, which would indicate a build failure.
debug_ipxe_timestamp = ipxeTimestamp(DEBUG_IPXE_PATH,
Expand All @@ -514,7 +520,8 @@ def main():
cert=public_cert,
bearer_token=bearer_token,
ipxe_build_debug=ipxe_build_debug,
ipxe_build_debug_level=cray_ipxe_debug_level)
ipxe_build_debug_level=cray_ipxe_debug_level,
arch=build_arch, kind=build_kind)

# The upgrade to cms-ipxe 1.10.0 changed the default name, potentially leaving an old file
# This file still contains a valid token and should be cleaned up if not in use
Expand Down
42 changes: 27 additions & 15 deletions update_versions.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
#tag: version tag string to be replaced (optional -- if unspecified @VERSION@ is assumed)
#sourcefile: file to read actual version from (optional -- if unspecified, .version is assumed)
#targetfile: file in which to have version tags replaced
#tag: Version tag string to be replaced (optional -- if unspecified @VERSION@ is assumed)
#
#Multiples of these lines are allowed. A given line is in effect until another line overrides it.
#Example:
#tag: @TAG1@
#sourcefile: path/to/version1.txt
#targetfile: my/file.py
#targetfile: other/file.yaml
#sourcefile: File to obtain the actual version from (optional -- if unspecified, .version is assumed)
# If this file is executable, it will be executed and the output will be used as the version string.
# Otherwise it will be read and its contents will be used as the version string, with any leading and
# trailing whitespace stripped. The version string is validated by the update_version.sh string to
# verify that they match the expected version formatting (essentially semver, with a minor exception
# -- see the script header for details).
#sourcefile-novalidate: This is identical to the previous tag, except that the only validation that is
# done is to verify that the version string is not blank and does not contain strings which will
# disrupt the sed command used for the version tag replacement. Essentially, it cannot contain
# double quotes, forward slashes, or hash symbols. The file does still have leading and trailing
# whitespace stripped, however.
#targetfile: file in which to have version tags replaced. When this line is reached, the replacement
# action is performed on this file.
#
#tag: @TAG2@
#targetfile: a/b/c.txt
#
#sourcefile: v2.txt
#targetfile: 1/2/3.txt
#Multiples of any of these lines are allowed. A given line is in effect until another line overrides it.
#For this purpose, the sourcefile and sourcefile-novalidate lines are considered the same (that is, they
#override each other).

sourcefile: .chart_version
tag: 0.0.0-chart
targetfile: kubernetes/cms-ipxe/Chart.yaml

sourcefile: .docker_version
tag: 0.0.0-image
targetfile: kubernetes/cms-ipxe/Chart.yaml

tag: 0.0.0
sourcefile-novalidate: .stable
tag: S-T-A-B-L-E
targetfile: kubernetes/cms-ipxe/Chart.yaml
targetfile: kubernetes/cms-ipxe/values.yaml

Expand Down