-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from Cray-HPE/develop
Merge develop to master to prepare 1.17.0 release
- Loading branch information
Showing
10 changed files
with
207 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,4 @@ | |
- role: csm.ssh_keys | ||
vars: | ||
ssh_keys_username: 'root' | ||
- role: csm.ncn.sat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,4 @@ | |
- role: csm.ssh_keys | ||
vars: | ||
ssh_keys_username: 'root' | ||
- role: csm.ncn.sat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters