opendevstack / ods-pipeline

Alternative ODS CI/CD pipeline based on Tekton / OpenShift Pipelines
Apache License 2.0
13 stars 5 forks source link

Terraform task #375

Open kuebler opened 2 years ago

kuebler commented 2 years ago

I was wondering recently if we need a Tekton task to support provisioning e.g. AWS services via IaC based on terraform, similar to https://github.com/opendevstack/ods-quickstarters/blob/master/common/jenkins-agents/terraform/docker/Dockerfile.ubi8? IMO, automated e2e testing might be an interesting challenge, probably https://localstack.cloud/ could help? Would be really grateful for any feedback on this idea!

michaelsauter commented 2 years ago
gerardcl commented 2 years ago

hi! yes, agree, we should also get a task from ods-pipeline for this. Since I also was thinking on this I offer myself to play with it or together or whatever you prefer :) Currently there is an activity ongoing on ods-jenkins-shared-library to make the AWS quickstarter more lean from a quickstarter point of view and that gave us a good understanding also on moving to ods-pipeline I believe :)
Great!

tbugfinder commented 2 years ago

IMHO, localstack community edition doesn't offer too many options (AWS services) to work with. Are you talking about PRO/Enterprise version?

gerardcl commented 2 years ago

IMHO we could just follow current approach in ods-quickstarters, what do you think @tbugfinder @kuebler ?

nichtraunzer commented 2 years ago

e2e tests for AWS are quite a while on our whish list already and I like the idea a lot

gerardcl commented 2 years ago

ok, I thought they were already in with current quickstarter smoke/deployment tests, sorry

nichtraunzer commented 2 years ago

ok ... after a quick discussion with mr. @tbugfinder I am little bit confused now:

michaelsauter commented 2 years ago

OK, then I would suggest to implement a test that doesn't run with the default test suite. Have a look at https://github.com/opendevstack/ods-pipeline/blob/master/test/tasks/ods-deploy-helm_external_test.go. This implements a test that you can run locally against a cluster of your choice. You could mirror this by having a test that you can execute on demand that runs against an AWS account of your choice.

gerardcl commented 2 years ago

Great! Then we would have both E2E use cases covered (ods developer E2E to be done, and app developer tests plus smoke tests in place). What needs to be tested in the ods dev E2E tests? I guess we would need to test with a mock IaaS?

gerardcl commented 2 years ago

Based on the description made by @kuebler in the github issue, here an agreed TODOs after meeting (@tbugfinder @nichtraunzer @michaelsauter @kuebler me):

tbugfinder commented 2 years ago

As localstack was mentioned - there's also python based moto https://github.com/spulec/moto .

kuebler commented 2 years ago

@tbugfinder looks fantastic and seems to support way more AWS services OOTB than the localstack OSS variant!