Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e - DigitalOcean (install) #196

Merged
merged 3 commits into from
Nov 22, 2021
Merged

e2e - DigitalOcean (install) #196

merged 3 commits into from
Nov 22, 2021

Conversation

guidoiaquinti
Copy link
Contributor

@guidoiaquinti guidoiaquinti commented Nov 18, 2021

Description

  1. This PR brings an e2e test to deploy PostHog via Helm on DigitalOcean (as requested in e2e chart testing #183).

    It includes certificate signing using Let's Encrypt (see here the certificate transparency log entries). The run times are not great as it takes between 10 and 30 min only between DNS record creation and TLS record deployment but once I understand why DNS propagation is so slow we might be able to speed up the process (e.g. by using a different validation method).

  2. As part of this PR I'm enhancing but also disabling the e2e - DigitalOcean 1-click install as it's currently flaky due to some issues (most probably) related to the DO marketplace. I'm actively investigating the issue but I would appreciate if we can merge this so I can move with e2e tests for other platforms.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How has this been tested?

CI should be passing.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

on: push
name: e2e - DigitalOcean (1-click)
#
# Unfortunately we can test this scenario only after merging to 'main' as we don't have
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've realised about this limitation while working on the non 1-click install. I'll try to come up with a workaround as this situation is not ideal.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

briefly discussed in our 1:1 that we could use an env variable that's read in deploy.sh & define it after we create the DO cluster, then run the deployment script

# TODO
# - setup ingestion test
# - run ingestion test
# - run k8s spec test

- name: Emit k8s namespace report
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find this reporting useful. I think it can be superseded by k8s spec test

@@ -1,83 +0,0 @@
name: e2e - DigitalOcean 1-click (install)
Copy link
Contributor Author

@guidoiaquinti guidoiaquinti Nov 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File has been renamed. The new file (now fully commented) also include the k6 ingestion test

@guidoiaquinti guidoiaquinti marked this pull request as ready for review November 18, 2021 15:46
on:
push:
# branches:
# - main
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left this commented to test this action in this PR. I'm going to uncomment it once I have your ✅ and I see the test passing.

- name: Setup PostHog for the ingestion test
run: ./ci/setup_ingestion_test.sh

- name: Set PostHog endpoints to use for the ingestion test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the ingestion test to this scenario

Guido Iaquinti added 2 commits November 19, 2021 11:48
Copy link
Contributor

@tiina303 tiina303 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

- name: Wait for the Let's Encrypt certificate to be issued and deployed
run: |
echo "Wait for the Let's Encrypt certificate to be issued and deployed..."
while ! kubectl wait --for=condition=Ready --timeout=60s certificaterequest --all -n posthog > /dev/null 2>&1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should likely add a timeout here too (similar to above)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, my take is that we could leave this to fail via the overall action timeout

@guidoiaquinti guidoiaquinti merged commit c172e3b into main Nov 22, 2021
@guidoiaquinti guidoiaquinti deleted the do_non_1_click branch November 22, 2021 16:35
@posthog-bot
Copy link

We probably forgot to bump the chart with this merge. No worries head over to https://github.com/PostHog/charts-clickhouse/actions/workflows/bump-version-workflow-dispatch.yaml to trigger the chart update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants