Skip to content

Commit 92fba61

Browse files
committed
chore: Rename cvm_deploy to trustee_attestation_client
Rename the role to correspond to the newly created trustee_attestation_server role.
1 parent f5089d1 commit 92fba61

43 files changed

Lines changed: 209 additions & 169 deletions

Some content is hidden

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

.ansible-lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ exclude_paths:
2121
- .markdownlint.yaml
2222
- examples/roles/
2323
mock_roles:
24-
- linux-system-roles.cvm_deploy
24+
- linux-system-roles.trustee_attestation_client
2525
supported_ansible_also:
2626
- "2.14.0"

.github/workflows/tft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181
tf_scope: private
182182
api_key: ${{ secrets.TF_API_KEY_RH }}
183183
update_pull_request_status: false
184-
tmt_plan_filter: "tag:playbooks_parallel,cvm_deploy"
184+
tmt_plan_filter: "tag:playbooks_parallel,trustee_attestation_client"
185185

186186
- name: Set final commit status
187187
uses: myrotvorets/set-commit-status-action@master

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# cvm_deploy
1+
# trustee_attestation_client
22

3-
[![ansible-lint.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/markdownlint.yml) [![qemu-kvm-integration-tests.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/qemu-kvm-integration-tests.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/qemu-kvm-integration-tests.yml) [![shellcheck.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/cvm_deploy/actions/workflows/woke.yml)
3+
[![ansible-lint.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/markdownlint.yml) [![qemu-kvm-integration-tests.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/qemu-kvm-integration-tests.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/qemu-kvm-integration-tests.yml) [![shellcheck.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/trustee_attestation_client/actions/workflows/woke.yml)
44

5-
![cvm_deploy](https://github.com/linux-system-roles/cvm_deploy/workflows/tox/badge.svg)
5+
![trustee_attestation_client](https://github.com/linux-system-roles/trustee_attestation_client/workflows/tox/badge.svg)
66

77
Ansible role for deploying Trustee Guest Components using Podman Quadlets for
88
confidential virtual machine deployments. The role downloads quadlet files and
@@ -19,11 +19,11 @@ The role will:
1919
install directory (`/etc/containers/systemd` by default)
2020
4. Copy config files from the repository's `configs` directory to `/etc/trustee-gc/`
2121
5. Replace `KBS_URL` and `KBS_CERT` placeholders in `/etc/trustee-gc/cdh/config.toml`
22-
with the values from `cvm_deploy_trustee_kbs_url` and `cvm_deploy_trustee_kbs_cert`
22+
with the values from `trustee_attestation_client_trustee_kbs_url` and `trustee_attestation_client_trustee_kbs_cert`
2323
variables (if provided)
2424
6. Reload systemd daemon
2525
7. Enable and start the Trustee Guest Components services
26-
8. (Optional) If `cvm_deploy_encrypt_disk` is `true`:
26+
8. (Optional) If `trustee_attestation_client_encrypt_disk` is `true`:
2727
- Find an unpartitioned and unmounted disk
2828
- Create a GPT partition table and partition on the disk
2929
- Generate an encryption key and encrypt the partition using LUKS
@@ -34,19 +34,19 @@ The role will:
3434
Example of setting the variables:
3535

3636
```yaml
37-
cvm_deploy_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
38-
cvm_deploy_quadlet_repo_path: "quadlet"
39-
cvm_deploy_quadlet_repo_branch: "main"
40-
cvm_deploy_trustee_kbs_url: "https://kbs.example.com"
41-
cvm_deploy_trustee_kbs_cert: "/path/to/cert.pem"
42-
cvm_deploy_encrypt_disk: true
37+
trustee_attestation_client_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
38+
trustee_attestation_client_quadlet_repo_path: "quadlet"
39+
trustee_attestation_client_quadlet_repo_branch: "main"
40+
trustee_attestation_client_trustee_kbs_url: "https://kbs.example.com"
41+
trustee_attestation_client_trustee_kbs_cert: "/path/to/cert.pem"
42+
trustee_attestation_client_encrypt_disk: true
4343
```
4444
4545
## Variables Exported by the Role
4646
4747
### encrypted_disk_key
4848
49-
If disk encryption is enabled (`cvm_deploy_encrypt_disk: true`), this fact
49+
If disk encryption is enabled (`trustee_attestation_client_encrypt_disk: true`), this fact
5050
contains the base64-encoded encryption key for the encrypted disk. This key is
5151
required to mount the encrypted disk after a reboot. The key is automatically
5252
generated during disk encryption and should be securely stored for future use.
@@ -60,14 +60,14 @@ passed in as parameters) is always nice for users too:
6060
- name: Deploy Trustee Guest Components using Podman Quadlets
6161
hosts: all
6262
vars:
63-
cvm_deploy_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
64-
cvm_deploy_quadlet_repo_path: "quadlet"
65-
cvm_deploy_quadlet_repo_branch: "main"
66-
cvm_deploy_trustee_kbs_url: "https://kbs.example.com"
67-
cvm_deploy_trustee_kbs_cert: "/path/to/kbs-cert.pem"
68-
cvm_deploy_encrypt_disk: true
63+
trustee_attestation_client_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
64+
trustee_attestation_client_quadlet_repo_path: "quadlet"
65+
trustee_attestation_client_quadlet_repo_branch: "main"
66+
trustee_attestation_client_trustee_kbs_url: "https://kbs.example.com"
67+
trustee_attestation_client_trustee_kbs_cert: "/path/to/kbs-cert.pem"
68+
trustee_attestation_client_encrypt_disk: true
6969
roles:
70-
- linux-system-roles.cvm_deploy
70+
- linux-system-roles.trustee_attestation_client
7171
```
7272

7373
## License

contributing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to the cvm_deploy Linux System Role
1+
# Contributing to the trustee_attestation_client Linux System Role
22

33
## Where to start
44

@@ -12,12 +12,12 @@ This has all of the common information that all role developers need:
1212
* How to create git commits and submit pull requests
1313

1414
**Bugs and needed implementations** are listed on
15-
[Github Issues](https://github.com/linux-system-roles/cvm_deploy/issues).
15+
[Github Issues](https://github.com/linux-system-roles/trustee_attestation_client/issues).
1616
Issues labeled with
17-
[**help wanted**](https://github.com/linux-system-roles/cvm_deploy/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
17+
[**help wanted**](https://github.com/linux-system-roles/trustee_attestation_client/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
1818
are likely to be suitable for new contributors!
1919

20-
**Code** is managed on [Github](https://github.com/linux-system-roles/cvm_deploy), using
20+
**Code** is managed on [Github](https://github.com/linux-system-roles/trustee_attestation_client), using
2121
[Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
2222

2323
## Running CI Tests Locally

defaults/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# This file also serves as a documentation for such a variables.
55

66
# Trustee Guest Components Quadlet repository configuration
7-
cvm_deploy_trustee_gc: true
8-
cvm_deploy_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
9-
cvm_deploy_quadlet_repo_path: "quadlet"
10-
cvm_deploy_quadlet_repo_branch: "main"
11-
cvm_deploy_quadlet_install_dir: "/etc/containers/systemd"
7+
trustee_attestation_client_trustee_gc: true
8+
trustee_attestation_client_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
9+
trustee_attestation_client_quadlet_repo_path: "quadlet"
10+
trustee_attestation_client_quadlet_repo_branch: "main"
11+
trustee_attestation_client_quadlet_install_dir: "/etc/containers/systemd"
1212

1313
# Trustee KBS configuration
14-
cvm_deploy_trustee_kbs_url: ""
15-
cvm_deploy_trustee_kbs_cert: ""
14+
trustee_attestation_client_trustee_kbs_url: ""
15+
trustee_attestation_client_trustee_kbs_cert: ""
1616

1717
# Encrypt disk configuration
18-
cvm_deploy_encrypt_disk: false
19-
cvm_deploy_encrypt_disk_mount_point: "/mnt/encrypted-disk"
18+
trustee_attestation_client_encrypt_disk: false
19+
trustee_attestation_client_encrypt_disk_mount_point: "/mnt/encrypted-disk"

examples/simple.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
- name: Deploy Trustee Guest Components using Podman Quadlets from GitHub repository
44
hosts: all
55
vars:
6-
cvm_deploy_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
7-
cvm_deploy_quadlet_repo_path: "quadlet"
8-
cvm_deploy_quadlet_repo_branch: "main"
9-
cvm_deploy_quadlet_install_dir: "/etc/containers/systemd"
10-
cvm_deploy_encrypt_disk: false
11-
cvm_deploy_trustee_kbs_url: "https://kbs.example.com"
12-
cvm_deploy_trustee_kbs_cert: "/path/to/kbs-cert.pem"
6+
trustee_attestation_client_quadlet_repo_url: "https://github.com/litian1992/trustee-gc-quadlet-rhel"
7+
trustee_attestation_client_quadlet_repo_path: "quadlet"
8+
trustee_attestation_client_quadlet_repo_branch: "main"
9+
trustee_attestation_client_quadlet_install_dir: "/etc/containers/systemd"
10+
trustee_attestation_client_encrypt_disk: false
11+
trustee_attestation_client_trustee_kbs_url: "https://kbs.example.com"
12+
trustee_attestation_client_trustee_kbs_cert: "/path/to/kbs-cert.pem"
1313
roles:
14-
- linux-system-roles.cvm_deploy
14+
- linux-system-roles.trustee_attestation_client

handlers/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: MIT
22
---
3-
- name: Handler for cvm_deploy to restart services
3+
- name: Handler for trustee_attestation_client to restart services
44
service:
55
name: "{{ item }}"
66
state: restarted
7-
loop: "{{ __cvm_deploy_services }}"
7+
loop: "{{ __trustee_attestation_client_services }}"

plans/README-plans.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction CI Testing Plans
22

3-
Linux System Roles CI runs [tmt](https://tmt.readthedocs.io/en/stable/index.html) test plans in [Testing farm](https://docs.testing-farm.io/Testing%20Farm/0.1/index.html) with the [tft.yml](https://github.com/linux-system-roles/cvm_deploy/blob/main/.github/workflows/tft.yml) GitHub workflow.
3+
Linux System Roles CI runs [tmt](https://tmt.readthedocs.io/en/stable/index.html) test plans in [Testing farm](https://docs.testing-farm.io/Testing%20Farm/0.1/index.html) with the [tft.yml](https://github.com/linux-system-roles/trustee_attestation_client/blob/main/.github/workflows/tft.yml) GitHub workflow.
44

55
The `plans/test_playbooks_parallel.fmf` plan is a test plan that runs test playbooks in parallel on multiple managed nodes.
66
`plans/test_playbooks_parallel.fmf` is generated centrally from `https://github.com/linux-system-roles/.github/`.
@@ -16,7 +16,7 @@ The `plans/test_playbooks_parallel.fmf` plan does the following steps:
1616
2. Does the required preparation on systems.
1717
3. For the given role and the given PR, runs the general test from [test.sh](https://github.com/linux-system-roles/tft-tests/blob/main/tests/general/test.sh).
1818

19-
The [tft.yml](https://github.com/linux-system-roles/cvm_deploy/blob/main/.github/workflows/tft.yml) workflow runs the above plan and uploads the results to our Fedora storage for public access.
19+
The [tft.yml](https://github.com/linux-system-roles/trustee_attestation_client/blob/main/.github/workflows/tft.yml) workflow runs the above plan and uploads the results to our Fedora storage for public access.
2020
This workflow uses Testing Farm's Github Action [Schedule tests on Testing Farm](https://github.com/marketplace/actions/schedule-tests-on-testing-farm).
2121

2222
## Running Tests
@@ -47,7 +47,7 @@ You can run tests locally with the `tmt try` cli or remotely in Testing Farm.
4747
$ TESTING_FARM_API_TOKEN=<your_api_token> \
4848
testing-farm request --pipeline-type="tmt-multihost" \
4949
--plan-filter="tag:playbooks_parallel" \
50-
--git-url "https://github.com/<my_user>/cvm_deploy" \
50+
--git-url "https://github.com/<my_user>/trustee_attestation_client" \
5151
--git-ref "<my_branch>" \
5252
--compose CentOS-Stream-9 \
5353
-e "SYSTEM_ROLES_ONLY_TESTS=tests_default.yml" \

plans/test_playbooks_parallel.fmf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ provision:
1212
environment:
1313
# ensure versions are strings!
1414
SR_ANSIBLE_VER: "2.17"
15-
SR_REPO_NAME: cvm_deploy
15+
SR_REPO_NAME: trustee_attestation_client
1616
SR_PYTHON_VERSION: "3.12"
1717
SR_ONLY_TESTS: "" # tests_default.yml
1818
SR_TEST_LOCAL_CHANGES: true

tasks/encrypt_disk.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
block:
2525
- name: Ensure packages for disk encryption are installed
2626
ansible.builtin.package:
27-
name: "{{ __cvm_deploy_encrypt_disk_packages }}"
27+
name: "{{ __trustee_attestation_client_encrypt_disk_packages }}"
2828
state: present
29-
use: "{{ (__cvm_deploy_is_ostree | d(false)) |
29+
use: "{{ (__trustee_attestation_client_is_ostree | d(false)) |
3030
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
3131

3232
- name: Set fact with disk device path and partition path
@@ -44,23 +44,23 @@
4444
- name: Generate a temp file for the key
4545
ansible.builtin.tempfile:
4646
state: file
47-
register: __cvm_deploy_tmp_key
47+
register: __trustee_attestation_client_tmp_key
4848

4949
- name: Generate a key and encrypt the partition
5050
ansible.builtin.shell: |
5151
set -o pipefail
52-
head -c 32 /dev/urandom | base64 > {{ __cvm_deploy_tmp_key.path }}
53-
cryptsetup luksFormat --key-file {{ __cvm_deploy_tmp_key.path }} --batch-mode {{ disk_partition }}
54-
cryptsetup open --key-file {{ __cvm_deploy_tmp_key.path }} {{ disk_partition }} encrypted-disk
52+
head -c 32 /dev/urandom | base64 > {{ __trustee_attestation_client_tmp_key.path }}
53+
cryptsetup luksFormat --key-file {{ __trustee_attestation_client_tmp_key.path }} --batch-mode {{ disk_partition }}
54+
cryptsetup open --key-file {{ __trustee_attestation_client_tmp_key.path }} {{ disk_partition }} encrypted-disk
5555
mkfs.ext4 /dev/mapper/encrypted-disk
56-
[ -d {{ cvm_deploy_encrypt_disk_mount_point }} ] || mkdir -p {{ cvm_deploy_encrypt_disk_mount_point }}
57-
mount /dev/mapper/encrypted-disk {{ cvm_deploy_encrypt_disk_mount_point }}
56+
[ -d {{ trustee_attestation_client_encrypt_disk_mount_point }} ] || mkdir -p {{ trustee_attestation_client_encrypt_disk_mount_point }}
57+
mount /dev/mapper/encrypted-disk {{ trustee_attestation_client_encrypt_disk_mount_point }}
5858
changed_when: true
5959
no_log: true
6060

6161
- name: Read key from remote host
6262
ansible.builtin.slurp:
63-
src: "{{ __cvm_deploy_tmp_key.path }}"
63+
src: "{{ __trustee_attestation_client_tmp_key.path }}"
6464
register: slurped_key
6565
no_log: true
6666

@@ -71,6 +71,6 @@
7171

7272
- name: Clean up temporary key file
7373
ansible.builtin.file:
74-
path: "{{ __cvm_deploy_tmp_key.path }}"
74+
path: "{{ __trustee_attestation_client_tmp_key.path }}"
7575
state: absent
7676
# TODO: Add a systemd service to mount the encrypted disk at boot

0 commit comments

Comments
 (0)