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

Make the storage backend configurable in the stack #151

Open
tlotze opened this issue Feb 13, 2025 · 7 comments
Open

Make the storage backend configurable in the stack #151

tlotze opened this issue Feb 13, 2025 · 7 comments

Comments

@tlotze
Copy link
Member

tlotze commented Feb 13, 2025

The container stack as defined by docker-compose.yml and the devops swarm configuration uses a RelStorage and a PostgreSQL database without asking. It may be desirable to use ZEO instead, or even just a local FileStorage with a single backend process for small projects. There should be a cookiecutter configuration option for this.

@davisagli
Copy link
Member

Cookieplone's main goal is to provide an easy on-ramp for newcomers to Plone. I'm worried that adding more choices for how to do things works against that goal. If we need to add more options to support "advanced" users, I would really like to make sure they are in a separate set of questions that is only asked if the user indicates they want advanced options. But, I don't think cookiecutter gives us that much flexibility in how the prompts are asked.

@stevepiercy
Copy link
Contributor

But, I don't think cookiecutter gives us that much flexibility in how the prompts are asked.

Not yet. cookiecutter/cookiecutter#1645

It was requested back in 2017. cookiecutter/cookiecutter#1021

@tlotze
Copy link
Member Author

tlotze commented Feb 14, 2025

Cookieplone's main goal is to provide an easy on-ramp for newcomers to Plone. I'm worried that adding more choices for how to do things works against that goal.

In general, I agree with the sentiment. But...

If we need to add more options to support "advanced" users,

to a newcomer, I consider the choice of storage much more easy to expect, understand and answer than, for example, the questions about versions (in particular about pre-release versions), or even the number of different names that are asked (all of the slug and package names).

I would really like to make sure they are in a separate set of questions that is only asked if the user indicates they want advanced options.

It would also help to group all the devops-related questions and ask first whether to create any devops stuff at all.

@yurj
Copy link

yurj commented Feb 14, 2025

We could mark the Relstorage option as "best practice" and have it the default. This is enough for newcomers, and leave the choice open for developers.

@tlotze
Copy link
Member Author

tlotze commented Feb 14, 2025

RelStorage is the default as it is, so the proposed change doesn't alter the default choice of storage.

@davisagli
Copy link
Member

davisagli commented Feb 14, 2025

to a newcomer, I consider the choice of storage much more easy to expect, understand and answer than, for example, the questions about versions (in particular about pre-release versions), or even the number of different names that are asked (all of the slug and package names).

I have colleagues who started with Plone recently and don't even know that these different storage options exist, because they are using the defaults. What I'd like to avoid is forcing them to learn about them (or give them the impression that they need to learn about them) before they need to.

I suggest we do the following:

  1. Finish reviewing Configurable storage #152 and add the option. Make sure the text makes it clear that it's only used for the deployment stack, and label Relstorage as "(recommended)"
  2. Separately, investigate options for organizing the cookiecutter prompts better. Maybe this means adding a way to do grouping and conditional prompts in cookiecutter, maybe it means switching from cookiecutter to custom code for collecting the options, maybe it means creating a separate starter template which uses the same files but asks fewer questions.

@tlotze
Copy link
Member Author

tlotze commented Feb 14, 2025

1. Finish reviewing [Configurable storage #152](https://github.com/plone/cookieplone-templates/pull/152) and add the option. Make sure the text makes it clear that it's only used for the deployment stack, and label Relstorage as "(recommended)"

I added a commit that I hope does both of these.

2. Separately, investigate options for organizing the cookiecutter prompts better. Maybe this means adding a way to do grouping and conditional prompts in cookiecutter, maybe it means switching from cookiecutter to custom code for collecting the options, maybe it means creating a separate starter template which uses the same files but asks fewer questions.

I'll look into the cookiecutter issues and PR referenced by @stevepiercy in #151 (comment) .

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

No branches or pull requests

4 participants