Skip to content

Commit 9b4bd72

Browse files
committed
Allow creating VMs with emulated TPM device
1 parent 2a89226 commit 9b4bd72

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

01_install_requirements.sh

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ ANSIBLE_FORCE_COLOR=true ansible-playbook \
6161
-e "working_dir=$WORKING_DIR" \
6262
-e "virthost=$HOSTNAME" \
6363
-e "go_version=1.17.1" \
64+
-e "tpm_emulator=$VM_TPM_EMULATOR" \
6465
-i vm-setup/inventory.ini \
6566
-b -vvv vm-setup/install-package-playbook.yml
6667
popd

common.sh

+1
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ export EXTRA_WORKERS_ONLINE_STATUS=${EXTRA_WORKERS_ONLINE_STATUS:-"true"}
244244
export VM_EXTRADISKS=${VM_EXTRADISKS:-"false"}
245245
export VM_EXTRADISKS_LIST=${VM_EXTRADISKS_LIST:-"vdb"}
246246
export VM_EXTRADISKS_SIZE=${VM_EXTRADISKS_SIZE:-"8G"}
247+
export VM_TPM_EMULATOR=${VM_TPM_EMULATOR:-"false"}
247248
export MASTER_HOSTNAME_FORMAT=${MASTER_HOSTNAME_FORMAT:-"master-%d"}
248249
export WORKER_HOSTNAME_FORMAT=${WORKER_HOSTNAME_FORMAT:-"worker-%d"}
249250

config_example.sh

+3
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ set -x
227227
# Configure size of extra disks added to VMs
228228
# export VM_EXTRADISKS_SIZE="10G"
229229

230+
# Add TPM2.0 emulator to VMs
231+
# export VM_TPM_EMULATOR=true
232+
230233
# Provide additional master/worker ignition configuration, will be
231234
# merged with the installer provided config, can be used to modify
232235
# the default nic configuration etc

vm_setup_vars.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ num_workers: 1
1212
num_extraworkers: 0
1313
extradisks_list: "{{ lookup('env', 'VM_EXTRADISKS_LIST').split(' ') | default(['vdb']) }}"
1414
extradisks_size: "{{ lookup('env', 'VM_EXTRADISKS_SIZE') | default(['8G']) }}"
15+
tpm_emulator: "{{ lookup('env', 'VM_TPM_EMULATOR') | default(false) }}"
1516
flavors:
1617
master:
1718
memory: "{{ lookup('env', 'MASTER_MEMORY') }}"

0 commit comments

Comments
 (0)