Skip to content

Commit

Permalink
Merge pull request #215 from Cray-HPE/develop
Browse files Browse the repository at this point in the history
Merge develop to master to prepare 1.17.0 release
  • Loading branch information
mharding-hpe authored Oct 18, 2023
2 parents 0bf7604 + 29ea57c commit 2e2c812
Show file tree
Hide file tree
Showing 10 changed files with 207 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-changelog-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:

# This step is required for committing the changes to your branch.
# See https://github.com/stefanzweifel/git-auto-commit-action#commits-of-this-action-do-not-trigger-new-workflow-runs
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Updated Changelog"
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.17.0] - 2023-10-18

### Dependencies

- Bump `stefanzweifel/git-auto-commit-action` from 4 to 5 ([#212](https://github.com/Cray-HPE/csm-config/pull/212))

### Added

- CRAYSAT-1767: Added the role `csm.ncn.sat` for configuration of the System
Admin Toolkit (SAT). A similar role for SAT configuraiton was previously only
provided by the SAT product.

## [1.16.22] - 2023-09-26

### Changed
Expand Down Expand Up @@ -343,7 +355,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Ansible playbook for applying csm packages to Compute and Application nodes

[Unreleased]: https://github.com/Cray-HPE/csm-config/compare/1.16.22...HEAD
[Unreleased]: https://github.com/Cray-HPE/csm-config/compare/1.17.0...HEAD

[1.17.0]: https://github.com/Cray-HPE/csm-config/compare/1.16.22...1.17.0

[1.16.22]: https://github.com/Cray-HPE/csm-config/compare/1.16.21...1.16.22

Expand Down
1 change: 1 addition & 0 deletions ansible/ncn-master_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@
- role: csm.ssh_keys
vars:
ssh_keys_username: 'root'
- role: csm.ncn.sat
1 change: 1 addition & 0 deletions ansible/ncn-worker_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@
- role: csm.ssh_keys
vars:
ssh_keys_username: 'root'
- role: csm.ncn.sat
3 changes: 2 additions & 1 deletion ansible/ncn_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
vars:
ssh_keys_username: 'root'

# Install packages on Kubernetes NCNs (masters and workers)
# Install packages and configure SAT on Kubernetes NCNs (masters and workers)
- hosts:
- Management_Master
- Management_Worker
Expand All @@ -63,6 +63,7 @@
vars:
packages: "{{ common_csm_sles_packages + common_mgmt_ncn_csm_sles_packages + k8s_mgmt_ncn_csm_sles_packages }}"
when: ansible_distribution_file_variety == "SUSE"
- role: csm.ncn.sat

# Install packages on storage NCNs
- hosts:
Expand Down
73 changes: 73 additions & 0 deletions ansible/roles/csm.ncn.sat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
csm.ncn.sat
===========

Configure the System Admin Toolkit (SAT) CLI on management non-compute nodes (NCNs).

Requirements
------------

This role must be run in the context of the CSM Configuration
Framework Service (CFS) in its Ansible Execution Environment (AEE).

Role Variables
--------------

Available variables are listed below, along with example values (located in
`defaults/main.yml` and `vars/main.yml`):

```yaml
sat_container_image_version_directory: "/opt/cray/etc/sat/"
```
The directory in which the file containing the `cray-sat` container image
version will be saved.

```yaml
sat_container_image_version_file: "version"
```

The file in which the `cray-sat` container image version will be saved.

```yaml
sat_config_file: "/root/.config/sat/sat.toml"
```

The location of the `sat.toml` configuration file, which will have its
permissions locked down.

```yaml
sat_container_image_version: "csm-latest"
```

The `cray-sat` container image version which will be written to the version
file described above. This variable is set correctly for the CSM version at CSM
installation time in `vars/main.yml`.

Dependencies
------------

None

Example Playbook
----------------

This example playbook configures SAT on the nodes in the groups `Management_Master` and
`Management_Worker`.

```yaml
- hosts:
- Management_Master
- Management_Worker
roles:
- role: csm.ncn.sat
```

License
-------

MIT

Author Information
------------------

Copyright 2023 Hewlett Packard Enterprise Development LP
33 changes: 33 additions & 0 deletions ansible/roles/csm.ncn.sat/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# MIT License
#
# (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"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Defaults for the csm.ncn.sat role. See the README.md for information.

sat_container_image_version_directory: "/opt/cray/etc/sat/"
sat_container_image_version_file: "version"
sat_config_file: "/root/.config/sat/sat.toml"

# This variable gets overridden by the value in vars, which is written by the
# init container in the Helm chart, which gets defined through the Loftsman
# manifest included in the CSM release distribution.
sat_container_image_version: "csm-latest"
50 changes: 50 additions & 0 deletions ansible/roles/csm.ncn.sat/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# MIT License
#
# (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"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Tasks for the csm.ncn.sat role

- name: "Check if configuration file exists"
stat:
path: "{{ sat_config_file }}"
register: config_file_stat

- name: "Ensure configuration file has 0600 permissions"
file:
path: "{{ sat_config_file }}"
mode: 0600
when: config_file_stat.stat.exists

- name: "Ensure tokens directory has 0700 permissions"
file:
path: "/root/.config/sat/tokens"
state: "directory"
mode: 0700

- name: "Ensure directory containing SAT container image version file exists"
file:
path: "{{ sat_container_image_version_directory }}"
state: "directory"

- name: "Create file containing SAT container image version"
copy:
dest: "{{ sat_container_image_version_directory }}/{{ sat_container_image_version_file }}"
content: "{{ sat_container_image_version }}"
30 changes: 30 additions & 0 deletions ansible/roles/csm.ncn.sat/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# MIT License
#
# (C) Copyright 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"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Vars for the csm.ncn.sat role. See the README.md for information.
#
# This file gets overwritten by the init container in the Helm chart, which
# gets defined through the Loftsman manifest included in the CSM release
# distribution. The file is included here just for illustrative purposes.

sat_container_image_version: "csm-latest"
1 change: 1 addition & 0 deletions ansible/vars/csm_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ common_mgmt_ncn_csm_sles_packages:
# All Kubernetes Management NCNs (master and worker)
k8s_mgmt_ncn_csm_sles_packages:
- cray-cmstools-crayctldeploy
- cray-sat-podman
- dracut-metal-dmk8s
- dracut-metal-luksetcd

Expand Down

0 comments on commit 2e2c812

Please sign in to comment.