feat: abra app clone <srcdomain> --domain <newtargetdomain>
#730
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Possible proposal for a new abra command that creates a new app with the same config (other than domain) and optionally same secrets as the source of the clone. I imagine this clone command not necessarily trying to copy all the data over like move (although that could also be an optional argument).
abra app clone <srcdomain> --domain <newtargetdomain> [options]Optional Arguments
I found myself wanting such an abra command. If there was interest in adding such a command, I could also imagine working on it as a way to get to know abra better. I imagine it would be somewhat similar to the recently added
movecommand.`abra app clone <appname> --domain <newdomain>`to `abra app clone <olddomain> --domain <newdomain>``abra app clone <olddomain> --domain <newdomain>`to `abra app clone <srcdomain> --domain <newdomain>``abra app clone <srcdomain> --domain <newdomain>`to feat: `abra app clone <srcdomain> --domain <newdomain>`feat: `abra app clone <srcdomain> --domain <newdomain>`to feat: `abra app clone <srcdomain> --domain <newtargetdomain>`Also sharing a specific usecase here where I wanted this command:
while working on https://docs.coop , it seems like probably we will have multiple docs instances that all share one separate keycloak instance.
I could make a mini bash script to make a new "cloned" instance with the same configs other than domain, but I wondered if this type of small automation was general enough to be in abra itself
@notplants I think I may not be getting this one fully, apologies in advance.
There seems to be some overlap with
movein this proposal. If it does indeed move the data then i think it's doing nearly exactly the same thing exact the "new server" is the same as the "old server"?I am not sure why you'd want to clone the secrets, wouldn't that mean you'd have to regenerate them as you'd have 2 apps with the same secrets? Do you mean, you want to generate new secrets for the cloned app?
Any further info / "explain it like im 5" is much appreciated 🙏
@decentral1se I'm not totally sure if I'm not being clear, or also possibly its just not a very common thing to want to do other than the specific deployment I'm talking to. will try to explain the docs.coop case more:
so in this particular autonomic deployment, each of the lasuite-docs instances will share the same keycloak and email provider, even though they are separate apps of lasuite-docs (e.g. three lasuite-docs instances: org1.docs.coop, org2.docs.coop, somethingelse.net).
so each of these apps will have the same configuration other than domain, and they will each share the same secrets relating to communication with the e-mail provider.
so when a new client wants docs instance, I want to simply run one command that creates a new app and deployment for them that is ready to go (e.g. org3.docs.coop). this new app and deployment could be on the same server, or on a different server -- the key thing is just that its exactly the same as the previous deployment, except with a new domain. in this case, we don't actually need it to copy data over (it should be a fresh slate of data, like a new app).
like I said before, I could also make a pretty simple bash script that does this... something like:
abra app secret insert email_pass(with the correct e-mail password)Unlike
move, this set of command should not remove the previous app or deployment.Something like this clone command could also potentially be used for the purpose of testing, if you want to clone an app to a testing environment, and make changes and see what happens -- although side rabbit hole: with the case of copying data AND changing the domain, many apps probably would additionally require an app-specific
change_urlhook (like yunohost has) which makes any necessary data changes based on the new url, in addition to config changes.Or in the most minimal metaphor explanation, like unix commands, this would be "cp" instead of "mv" but also calling "change_url" after "cp".
Let me know if that clarifies, or also if it clarifies and its just something that doesn't come up often :)