fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

Archetypes for fabric8 kubernetes projects #4017

Open rawlingsj opened 9 years ago

rawlingsj commented 9 years ago

I wonder if we should create archetypes for typical fabric8 projects? Guessing what a typical project might be, maybe one or more of the below?

Examples..

fabric8 fabric8-archetype-app

kubernetes fabric8-archetype-pod fabric8-archetype-replication-controller fabric8-archetype-service

openshift fabric8-archetype-deployment-config fabric8-archetype-build-config fabric8-archetype-node fabric8-archetype-user fabric8-archetype-project fabric8-archetype-persistent-volume-claim

In fact, not sure where the line draws between development and operational but I'd expect all to be kept under source control? I can't see our Ops colleagues using Java so maybe

We should be able create an archetype from one of our existing projects that use the builder like gogs, also add required properties such as docker.image etc.

Might be overkill, we could just use one archetype but I thought it might help people / teams starting out.

jimmidyson commented 9 years ago

I think this sounds like a good idea to me.

Persistent volumes are part of Kubernetes now btw, not just OpenShift.

rawlingsj commented 9 years ago

Cool!

If someone wants to have a crack at it that would be great, might be a nice introduction to fabric8 v2 if anyones looking for a place to start? If not then I'll have time in a couple of weeks if nobody fancies it.

davsclaus commented 9 years ago

Yeah I am likely in need of a database app such as a postgress that I can just install easily form the app library.

Now I can see in the apps there is likely two ways to setup the kubernetes.json

Though if there is some maven archetype then that is a great step for tooling and also something we can leverage from the forge commands to potentially create a wizard or some kind of tooling that can assist to setup details for the kubernetes json - eg ask for port numbers, env variables and so on.

davsclaus commented 9 years ago

btw the forge commands has a fabric:setup command that adds fabric to any existing maven project. - eg it add the needed dependencies, maven plugins, and some of the basic properties needed. And it can do this for docker or jube projects.

jstrachan commented 9 years ago

If someone doesn't want to use the Java builder stuff then I think a little nodejs tool might be handy; maybe using coffeescript which is kinda like YAML with variables & functions.

Then folks mostly hack higher level, more DRY YAML - like the CSS equivalent of things like LESS / SASS with smarter defaults and less for developers to have to type

On Friday, May 29, 2015, Claus Ibsen notifications@github.com wrote:

btw the forge commands has a fabric:setup command that adds fabric to any existing maven project. - eg it add the needed dependencies, maven plugins, and some of the basic properties needed. And it can do this for docker or jube projects.

— Reply to this email directly or view it on GitHub https://github.com/fabric8io/fabric8/issues/4017#issuecomment-106724070.

James

Red Hat

Twitter: @jstrachan Email: jstracha@redhat.com Blog: http://macstrac.blogspot.com/

hawtio: http:/ http://fusesource.com//hawt.io/ fabric8: http:/ http://fusesource.com//fabric8.io/

Open Source Integration

jstrachan commented 9 years ago

I wonder if fabric8:setup should add a builder using the new annotation / APT stuff so folks can customize the RC / Deployment Config etc via Typesafe Java code. This seems the best way for Java folks to hack metadata

On Friday, May 29, 2015, Claus Ibsen notifications@github.com wrote:

btw the forge commands has a fabric:setup command that adds fabric to any existing maven project. - eg it add the needed dependencies, maven plugins, and some of the basic properties needed. And it can do this for docker or jube projects.

— Reply to this email directly or view it on GitHub https://github.com/fabric8io/fabric8/issues/4017#issuecomment-106724070.

James

Red Hat

Twitter: @jstrachan Email: jstracha@redhat.com Blog: http://macstrac.blogspot.com/

hawtio: http:/ http://fusesource.com//hawt.io/ fabric8: http:/ http://fusesource.com//fabric8.io/

Open Source Integration

rawlingsj commented 9 years ago

Yeah that sounds like a really good idea.

We can then tie this into the existing forge / gogs integration. So using Forge CLI / IDE / fabric8 console a project can be created, customized, committed to gogs, JSON generated and then applied. Nice.