Containerize TPM Initialization tool
[aaf/sshsm.git] / bin / abrmdcontainer / README.md
1 ### OOM - Onap Operations Manager will deploy this as part of CA service
2 ### two stages
3 ### Stage 1 - Initialize TPM and exit (init.sh script is used for this case)
4 ### Stage 2 - Starts the abrmd process and keeps it running to provide the
5 ### means for application to interact wit TPM (run_abrmd.sh is used)
6
7 ### Make  a directory /tmp/volume (mkdir -p /tmp/volume) on the Host
8 ### This directory (Sample Shared volume ABRMD_DATA) is mounted to abrmd
9 ### container and is mounted as /tmp/files/ inside container
10 ### the host's name "TPM_NODE_NAME" environmental variable
11
12 ### The input to this container is srkhandle(a file/environmental vatiable)
13 ### tpm_status.yaml (TPM State) password (for TPM Primary key,
14 ### password is encrypted using pgp and is extracted using the passphrase
15 ### (provided in shared volume))
16 ### Output of this container is the public
17 ### portion of the TPM's Primary key (out_parent_public) and the staus will
18 ### be updated in the tpm_status.yaml file
19
20
21 ### Input
22 ### 1.srkhandle 2.password 3.passphrase 4.tpm_status.yaml
23
24 ### Output
25 ### 1. out_parent_public
26
27 ### Building Docker Images
28
29 ```
30 $ docker build -t <image name> -f dockerfile .
31 ```
32
33 ### Running ABRMD Container with Simulator
34
35 ```
36 $ docker run -d --privileged -v /tmp/run/dbus:/var/run/dbus -v /tmp/volume:/tmp/files --name <container name> <image name>
37 ```
38
39 ### Running ABRMD Container with TPM Hardware
40
41 ```
42 $ docker run -d --privileged -device=/dev/tpm0 -v /tmp/run/dbus:/var/run/dbus -v /tmp/volume:/tmp/files --name <container name> <image name>
43 ```
44
45 ##### Sanity Check
46 Run the following command in the tools container to see if everything is setup correctly:
47
48 ```
49 tpm2_listpcrs
50 ```