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

Kubernetes Resource Model - docker-compose extension #131

Closed
micahhausler opened this issue Apr 13, 2022 · 1 comment · Fixed by #154
Closed

Kubernetes Resource Model - docker-compose extension #131

micahhausler opened this issue Apr 13, 2022 · 1 comment · Fixed by #154

Comments

@micahhausler
Copy link
Contributor

I'm looking to add support in the sandbox for running Tinkerbell components using the Kubernetes Resource Model (KRM) as outlined in tinkerbell/proposals#46. I was thinking of adding docker-compose support, but wanted to get some input on approach.

Currently there is a single docker-compose.yml in deploy/compose, however with KRM, there are some services/containers that won't be needed (database, tink-cli, etc). Given the overlap, could we have 3 compose files since compose supports combining multiple files? The result would be something like a docker-compose.base.yml, docker-compose.k8s.yml and docker-compose.db.yaml. In order to run the existing stack, you'd have to run:

docker-compose -f docker-compose.base.yml -f docker-compose.db.yml up -d

and for the KRM stack:

docker-compose -f docker-compose.base.yml -f docker-compose.k8s.yml up -d

This gets away from the simplicity of docker-compose up -d, but enables reuse of services like registry, and common config on services like boots, hegel, tink-server, and nginx.

The only alternative I see is to have a separate, largely duplicated compose file.

Any opinions here?

@jacobweinstock
Copy link
Member

I think the user experience for the docker-compose quickstart would change most with this. I do like the very simple experience of docker-compose up -d.

What about doing something to define either the "existing stack" or the "KRM stack" as the default. So we still get the nice docker-compose up -d for the default and then with an additional -f we could get the non-default version? Would this add too much complexity to the non-default compose file?

@jacobweinstock jacobweinstock mentioned this issue Oct 5, 2022
3 tasks
@jacobweinstock jacobweinstock linked a pull request Oct 5, 2022 that will close this issue
3 tasks
mergify bot added a commit that referenced this issue Oct 25, 2022
## Description


This PR brings up the sandbox via Docker compose using the Kubernetes backend for all service. This does not completely remove the postgres backend setup but moves all the compose with postgres into an isolated directory (deploy/compose/postgres) that can be removed when we're ready. 

> I did not touch the terraform setup. I need some help validating that one. please and thank you. CC @mmlb @displague

## Why is this needed



Fixes: #142 #45 #118 #131 #133 #145 #148 
- This "fixes" a quite a few issues related to TLS cert generation. This is the case because we are not using TLS in this deployment. Also see, tinkerbell/tink#555.
- This also "fixes" any issues related to the internal registry as that is removed as the default.

## How Has This Been Tested?



Manually tested vagrant with virtualbox (on a Mac), vagrant with libvirt (on Ubuntu 22.04), and docker-compose (on on Ubuntu 22.04). 


## How are existing users impacted? What migration steps/scripts do we need?
There is no migration support. Users will need to follow a quick start guide to get started.





## Checklist:

I have:

- [x] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
@mergify mergify bot closed this as completed in #154 Oct 25, 2022
ttwd80 pushed a commit to ttwd80/tinkerbell-playground that referenced this issue Sep 7, 2024
## Description


This PR brings up the sandbox via Docker compose using the Kubernetes backend for all service. This does not completely remove the postgres backend setup but moves all the compose with postgres into an isolated directory (deploy/compose/postgres) that can be removed when we're ready. 

> I did not touch the terraform setup. I need some help validating that one. please and thank you. CC @mmlb @displague

## Why is this needed



Fixes: tinkerbell#142 tinkerbell#45 tinkerbell#118 tinkerbell#131 tinkerbell#133 tinkerbell#145 tinkerbell#148 
- This "fixes" a quite a few issues related to TLS cert generation. This is the case because we are not using TLS in this deployment. Also see, tinkerbell/tink#555.
- This also "fixes" any issues related to the internal registry as that is removed as the default.

## How Has This Been Tested?



Manually tested vagrant with virtualbox (on a Mac), vagrant with libvirt (on Ubuntu 22.04), and docker-compose (on on Ubuntu 22.04). 


## How are existing users impacted? What migration steps/scripts do we need?
There is no migration support. Users will need to follow a quick start guide to get started.





## Checklist:

I have:

- [x] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
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 a pull request may close this issue.

2 participants