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

WIP - Service plugins #369

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Dec 9, 2023

Just a quick experiment with plug-and-play microservices. Other instances of SkyPortal (such as Icare, used by GRANDMA) have some custom microservices. It's a little awkward that they have to maintain their special architecture to get just one microservice running.

This is just an idea of how we could allow one to add as many custom microservices as needed with just a few lines added to baselayer.

And, here's the demo repo that shows what a git repo for a custom microservice needs to look like:
https://github.com/Theodlz/skyportal-demo-plugin

Essentially, one can just add to the config's plugin section:

plugins:
  demo:
    url: https://github.com/Theodlz/skyportal-demo-plugin.git
    branch: main
    params:
      demo_param: "Demo microservice plugin"

which will automatically download and update the plugin when calling make run to start the app.

Definitely a WIP, but it works perfectly as is.

@stefanv
Copy link
Contributor

stefanv commented Dec 9, 2023

What does a plugin do vs a microservice?

@Theodlz
Copy link
Collaborator Author

Theodlz commented Dec 9, 2023

Hi @stefanv,

It's the same thing! The idea here is just to allow folks to add custom micro services to their app without having to actually merge the service to the app's repo.

A good example is using Fink broker in SkyPortal to get new. Doesn't make sense to add it to SkyPortal but one might one to add it to its own instance.

This would allow that. Happy to change the name/terminology used to call this new feature.

The reason why I called it plug-ins is that this could be extended to not just micro services but maybe front end and API one day in the future.

@stefanv
Copy link
Contributor

stefanv commented Dec 9, 2023

Ah, in that case I wonder if we shouldn't just add the submodule functionality to the services?

I'd also like to move port definitions and other configuration so that each service definition happens in one place.

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