Open jorgemoralespou opened 7 years ago
Still relevant. I can help with design, not with code, since now in Ruby :-P
To enable this feature variable DYNAMIC_USER_NAME
has to be defined.
User name will be USER_NAME
variable suffixed with an auto-incrementing number.
If NUM_USERS
variable is provided, the system will throw error when the generated number reaches the limit.
Password is static defined through the USER_PASSWORD
variable.
I would rather get these values in new variables, and make it possible to reassign to the existing ones.
Something like: DYNAMIC_USER_NAME=user%02d (format for the number)
The previous format would allow to have the number formatted to 2 digits, 3 digits, ... depending on the size of the workshop.
And then, in the regular vars for the workshop, we could use, re-assignment: USER_NAME={{DYNAMIC_USER_NAME}}
PASSWORD for the time being, as it's being static, would be possible kept as it is.
These would prevent breaking changes when the option is activated.
I like the idea with formatting, and IMHO OK to enforce it, so that
if DYNAMIC_USER_NAME
is defined then USER_NAME
is going to behave as a template as per
https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-sprintf
with one argument being passed in.
DYNAMIC_USER_NAME
var would be both the format for generating usernames and also the generated username?
Why do we need to cap the number of usernames generated?
DYNAMIC_USER_NAME
is just a marker to enable the behaviour
USER_NAME
has the format
You do not have to, if NUM_USERS
is not provided or is 0
then it will go till it OOMs.
I don't think NUM_USERS
is needed to be implemented. It should just act as a counter. How many users are available is not really relevant to workshopper.
Would that be implemented using an embedded db?
@siamaksade we already have it, have just reused it.
https://github.com/openshift-labs/starter-guides/blob/master/_modules.yml#L27
what's the state on this @siamaksade @jorgemoralespou ?
@marekjelen, what do you mean? If this is still relevant? Yes. If there's been test? No, but if it's testable I'll go ahead and give feedback
As many of the workshops provide information with user credentials which can not be repeated per attendee, I think it would be nice to have the following feature:
When you click in an event/workshop, if it's configured to provide credentials you would have an intermediate page that would provide those to you (Or maybe just display the credentials on the top banner and modify instructions accordingly to the credentials of the user). A cookie should be set so that the user will always get the same credentials.
Credentials could come from: