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

Dev environments #1415

Merged
merged 6 commits into from
Oct 31, 2023
Merged

Dev environments #1415

merged 6 commits into from
Oct 31, 2023

Conversation

eguzki
Copy link
Member

@eguzki eguzki commented Oct 23, 2023

What

Docker compose based development environment. Looking for easy testing setups for different use cases.

Environments:

  • Gateway listening on TLS: path dev-environments/listen-tls
  • PROXY with upstream using TLSv1.3: path dev-environments/https-proxy-upstream-tlsv1.3
  • PROXY with upstream using plain HTTP 1.1: path dev-environments/http-proxy-plain-http-upstream
  • Gateway instrumented with opentelemetry: path dev-environments/opentelemetry-instrumented-gateway
  • Plain HTTP 1.1 upstream: path dev-environments/plain-http-upstream
  • [Upstream using TLSv1.3: path dev-environments/upstream-tlsv1.3

Usually dev environment can run bycd-ing to the path and running make gateway. For example:

cd dev-environments/listen-tls
# generate certs
make certs
make gateway IMAGE_NAME=quay.io/3scale/apicast:latest

If the environment requires TLS certificates, there is an extra step (Makefile target) to generate on the fly the (self signed) certificates. I have tried to avoid committing certs to github, even if they are fake for example.com.

@eguzki eguzki requested a review from tkan145 October 23, 2023 08:13
@eguzki eguzki requested a review from a team as a code owner October 23, 2023 08:13
Copy link
Contributor

@tkan145 tkan145 left a comment

Choose a reason for hiding this comment

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

The rest look good to me

I also want to ask what will be added to this folder? I can imagine that this directory would grow very quickly if we added a new folder for each use case.

@eguzki
Copy link
Member Author

eguzki commented Oct 23, 2023

The rest look good to me

I also want to ask what will be added to this folder? I can imagine that this directory would grow very quickly if we added a new folder for each use case.

Any ideas to manage that?

This structure allows having multiple level hierarchy, because each directory is independent with its own Makefile, docker-compose.yaml, etc...

It could grow into something like:

> dev-environments/
   > mtls
        > mtls-with-plain-upstream
        > mtls-with-tls-upstream
   > proxies
        > http-proxy-policy-plain-http-upstream
        > http-proxy-policy-TLS-upstream
        > http-proxy-env-plain-http-upstream
        > http-proxy-env-TLS-upstream
        > http-proxy-policy-camel-plain-http-upstream
        > http-proxy-policy-camel-TLS-upstream

@tkan145
Copy link
Contributor

tkan145 commented Oct 24, 2023

Initially, I thought we could share common files, but having independent files also has its own advantages. I think it's good as is and if it grows we can always change or move somewhere else later

@eguzki
Copy link
Member Author

eguzki commented Oct 25, 2023

yeah, there is some breaking on the DRY patterns. But small makefiles and docker files, not that important IMO. I also wanted to avoid "pollution" in the main Makefile, so I removed some existing dev environments from the main Makefile. Mainly because this can grow.

I was thinking on adding to the main Makefile an include directive so the dev envs can be started from the main Makefile without needing to cd to the dev environment folders. I will give it a try.

@tkan145
Copy link
Contributor

tkan145 commented Oct 31, 2023

Look good to me as is, I think we can merge this and improve later if we need to

@eguzki eguzki merged commit 8227112 into master Oct 31, 2023
12 checks passed
@eguzki eguzki deleted the dev-environments branch October 31, 2023 13:42
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.

None yet

2 participants