Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
refactor: skip sgx driver installation if already exists in OS
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Liu <Francis.Liu2012@gmail.com>
  • Loading branch information
Francis-Liu committed Apr 15, 2020
1 parent 8fb97a2 commit dfa00d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/topics/sgx.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Refer to the [Quickstart Guide](../tutorials/quickstart.md) for details on how t

| OS | distro | Notes |
| ------------ | ----------- |-------|
| Ubuntu 16.04 | `acc-16.04` | specially built image with UEFI BIOS support
| Ubuntu 16.04 | `aks-ubuntu-16.04` | AKS-maintained Ubuntu 16.04 image with preinstalled components
| Ubuntu 18.04 | `aks-ubuntu-18.04` | AKS-maintained Ubuntu 18.04 image with preinstalled components

The following example is a fragment of a cluster definition (apimodel) file declaring two ACC agent pools, one running `Ubuntu 16.04` image on `2 vCPU` nodes, and another running `Ubuntu 18.04` image on `4 vCPU` nodes:
Expand All @@ -29,7 +29,7 @@ The following example is a fragment of a cluster definition (apimodel) file decl
{
"name": "agentpool1",
"count": 3,
"distro": "acc-16.04",
"distro": "aks-ubuntu-16.04",
"vmSize": "Standard_DC2s"
},
{
Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/cloud-init/artifacts/cse_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ time_metric "EnsureRPC" ensureRPC
time_metric "CreateKubeManifestDir" createKubeManifestDir

{{- if HasDCSeriesSKU}}
if [[ ${SGX_NODE} == true ]]; then
if [[ ${SGX_NODE} == true && ! -e "/dev/sgx" ]]; then
time_metric "InstallSGXDrivers" installSGXDrivers
fi
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion test/e2e/kubernetes/workloads/sgx-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ spec:
- name: dev-sgx
hostPath:
path: /dev/sgx
type: CharDevice
restartPolicy: Never
backoffLimit: 0

0 comments on commit dfa00d1

Please sign in to comment.