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

Allow creating new projects without setting up Kubernetes #23

Open
vkorenev opened this issue Apr 22, 2020 · 3 comments
Open

Allow creating new projects without setting up Kubernetes #23

vkorenev opened this issue Apr 22, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@vkorenev
Copy link

Is your feature request related to a problem? Please describe.
I want to create a new Cloudstate service. However, the following command fails because there are no templates in ~/.cloudstate:

$ cloudstate create --name=inventory --profile=kotlin --registry=docker.io --tag=0.1
Creating user function project: "inventory"
Using profile: "kotlin"
You must first boot CloudState with cloudstate --init. See cloudstate --help for help
Ok(())

However, cloudstate init tries to perform some initialization on Kubernetes cluster and then fails:

$ cloudstate init
😉 Creating CloudState namespace...
Error from server (Forbidden): namespaces is forbidden: User "[email protected]" cannot create resource "namespaces" in API group "" at the cluster scope
😻 Success on create CloudState namespace
🚀 Initializing CloudState operator...
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apiextensions.k8s.io/v1beta1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1beta1, Kind=CustomResourceDefinition"
Name: "statefulstores.cloudstate.io", Namespace: ""

Describe the solution you'd like
I think that the cloudstate-cli tool should allow creating a new project even if I have not set up Kubernetes cluster for deploying Cloudstate service yet. Probably, cloudstate create should fetch templates if that has not been done yet.

@sleipnir sleipnir added the enhancement New feature or request label Apr 22, 2020
@sleipnir
Copy link
Collaborator

I believe that this workflow can really be improved. As many later commands depend on an active cluster (which is a Minikube) then the init command already performs all the necessary setup so that everything works later. But this is good in the happy path and terrible way when not. I will treat this as a feature request and prioritize it to enter a new version in the next few days.

@vkorenev
Copy link
Author

Actually, I'm using Lightbend Cloudstate cluster, so I have everything set up for deployment of Cloudstate services. But I don't need (and I don't even have permissions) to create namespaces, set up the Cloudstate operator, etc.

@sleipnir
Copy link
Collaborator

Yes, in fact this Cloudstate Community CLI is to be used for other use cases. So it makes sense, in this case, to separate the creation of templates from the deployment lifecycle and make them independent. The Lightbend cluster already provides all the necessary kubernetes abstractions in a self-managed manner. This CLI was created before the Lightbend Cluster project was released for testing and there has not been much synergy between the two projects so far. But I believe that both are complementary and after correcting some of the problems, perhaps they can be used together in a complementary way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants