Skip to content

Commit 412a290

Browse files
authored
Merge pull request #169 from gkurz/bump-to-0.16.0
Bump to CoCo v0.16.0
2 parents 24b824e + b5d331e commit 412a290

File tree

183 files changed

+8261
-799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+8261
-799
lines changed

.devcontainer/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Minimal edit container (Alpine)
2+
This container are the bare minimum and can be used if no depedencies are needed, like Go etc.
3+
4+
# General development container
5+
6+
This container has been setup so all tasks can be done on general level and includes:
7+
* Go
8+
* YQ so that mkosi builds can run (building peerpodvm images)
9+
* qemu-utils needed for raw -> qcow2 conversion after mkosi build
10+
* Uplosi so built images can be uploaded to the different cloudproviders
11+
12+
13+
> **Note:** Note: Cloud provider-specific tools (e.g., Azure CLI, AWS CLI, Google Cloud SDK) are not included by default to keep the development environment lightweight. Developers can install these tools as needed based on their specific use cases.
14+
15+
> **Note:** For guidance on using `mkosi` to build and upload images to an Azure Image Gallery, see the [uplosi_azure_notes.md](./development/uplosi_azure_notes.md).

.devcontainer/devcontainer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
3+
{
4+
"name": "Minimal edit container (Alpine)",
5+
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.20"
6+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Create a Pod VM image with mkosi
2+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
3+
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
4+
{
5+
"name": "General development container",
6+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
7+
"postCreateCommand": "bash .devcontainer/development/scripts/postCreateCommand.sh",
8+
"capAdd": [
9+
"CAP_AUDIT_WRITE"
10+
],
11+
"features": {
12+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
13+
"ghcr.io/devcontainers/features/go:1": {}
14+
},
15+
"containerEnv": {
16+
"CONTAINER_WORKSPACE_FOLDER": "${containerWorkspaceFolder}"
17+
}
18+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
logo() {
4+
# ASCII logo w/text box, centered
5+
printf '
6+
+++
7+
+++++++++++
8+
+++++++--.--+++++++
9+
++++++--. .--++++++
10+
++++++-. .-++++++
11+
++++++-. .-++++++
12+
+++++-. .-+++++
13+
+++-. ..---.. .-+++
14+
+++. .-----------. .+++
15+
+++ .-----------------. +++
16+
+++ ----------------------- +++
17+
+++ ------------------++### +++
18+
++- .---------------++######. +++
19+
++- .------------++#########. -++
20+
++- .-----------+###########. -++
21+
++- .-----------+########### +++
22+
+++ .-----------+########### +++
23+
+++ -----------+##########+ +++
24+
+++ ..--------+#######+-. +++
25+
+++. .-----+####-. .+++
26+
+++- ..-++-. -+++
27+
++++--. .--++++
28+
++++++-. .-++++++
29+
++++++-. .-++++++
30+
++++++-. .-++++++
31+
++++++--...--++++++
32+
+++++++++++
33+
+++++
34+
35+
'
36+
}
37+
logo
38+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
DEBIAN_FRONTEND=noninteractive sudo apt-get update -qq && sudo apt-get install -yq qemu-utils
3+
4+
mkdir -p ~/.local/scripts/
5+
cp "${CONTAINER_WORKSPACE_FOLDER}/.devcontainer/development/scripts/general_greeting.sh" ~/.local/scripts/ || exit
6+
echo "source ~/.local/scripts/general_greeting.sh" >> ~/.bashrc
7+
8+
YQ_VERSION=$(awk -F'= *' '/^YQ_VERSION/ {print $2}' ${CONTAINER_WORKSPACE_FOLDER}/src/cloud-api-adaptor/Makefile.defaults)
9+
10+
# Detect raw values
11+
RAW_ARCH=$(uname -m)
12+
RAW_OS=$(uname -s)
13+
14+
# Normalize OS
15+
case "$RAW_OS" in
16+
Linux*) DISTRO_OS="linux" ;;
17+
Darwin*) DISTRO_OS="darwin" ;;
18+
FreeBSD*) DISTRO_OS="freebsd" ;;
19+
CYGWIN*|MINGW*|MSYS*) DISTRO_OS="windows" ;;
20+
*) DISTRO_OS="unknown" ;;
21+
esac
22+
23+
# Normalize architecture
24+
case "$RAW_ARCH" in
25+
x86_64) DISTRO_ARCH="amd64" ;;
26+
aarch64) DISTRO_ARCH="arm64" ;;
27+
armv7l) DISTRO_ARCH="arm/v7" ;;
28+
armv6l) DISTRO_ARCH="arm/v6" ;;
29+
i386|i686) DISTRO_ARCH="386" ;;
30+
s390x) DISTRO_ARCH="s390x" ;;
31+
*) DISTRO_ARCH="$RAW_ARCH" ;; # fallback to raw
32+
esac
33+
34+
# Output results (optional)
35+
echo "DISTRO_OS=$DISTRO_OS"
36+
echo "DISTRO_ARCH=$DISTRO_ARCH"
37+
38+
# Build URL
39+
YQ_DOWNLOAD_URL="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_${DISTRO_OS}_${DISTRO_ARCH}"
40+
41+
echo "Downloading yq version ${YQ_VERSION} for ${DISTRO_OS}/${DISTRO_ARCH} from:"
42+
echo "${YQ_DOWNLOAD_URL}"
43+
44+
sudo wget -qO /usr/bin/yq "${YQ_DOWNLOAD_URL}"
45+
sudo chmod +x /usr/bin/yq
46+
47+
go install github.com/edgelesssys/uplosi@latest
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## Edit
2+
```console
3+
/workspaces/cloud-api-adaptor/src/cloud-api-adaptor/versions.yaml
4+
```
5+
oci.guest-components.reference to desired tag found here (non sha) : [ghcr.io/confidential-containers/guest-components](https://github.com/orgs/confidential-containers/packages?repo_name=guest-components)
6+
7+
## mkosi build debug podvm
8+
9+
```console
10+
cd /workspaces/cloud-api-adaptor/src/cloud-api-adaptor/podvm-mkosi
11+
TEE_PLATFORM=az-cvm-vtpm make debug
12+
```
13+
14+
## Set envs
15+
16+
```console
17+
export AZURE_COMMUNITY_GALLERY_NAME=cocopodvm
18+
export AZURE_PODVM_GALLERY_NAME=gallerycaaimages
19+
20+
export AZURE_PODVM_IMAGE_DEF_NAME= # podvm_image0_debug or podvm_image0
21+
export AZURE_PODVM_IMAGE_VERSION=
22+
23+
export AZURE_SUBSCRIPTION_ID=
24+
export AZURE_RESOURCE_GROUP=
25+
```
26+
27+
## Add azure cli
28+
29+
```console
30+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
31+
az login
32+
```
33+
34+
## Create uplosi config
35+
36+
```console
37+
SHARING_NAME_PREFIX="$(echo $AZURE_COMMUNITY_GALLERY_NAME | cut -d'-' -f1)"
38+
cat <<EOF> uplosi.conf
39+
[base]
40+
imageVersion = "$AZURE_PODVM_IMAGE_VERSION"
41+
name = "$AZURE_PODVM_IMAGE_DEF_NAME"
42+
43+
[variant.default]
44+
provider = "azure"
45+
46+
[base.azure]
47+
subscriptionID = "$AZURE_SUBSCRIPTION_ID"
48+
location = "westeurope"
49+
resourceGroup = "$AZURE_RESOURCE_GROUP"
50+
sharedImageGallery = "$AZURE_PODVM_GALLERY_NAME"
51+
sharingNamePrefix = "$SHARING_NAME_PREFIX"
52+
53+
EOF
54+
```
55+
56+
## Run uplosi
57+
58+
```console
59+
uplosi upload build/system.raw
60+
```

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ updates:
1717
- "src/peerpod-ctrl"
1818
- "src/webhook"
1919
groups:
20+
avast/retry-go:
21+
patterns:
22+
- github.com/avast/retry-go
2023
aws-sdk-go-v2:
2124
patterns:
2225
- "*aws-sdk-go-v2*"

.github/workflows/actionlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-24.04
2525
steps:
2626
- name: Checkout the code
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2828
with:
2929
fetch-depth: 0
3030

.github/workflows/azure-e2e-test.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ jobs:
4646
permissions:
4747
id-token: write
4848
steps:
49-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
49+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5050

51-
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2
51+
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
5252
name: 'Az CLI login'
5353
with:
5454
client-id: ${{ secrets.AZURE_CLIENT_ID }}
5555
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5656
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
5757

5858
- name: Set up Docker Buildx
59-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
59+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
6060

6161
- name: Build container image
6262
id: build-container
@@ -82,22 +82,22 @@ jobs:
8282
strategy:
8383
matrix:
8484
parameters:
85-
- id: "tdx"
86-
machine_type: "Standard_DC2es_v5"
87-
jitter: 0
85+
# - id: "tdx"
86+
# machine_type: "Standard_DC2es_v5"
87+
# jitter: 0
8888
- id: "snp"
8989
machine_type: "Standard_DC2as_v5"
9090
jitter: 10
9191
permissions:
9292
id-token: write
9393
steps:
94-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
94+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
9595

9696
- name: Extract go version number
9797
run: echo "GO_VERSION=$(yq -e '.tools.golang' versions.yaml)" >> "$GITHUB_ENV"
9898

9999
- name: Set up Go environment
100-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
100+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
101101
with:
102102
go-version: "${{ env.GO_VERSION }}"
103103
cache-dependency-path: "**/go.sum"
@@ -144,7 +144,7 @@ jobs:
144144
${{ env.TEST_PROVISION_FILE }}
145145
name: e2e-configuration-${{ matrix.parameters.id }}
146146

147-
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2
147+
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
148148
name: 'Az CLI login'
149149
with:
150150
client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -172,26 +172,26 @@ jobs:
172172
strategy:
173173
matrix:
174174
parameters:
175-
- id: "tdx"
176-
machine_type: "Standard_DC2es_v5"
175+
# - id: "tdx"
176+
# machine_type: "Standard_DC2es_v5"
177177
- id: "snp"
178178
machine_type: "Standard_DC2as_v5"
179179
permissions:
180180
id-token: write
181181
steps:
182-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
182+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
183183

184184
- name: Extract version numbers
185185
run: |
186186
echo "GO_VERSION=$(yq -e '.tools.golang' versions.yaml)" >> "$GITHUB_ENV"
187187
echo "ORAS_VERSION=$(yq -e '.tools.oras' versions.yaml)" >> "$GITHUB_ENV"
188188
189-
- uses: oras-project/setup-oras@8d34698a59f5ffe24821f0b48ab62a3de8b64b20 # v1
189+
- uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1.2.4
190190
with:
191191
version: ${{ env.ORAS_VERSION }}
192192

193193
- name: Set up Go environment
194-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
194+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
195195
with:
196196
go-version: ${{ env.GO_VERSION }}
197197
cache-dependency-path: "**/go.sum"
@@ -213,11 +213,11 @@ jobs:
213213
echo "CLUSTER_NAME=${{ format(env.CLUSTER_NAME_TEMPLATE, matrix.parameters.id) }}" >> "$GITHUB_ENV"
214214
215215
- name: Restore the configuration created before
216-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
216+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
217217
with:
218218
name: e2e-configuration-${{ matrix.parameters.id }}
219219

220-
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2
220+
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
221221
name: 'Az CLI login'
222222
with:
223223
client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -262,16 +262,16 @@ jobs:
262262
strategy:
263263
matrix:
264264
parameters:
265-
- id: "tdx"
266-
machine_type: "Standard_DC2es_v5"
267-
jitter: 0
265+
# - id: "tdx"
266+
# machine_type: "Standard_DC2es_v5"
267+
# jitter: 0
268268
- id: "snp"
269269
machine_type: "Standard_DC2as_v5"
270270
jitter: 10
271271
permissions:
272272
id-token: write
273273
steps:
274-
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2
274+
- uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
275275
name: 'Az CLI login'
276276
with:
277277
client-id: ${{ secrets.AZURE_CLIENT_ID }}

0 commit comments

Comments
 (0)