Skip to content

Commit

Permalink
integrate changes into CI
Browse files Browse the repository at this point in the history
  • Loading branch information
msanft committed Jul 14, 2023
1 parent f0a7468 commit 7a9dc8b
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/actions/constellation_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
existingConfig:
default: "false"
description: "Use existing config file."
test:
description: "The e2e test payload."
required: true
#
# GCP specific inputs
#
Expand Down Expand Up @@ -226,13 +229,16 @@ runs:
--bootstrapper "${{ github.workspace }}/build/bootstrapper" \
--upgrade-agent "${{ github.workspace }}/build/upgrade-agent" \
--info logcollect=true \
--info logcollect.is-debug-cluster=false \
--info logcollect.github.actor="${{ github.triggering_actor }}" \
--info logcollect.github.workflow="${{ github.workflow }}" \
--info logcollect.github.run-id="${{ github.run_id }}" \
--info logcollect.github.run-attempt="${{ github.run_attempt }}" \
--info logcollect.github.ref-name="${{ github.ref_name }}" \
--info logcollect.github.sha="${{ github.sha }}" \
--info logcollect.github.runner-os="${{ runner.os }}" \
--info logcollect.e2e-test-payload="${{ inputs.test }}" \
--info logcollect.deployment-type="debugd" } \
--verbosity=-1 \
--force
echo "::endgroup::"
Expand Down
66 changes: 66 additions & 0 deletions .github/actions/deploy_logcollection/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Log Collection Deployment
description: Deploy log collection functionality to the cluster.

inputs:
logstash-port:
description: "The port of the logstash service."
default: "5045"
kubeconfig:
description: "The kubeconfig of the cluster to deploy to."
required: true
opensearch-user:
description: "The username of the opensearch cluster."
required: true
opensearch-pwd:
description: "The password of the opensearch cluster."
required: true
test:
description: "The e2e test payload."
required: true
provider:
description: "The CSP of the cluster."
required: true

runs:
using: "composite"
steps:
- name: Template Logcollection Helm Values
id: template
shell: bash
run: |
bazel run //hack/logcollector template -- \
--dir $(realpath .) \
--username ${{ inputs.opensearch-user }} \
--password ${{ inputs.opensearch-pwd }} \
--port ${{ inputs.logstash-port }} \
--info is-debug-cluster=false \
--info github.actor="${{ github.triggering_actor }}" \
--info github.workflow="${{ github.workflow }}" \
--info github.run-id="${{ github.run_id }}" \
--info github.run-attempt="${{ github.run_attempt }}" \
--info github.ref-name="${{ github.ref_name }}" \
--info github.sha="${{ github.sha }}" \
--info github.runner-os="${{ runner.os }}" \
--info github.e2e-test-payload="${{ inputs.test }}" \
--info provider="${{ inputs.provider }}" \
--info deployment-type="k8s"
- name: Deploy Logstash
id: deploy-logstash
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: |
cd logstash
make add
make install
- name: Deploy Filebeat
id: deploy-filebeat
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: |
cd filebeat
make add
make install
12 changes: 12 additions & 0 deletions .github/actions/e2e_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,18 @@ runs:
existingConfig: ${{ steps.constellation-iam-create.outputs.existingConfig }}
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}

- name: Deploy logcollection
id: deploy-logcollection
# TODO(msanft):temporarily deploy in debug clusters too to resolve "missing logs"-bug
# see https://dev.azure.com/Edgeless/Edgeless/_workitems/edit/3227
# if: inputs.isDebugImage == 'false'
uses: ./.github/actions/deploy_logcollection
with:
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
opensearch-user: ${{ inputs.awsOpenSearchUsers }}
opensearch-pwd: ${{ inputs.awsOpenSearchPwd }}
test: ${{ inputs.test }}
provider: ${{ inputs.cloudProvider }}
#
# Test payloads
#
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:
azureIAMCreateCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
registry: ghcr.io
githubToken: ${{ secrets.GITHUB_TOKEN }}
awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }}
awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }}
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}

- name: Always terminate cluster
if: always()
Expand Down
4 changes: 2 additions & 2 deletions internal/versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ const (
// NodeMaintenanceOperatorImage is the image for the node maintenance operator.
NodeMaintenanceOperatorImage = "quay.io/medik8s/node-maintenance-operator:v0.14.0@sha256:2dffb6ffdbbe997d317799fc709baf030d678bde0be0264931ff6b3e94fd89ab" // renovate:container
// LogstashImage is the container image of logstash, used for log collection by debugd.
LogstashImage = "ghcr.io/edgelesssys/constellation/logstash-debugd:v2.7.0-pre.0.20230405123345-6bf3c63115a5@sha256:1e2c396538be7571138272f8a54e3412d4ff91ee370880f89894501a2555706a" // renovate:container
LogstashImage = "ghcr.io/edgelesssys/constellation/logstash-debugd:v2.9.0-pre.0.20230710124918-df09e04e0b4c@sha256:f3bad95b8f85801d61c7791a46488d75d942ef610f289d3362cfe09505cef6c8" // renovate:container
// FilebeatImage is the container image of filebeat, used for log collection by debugd.
FilebeatImage = "ghcr.io/edgelesssys/constellation/filebeat-debugd:v2.7.0-pre.0.20230405123345-6bf3c63115a5@sha256:abd739853af4981c3a4b338bb3a27433284525d7ebdb84adfc77f1873c41de93" // renovate:container
FilebeatImage = "ghcr.io/edgelesssys/constellation/filebeat-debugd:v2.9.0-pre.0.20230710124918-df09e04e0b4c@sha256:438be5705d1886a5d85724cf55f5d7f05c240b4bd4680eff5f532fc346ad02ae" // renovate:container

// currently supported versions.
//nolint:revive
Expand Down

0 comments on commit 7a9dc8b

Please sign in to comment.