Skip to content

Commit 50d783b

Browse files
msanftmalt3
authored andcommitted
image: update upload docs
1 parent cc2945d commit 50d783b

File tree

1 file changed

+9
-94
lines changed

1 file changed

+9
-94
lines changed

image/README.md

+9-94
Original file line numberDiff line numberDiff line change
@@ -16,113 +16,28 @@ bazel query //image/system/...
1616
You can either build a group of images (all images for a cloud provider, a stream, ...) or a single image by selecting a target.
1717

1818
```sh
19-
bazel build //image/system:openstack_qemu-vtpm_debug
19+
bazel build //image/system:azure_azure-sev-snp_stable
2020
```
2121

2222
The location of the destination folder can be queried like this:
2323

2424
```sh
25-
bazel cquery --output=files //image/system:openstack_qemu-vtpm_debug
25+
bazel cquery --output=files //image/system:azure_azure-sev-snp_stable
2626
```
2727

28-
## Upload to CSP
28+
## Build and Upload
2929

30-
Warning! Never set `--version` to a value that is already used for a release image.
31-
32-
<details>
33-
<summary>AWS</summary>
34-
35-
- Install `aws` cli (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html))
36-
- Login to AWS (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html))
37-
- Choose secure boot PKI public keys (one of `pki_dev`, `pki_test`, `pki_prod`)
38-
- `pki_dev` can be used for local image builds
39-
- `pki_test` is used by the CI for non-release images
40-
- `pki_prod` is used for release images
41-
42-
```sh
43-
# Warning! Never set `--version` to a value that is already used for a release image.
44-
# Instead, use a `ref` that corresponds to your branch name.
45-
bazel run //image/upload -- image aws --verbose --raw-image path/to/constellation.raw --attestation-variant "" --version ref/foo/stream/nightly/v2.7.0-pre-asdf
46-
```
47-
48-
</details>
49-
50-
<details>
51-
<summary>GCP</summary>
52-
53-
- Install `gcloud` and `gsutil` (see [here](https://cloud.google.com/sdk/docs/install))
54-
- Login to GCP (see [here](https://cloud.google.com/sdk/docs/authorizing))
55-
- Choose secure boot PKI public keys (one of `pki_dev`, `pki_test`, `pki_prod`)
56-
- `pki_dev` can be used for local image builds
57-
- `pki_test` is used by the CI for non-release images
58-
- `pki_prod` is used for release images
30+
Similarly, you can also build and upload images to the respective CSP within a single step with the `upload_*` targets.
5931

6032
```sh
61-
export GCP_RAW_IMAGE_PATH=$(realpath path/to/constellation.raw)
62-
export GCP_IMAGE_PATH=path/to/image.tar.gz
63-
upload/pack.sh gcp ${GCP_RAW_IMAGE_PATH} ${GCP_IMAGE_PATH}
64-
# Warning! Never set `--version` to a value that is already used for a release image.
65-
# Instead, use a `ref` that corresponds to your branch name.
66-
bazel run //image/upload -- image gcp --verbose --raw-image "${GCP_IMAGE_PATH}" --attestation-variant "sev-es" --version ref/foo/stream/nightly/v2.7.0-pre-asdf
33+
bazel run //image/system:upload_aws_aws-sev-snp_console -- --ref deps-image-fedora-40 --upload-measurements
6734
```
6835

69-
</details>
70-
71-
<details>
72-
<summary>Azure</summary>
73-
74-
Note:
75-
76-
> For testing purposes, it is a lot simpler to disable Secure Boot for the uploaded image!
77-
> Disabling Secure Boot allows you to skip the VMGS creation steps above.
78-
79-
- Install `az` and `azcopy` (see [here](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli))
80-
- Login to Azure (see [here](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli))
81-
- Optional (if Secure Boot should be enabled) [Prepare virtual machine guest state (VMGS) with customized NVRAM or use existing VMGS blob](#azure-secure-boot)
82-
83-
```sh
84-
export AZURE_RAW_IMAGE_PATH=path/to/constellation.raw
85-
export AZURE_IMAGE_PATH=path/to/image.vhd
86-
upload/pack.sh azure "${AZURE_RAW_IMAGE_PATH}" "${AZURE_IMAGE_PATH}"
87-
# Warning! Never set `--version` to a value that is already used for a release image.
88-
# Instead, use a `ref` that corresponds to your branch name.
89-
bazel run //image/upload -- image azure --verbose --raw-image "${AZURE_IMAGE_PATH}" --attestation-variant "cvm" --version ref/foo/stream/nightly/v2.7.0-pre-asdf
90-
```
91-
92-
</details>
93-
94-
<details>
95-
<summary>OpenStack</summary>
96-
97-
Note:
98-
99-
> OpenStack is not one a global cloud provider, but rather a software that can be installed on-premises.
100-
> This means we do not upload the image to a cloud provider, but to our CDN.
101-
102-
- Install `aws` cli (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html))
103-
- Login to AWS (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html))
104-
105-
```sh
106-
# Warning! Never set `--version` to a value that is already used for a release image.
107-
# Instead, use a `ref` that corresponds to your branch name.
108-
bazel run //image/upload -- image openstack --verbose --raw-image path/to/constellation.raw --attestation-variant "sev" --version ref/foo/stream/nightly/v2.7.0-pre-asdf
109-
```
110-
111-
</details>
112-
113-
<details>
114-
<summary>QEMU</summary>
115-
116-
- Install `aws` cli (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html))
117-
- Login to AWS (see [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html))
118-
119-
```sh
120-
# Warning! Never set `--version` to a value that is already used for a release image.
121-
# Instead, use a `ref` that corresponds to your branch name.
122-
bazel run //image/upload -- image qemu --verbose --raw-image path/to/constellation.raw --attestation-variant "default" --version ref/foo/stream/nightly/v2.7.0-pre-asdf
123-
```
36+
The `--ref` should be the branch you're building images on. It should **not contain slashes**. Slashes should be replaced with dashes to
37+
not break the filesystem structure of the image storages.
12438

125-
</details>
39+
Optionally, the `--upload-measurements` option can be used to specify that measurements for the image should be uploaded, and `--fake-sign` specifies
40+
that a debugging signing key should be used to sign the measurements, which is done for debug images.
12641

12742
## Kernel
12843

0 commit comments

Comments
 (0)