2022-09-13 10:01:47 -04:00
|
|
|
name: Generate measurements
|
|
|
|
description: "Generates measurements for a specific image"
|
|
|
|
inputs:
|
|
|
|
cloudProvider:
|
|
|
|
description: "Which cloud provider to use."
|
|
|
|
required: true
|
2022-10-21 04:16:44 -04:00
|
|
|
osImage:
|
|
|
|
description: "OS image to run. The default value 'debug-latest' will select the latest available debug image."
|
2022-09-13 10:01:47 -04:00
|
|
|
required: true
|
|
|
|
isDebugImage:
|
2022-10-21 04:16:44 -04:00
|
|
|
description: "Is OS img a debug img?"
|
2022-09-13 10:01:47 -04:00
|
|
|
required: true
|
|
|
|
workerNodesCount:
|
|
|
|
description: "Number of worker nodes to spawn."
|
|
|
|
required: false
|
|
|
|
default: "1"
|
|
|
|
controlNodesCount:
|
|
|
|
description: "Number of control-plane nodes to spawn."
|
|
|
|
required: false
|
|
|
|
default: "1"
|
|
|
|
machineType:
|
|
|
|
description: "VM machine type. Make sure it matches selected cloud provider!"
|
|
|
|
required: false
|
|
|
|
kubernetesVersion:
|
|
|
|
description: "Kubernetes version to create the cluster from."
|
|
|
|
required: false
|
|
|
|
default: "1.23"
|
2022-11-02 10:16:47 -04:00
|
|
|
gcpProject:
|
|
|
|
description: "The GCP project to deploy Constellation in."
|
|
|
|
required: false
|
2022-09-13 10:01:47 -04:00
|
|
|
gcp_service_account_json:
|
|
|
|
description: "Service account with permissions to create Constellation on GCP."
|
|
|
|
required: false
|
|
|
|
gcpClusterServiceAccountKey:
|
|
|
|
description: "Service account to use inside the created Constellation cluster on GCP."
|
|
|
|
required: false
|
2022-11-02 10:16:47 -04:00
|
|
|
azureSubscription:
|
|
|
|
description: "The Azure subscription ID to deploy Constellation in."
|
|
|
|
required: false
|
|
|
|
azureTenant:
|
|
|
|
description: "The Azure tenant ID to deploy Constellation in."
|
|
|
|
required: false
|
|
|
|
azureClientID:
|
|
|
|
description: "The client ID of the application registration created for Constellation in Azure."
|
|
|
|
required: false
|
2022-09-13 10:01:47 -04:00
|
|
|
azureClientSecret:
|
|
|
|
description: "The client secret value of the used secret"
|
|
|
|
required: false
|
|
|
|
azureResourceGroup:
|
|
|
|
description: "The resource group to use"
|
|
|
|
required: false
|
2022-11-08 12:32:59 -05:00
|
|
|
azureUserAssignedIdentity:
|
|
|
|
description: "The Azure user assigned identity to use for Constellation."
|
|
|
|
required: false
|
2022-09-13 10:01:47 -04:00
|
|
|
cosignPublicKey:
|
|
|
|
description: "Cosign public key to sign measurements."
|
|
|
|
required: true
|
|
|
|
cosignPrivateKey:
|
|
|
|
description: "Cosign private key to sign measurements."
|
|
|
|
required: true
|
|
|
|
cosignPassword:
|
|
|
|
description: "Cosign password for private key."
|
|
|
|
required: true
|
|
|
|
awsAccessKeyID:
|
|
|
|
description: "AWS access key ID to upload measurements."
|
|
|
|
required: true
|
|
|
|
awsSecretAccessKey:
|
|
|
|
description: "AWS secrets access key to upload measurements."
|
|
|
|
required: true
|
|
|
|
awsDefaultRegion:
|
|
|
|
description: "AWS region of S3 bucket. to upload measurements."
|
|
|
|
required: true
|
|
|
|
awsBucketName:
|
|
|
|
description: "AWS S3 bucket name to upload measurements."
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Build CLI
|
|
|
|
uses: ./.github/actions/build_cli
|
|
|
|
- name: Build the bootstrapper
|
|
|
|
id: build-bootstrapper
|
|
|
|
uses: ./.github/actions/build_bootstrapper
|
|
|
|
if: ${{ inputs.isDebugImage == 'true' }}
|
2022-09-14 11:41:47 -04:00
|
|
|
- name: Build cdbg
|
|
|
|
id: build-cdbg
|
|
|
|
uses: ./.github/actions/build_cdbg
|
2022-09-13 10:01:47 -04:00
|
|
|
if: ${{ inputs.isDebugImage == 'true' }}
|
|
|
|
|
|
|
|
- name: Login to GCP
|
2022-11-08 10:13:10 -05:00
|
|
|
uses: ./.github/actions/login_gcp
|
2022-09-13 10:01:47 -04:00
|
|
|
with:
|
|
|
|
gcp_service_account_json: ${{ inputs.gcp_service_account_json }}
|
|
|
|
if: ${{ inputs.cloudProvider == 'gcp' }}
|
|
|
|
|
|
|
|
- name: Create cluster
|
|
|
|
uses: ./.github/actions/constellation_create
|
|
|
|
with:
|
|
|
|
cloudProvider: ${{ inputs.cloudProvider }}
|
2022-11-08 12:32:59 -05:00
|
|
|
gcpProject: ${{ inputs.gcpProject }}
|
2022-09-13 10:01:47 -04:00
|
|
|
gcpClusterServiceAccountKey: ${{ inputs.gcpClusterServiceAccountKey }}
|
|
|
|
workerNodesCount: ${{ inputs.workerNodesCount }}
|
|
|
|
controlNodesCount: ${{ inputs.controlNodesCount }}
|
|
|
|
machineType: ${{ inputs.machineType }}
|
2022-10-21 04:16:44 -04:00
|
|
|
osImage: ${{ inputs.osImage }}
|
2022-09-13 10:01:47 -04:00
|
|
|
isDebugImage: ${{ inputs.isDebugImage }}
|
|
|
|
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
2022-11-08 12:32:59 -05:00
|
|
|
azureSubscription: ${{ inputs.azureSubscription }}
|
|
|
|
azureTenant: ${{ inputs.azureTenant }}
|
|
|
|
azureClientID: ${{ inputs.azureClientID }}
|
2022-09-13 10:01:47 -04:00
|
|
|
azureClientSecret: ${{ inputs.azureClientSecret }}
|
2022-11-08 12:32:59 -05:00
|
|
|
azureUserAssignedIdentity: ${{ inputs.azureUserAssignedIdentity }}
|
2022-09-13 10:01:47 -04:00
|
|
|
azureResourceGroup: ${{ inputs.azureResourceGroup }}
|
|
|
|
|
|
|
|
- name: Measure cluster
|
|
|
|
uses: ./.github/actions/constellation_measure
|
|
|
|
with:
|
|
|
|
cloudProvider: ${{ inputs.cloudProvider }}
|
|
|
|
cosignPublicKey: ${{ inputs.cosignPublicKey }}
|
|
|
|
cosignPrivateKey: ${{ inputs.cosignPrivateKey }}
|
|
|
|
cosignPassword: ${{ inputs.cosignPassword }}
|
|
|
|
awsAccessKeyID: ${{ inputs.awsAccessKeyID }}
|
|
|
|
awsSecretAccessKey: ${{ inputs.awsSecretAccessKey }}
|
|
|
|
awsDefaultRegion: ${{ inputs.awsDefaultRegion }}
|
|
|
|
awsBucketName: ${{ inputs.awsBucketName }}
|