{"id":27972736,"url":"https://github.com/datosh/intro-to-cc","last_synced_at":"2025-05-07T23:19:33.025Z","repository":{"id":257246503,"uuid":"850084069","full_name":"datosh/intro-to-cc","owner":"datosh","description":"Demo for my Introduction to Confidential Computing (CC) talk","archived":false,"fork":false,"pushed_at":"2024-09-05T19:08:32.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-15T14:15:35.288Z","etag":null,"topics":["amd-sev-snp","confidential-computing","confidential-vm"],"latest_commit_sha":null,"homepage":"https://datosh.github.io/portfolio/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T21:04:25.000Z","updated_at":"2024-09-15T11:42:41.000Z","dependencies_parsed_at":"2024-09-15T14:25:53.008Z","dependency_job_id":null,"html_url":"https://github.com/datosh/intro-to-cc","commit_stats":null,"previous_names":["datosh/intro-to-cc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datosh%2Fintro-to-cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datosh%2Fintro-to-cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datosh%2Fintro-to-cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datosh%2Fintro-to-cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datosh","download_url":"https://codeload.github.com/datosh/intro-to-cc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968499,"owners_count":21833308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amd-sev-snp","confidential-computing","confidential-vm"],"created_at":"2025-05-07T23:19:32.552Z","updated_at":"2025-05-07T23:19:33.011Z","avatar_url":"https://github.com/datosh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demystifying Confidential Computing\n\n## A Practical Introduction for Cloud Native Engineers\n\nThis is the accompanying repository for the talk and contains all the code\nand resources used in the presentation.\n\n## Configuration\n\nCreate a file called `.env` in the root of the repository and add the following\nvariables:\n\n```bash\nPROJECT_ID=\u003cyour-project-id\u003e\nREGION=\u003cyour-region\u003e\nZONE=\u003cyour-zone\u003e\n```\n\n### Login to GCP\n\nLogin to GCP so we can explore the resources and allow Terraform to run.\n\n```bash\n./configure.sh\n```\n\n### Find a suitable image\n\nhttps://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#supported-os\n\n```sh\ngcloud compute images list \\\n        --filter=\"guestOsFeatures[].type:(SEV_SNP_CAPABLE)\"\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003eExample Output\u003c/i\u003e\u003c/summary\u003e\n    \u003cpre\u003e\nNAME                                       PROJECT              FAMILY                         DEPRECATED  STATUS\ncentos-stream-9-v20240815                  centos-cloud         centos-stream-9                            READY\ncos-101-17162-528-16                       cos-cloud            cos-101-lts                                READY\ncos-105-17412-448-16                       cos-cloud            cos-105-lts                                READY\ncos-109-17800-309-24                       cos-cloud            cos-109-lts                                READY\ncos-113-18244-151-27                       cos-cloud            cos-113-lts                                READY\nrhel-8-v20240815                           rhel-cloud           rhel-8                                     READY\nrhel-9-v20240815                           rhel-cloud           rhel-9                                     READY\nrhel-9-2-sap-v20240815                     rhel-sap-cloud       rhel-9-2-sap-ha                            READY\nrhel-9-4-sap-v20240815                     rhel-sap-cloud       rhel-9-4-sap-ha                            READY\nrocky-linux-8-optimized-gcp-v20240815      rocky-linux-cloud    rocky-linux-8-optimized-gcp                READY\nrocky-linux-8-v20240815                    rocky-linux-cloud    rocky-linux-8                              READY\nrocky-linux-9-optimized-gcp-v20240815      rocky-linux-cloud    rocky-linux-9-optimized-gcp                READY\nrocky-linux-9-v20240815                    rocky-linux-cloud    rocky-linux-9                              READY\nsles-15-sp5-v20240821-x86-64               suse-cloud           sles-15-sp5                                READY\nsles-15-sp6-v20240807-x86-64               suse-cloud           sles-15                                    READY\nsles-15-sp4-sap-v20240808-x86-64           suse-sap-cloud       sles-15-sp4-sap                            READY\nsles-15-sp5-sap-v20240821-x86-64           suse-sap-cloud       sles-15-sp5-sap                            READY\nsles-15-sp6-sap-v20240807-x86-64           suse-sap-cloud       sles-15-sp6-sap                            READY\nsles-sap-15-sp4-hardened-v20240808-x86-64  suse-sap-cloud       sles-sap-15-sp4-hardened                   READY\nsles-sap-15-sp5-hardened-v20240821-x86-64  suse-sap-cloud       sles-sap-15-sp5-hardened                   READY\nsles-sap-15-sp6-hardened-v20240807-x86-64  suse-sap-cloud       sles-sap-15-sp6-hardened                   READY\nubuntu-pro-2004-focal-v20240829            ubuntu-os-pro-cloud  ubuntu-pro-2004-lts                        READY\nubuntu-pro-2204-jammy-v20240829            ubuntu-os-pro-cloud  ubuntu-pro-2204-lts                        READY\nubuntu-pro-2404-noble-amd64-v20240830      ubuntu-os-pro-cloud  ubuntu-pro-2404-lts-amd64                  READY\nubuntu-2004-focal-v20240829                ubuntu-os-cloud      ubuntu-2004-lts                            READY\nubuntu-2204-jammy-v20240829                ubuntu-os-cloud      ubuntu-2204-lts                            READY\ncos-beta-117-18613-0-10                    cos-cloud            cos-beta                                   READY\ncos-dev-121-18632-0-0                      cos-cloud            cos-dev                                    READY\nubuntu-2404-noble-amd64-v20240830          ubuntu-os-cloud      ubuntu-2404-lts-amd64                      READY\ncos-stable-113-18244-151-27                cos-cloud            cos-stable                                 READY\nubuntu-minimal-2004-focal-v20240829        ubuntu-os-cloud      ubuntu-minimal-2004-lts                    READY\nubuntu-minimal-2204-jammy-v20240829        ubuntu-os-cloud      ubuntu-minimal-2204-lts                    READY\nubuntu-minimal-2404-noble-amd64-v20240829  ubuntu-os-cloud      ubuntu-minimal-2404-lts-amd64              READY\nfedora-coreos-40-20240808-3-0-gcp-aarch64  fedora-coreos-cloud  fedora-coreos-stable-arm64                 READY\nfedora-coreos-40-20240808-3-0-gcp-x86-64   fedora-coreos-cloud  fedora-coreos-stable                       READY\nfedora-coreos-40-20240825-1-0-gcp-aarch64  fedora-coreos-cloud  fedora-coreos-next-arm64                   READY\nfedora-coreos-40-20240825-1-0-gcp-x86-64   fedora-coreos-cloud  fedora-coreos-next                         READY\nfedora-coreos-40-20240825-2-0-gcp-aarch64  fedora-coreos-cloud  fedora-coreos-testing-arm64                READY\nfedora-coreos-40-20240825-2-0-gcp-x86-64   fedora-coreos-cloud  fedora-coreos-testing                      READY\n    \u003c/pre\u003e\n\u003c/details\u003e\n\n## Create a Confidential VM\n\n```bash\nterraform init\nterraform apply\necho \"http://$(terraform output -raw public_ip)\"\nssh datosh@$(terraform output -raw public_ip)\n```\n\n### Verify Google used SEV SNP machine\n\n```bash\ngcloud compute instances describe cvm --zone=europe-west4-a --format=\"yaml(confidentialInstanceConfig)\"\n```\n\n## Troubleshooting\n\n### No resources available\n\nSNP enabled machines are not available in all zones, in addition a few zones only have a limited number of machines available. This is an example where a region (europe-west3) does not have enough resources available to create a CVM.\n\n```bash\ngoogle_compute_instance.default: Still creating... [10s elapsed]\n╷\n│ Error: Error waiting for instance to create: The zone 'projects/kammel-dev/zones/europe-west3-c' does not have enough resources available to fulfill the request.  '(resource type:compute)'.\n│\n│\n│ A n2d-standard-2 VM instance with 1 local SSD(s) is not supported in the europe-west3-c zone with your configuration.  Retry your request in a zone that supports the machine type and configuration you require. For more information, view the troubleshooting documentation.\n│\n│\n│ Troubleshooting documentation\n│ https://cloud.google.com/compute/docs/resource-error\n│\n│\n│   with google_compute_instance.default,\n│   on vm.tf line 6, in resource \"google_compute_instance\" \"default\":\n│    6: resource \"google_compute_instance\" \"default\" {\n│\n╵\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatosh%2Fintro-to-cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatosh%2Fintro-to-cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatosh%2Fintro-to-cc/lists"}