-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
# We will also figure out a way to interpolate with manual and automatic generation. For ex. params such as ports can be converted to default answers.conf params when built. This will be the hard part. | ||
|
||
# Redis EXAMPLE | ||
redis: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't invent a new API syntax here for Kube objects - that's not a nulecule only direction and needs to be done in concert with APIs in OpenShift and Kubernetes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of either going the pure 100% kubernetes/openshift API route (since most people would be using Nulecule/Atomic App with those providers).
Or a universal standard route but interpreted for Kubernetes (for ex. https://github.com/skippbox/kompose).
I went with the later as the problem is solving the high-learning curve of creating kubernetes rc, svc, pods, etc, so using a simpler syntax may be more ideal where the syntax is converted to their respective kubernetes/openshift/marathon/possibly nomad/etc. files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another reason being is that ideally, if the user already knows what goes on in the kubernetes/openshift artifact files, they'd be choosing the manual
route. Using the automatic
generation would create standard containers (for example, a redis master/slave) using a much simpler context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've discussed this pretty frequently in other contexts but we are not going to create a simpler syntax for Kube resources without creating a new Kube or OpenShift API object - all transformation introduces gaps in abstraction, and if it's an important abstraction it would be a product abstraction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conversion from compose -> Kube or OpenShift is valuable and important, but shouldn't be done by nulecule without explicit support from those projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smarterclayton do you suggest creating a converter like compose -> Kube rather than changing the Nulecule spec itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @smarterclayton is absolutely right - we do need to investigate simpler formats for kube, but we need to do that in the kubernetes ecosystem (i.e. in kubernetes) not in a third party tool.
We also need X -> kuber converters, but I'm not sure they would/should involve nulecule at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've discussed this pretty frequently in other contexts but we are not going to create a simpler syntax for Kube resources without creating a new Kube or OpenShift API object - all transformation introduces gaps in abstraction, and if it's an important abstraction it would be a product abstraction.
@smarterclayton is there a tracker for this? This might be something we can help design and/or help build when the time comes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced that Nulecule is the right place to specify this, as it's primary focus is on allowing different container orchestration systems to work together, which I think is a different focus that allowing a developer to simply specify how their service should work on their local development machine. I do think a better approach here is to work with the OpenShift team and the Kubernetes team to help improve Kubernetes for this use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to note that this was just an experiment / suggestion and there's no promises that it'll be in Nulecule. I just found the idea of auto-generating artifacts for each perspective provider a good way to ease a user into further deploying their containers on an orchestrator.
One suggestion to @smarterclayton 's comments is using the kubernetes api syntax as he said, directly in Nulecule and convert it for any future providers that we want to implement. For example, we would add a k8s syntax -> Marathon converter, k8s syntax -> Nomad, etc. Makes it so that the user only has to learn one api (in this case k8s).
Nulecule will extract the appropriate information in the syntax (for ex. nodeport: 80, labe: foo) and convert it to a param as per the Nulecule spec for usage in portable containers.
@cdrage 👍 for kicking off the discussions. |
@cdrage if I write a single |
@surajssd Bit confused what you mean, sorry 😛 This is a spec re-write, just ignore the |
@cdrage with this new spec I only have to write a single |
name: Hello World | ||
id: helloworld | ||
appversion: 0.0.1 | ||
spec: 1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cdrage, does the user need to write the spec version in each Nulecule file? In fact, most of the things in metadata.
Can it be something like, we set all the sensible default values for each field, such that if the user specifies the fields in his/her Nulecule, those will be overridden, but even if he does not, it's fine, the defaults are already set!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, you're right, spec is still needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdrage and by defaults I mean that if my Nulecule is as minimal as the following, that should be fine. We can have defaults for everything set and just deploy it, if the user is not specifying anything.
<wordpress>
provider = kubernetes
name = mariadb-centos7-atomicapp
source = projectatomic/mariadb-centos7-atomicapp
name = wordpress
image = wordpress
</wordpress>
Ah yes. With this new spec (if people like the auto build idea) you would |
@cdrage nice job! I like the auto-building idea. |
openshift: | ||
- file://artifacts/openshift/etherpad-rc.yaml | ||
- file://artifacts/openshift/etherpad-svc.yaml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If auto-generating is gonna be a real thing then I think this is not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments above, you specify build: manual
or build: auto
. Like mentioned in the comments, manual is ideal for people who want to do it manually and not have atomic app interpret it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay so we give choice to user as to what they want, people will surely choose auto for everything, at-least for starters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdrage IMO auto example should be here. We are to see how easy Nulecule can become
@cdrage, also, if my Nulecule file looks something like this, then as a user I do not have to worry about missed whitespaces or unclosed brackets in yaml/json.
Maybe we can accept multiple formats as input, so besides yaml/json, how about .ini and others with which a user is much more familiar with? |
@containscafeine answers.conf is in |
@cdrage cool stuff, feels like someone picked up the 'auto generate idea' again, even though it is not part of the spec itself but a feature of Atomic App. Restructuring the Spec is a good idea, I always emphasized that the spec is super open and we can put in anything we want as an experiment and use Atomic App to implement that experimental extensions to the spec. As a first shot I would see the provider section you have proposed, should we extract that out into a sep change and get that in fast? |
@goern the provider section does sound good and would be a good place to start in order to emphasize the portability of nulecule. esp. since it's a new section and won't break anything previously. Although unfortunately my experience with encrpytion isn't that good so we would need someone who knows they're stuff on how to encrypt the secrets on build so none of that information is leaked when the portable container is passed around. in regards to the other sections removing "graph" and adding the whole app-name-as-an-object idea (see the example) we can further discuss that and add it too. |
# Other possible providers: | ||
# source: rkt://projectatomic/mariadb:latest | ||
# source: file://foo/bar/container | ||
# source: https://localhost/container.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Could someone respond to how this might relate to helm/deployment manager? How is the kubernetes community developing around that initiative? What is the overlap? Is there opportunity here? |
params: | ||
image: | ||
description: Container image | ||
default: centos/etherpad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shooting in the dark but, instead of
params:
image:
description: Container image
default: centos/etherpad
is it possible to have something simple like
image: centos/etherpad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only problem is if we require to ask the user for a value :( for ex. if image is blank.
image: centos/etherpad
- default: test
Which I don't think is valid ^^
vs
image:
description: foobar
default: test
value: test
Revision two!I've made a revision two of the proposed changes adapted from the comments of this PR as well as another suggestion I've put in. At the moment, a Nuleculized container contains: I've proposed including the artifact files within the Nulecule itself. This make clarity a lot easier for the user, as well as simplifies portability. This means that the only thing that a developer needs is the They can pick whatever implmentation tool they wish, whether it be atomicapp in Python or atomicapp-go in Go, use the I've converted two examples:
P.S. I've left out the 'automated' idea for now.. I'm going to think this over and re-visit this later after further discussion with contributors. |
spec: 1.0.0 | ||
description: Hello world! | ||
|
||
provider: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the use of the key provider
multiple times quite unfortunate. Wouldn't it make sense to rename this to something like provider_config
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do provider-config
we could eliminate having to have provider-token
to token
, etc.
Single file with all the artifacts will be easier to write only if its minimal, with all the bells and whistles its becoming more complicated than it is! |
- name: DB_PORT | ||
value: '3306' | ||
- name: DB_USER | ||
value: $db_user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdrage this is reaching 4-5 levels of indentation deep after including other providers' artifacts in the same file, will it not be a bit difficult to write? I liked the previous idea of having a single definition at one place and parsing it and deploying everywhere. Are we not doing that anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! It's just piping in the file. The example I used had the artifacts as .yaml so that's why it looks messy. Have a look at the helloapache example below :)
e238d4c
to
4a4669e
Compare
It'd be great to get a minimal example that stripped out everything that was optional. This could also show what auto-generation might look like from a config perspective. |
@bexelbie i did this with the helloapache example on this PR |
@cdrage that example still felt heavier than I expected. I was thinking provider would be completely absent ... |
@bexelbie The artifacts of the: provider:
default: kubernetes ? |
|
@bexelbie We will still be keeping that, no auto-generation with Nulecule. That'll be something separate. Focusing on packaging + deployment. From what I've been told / gathered from all the meetings, we're going to still keep the artifact inclusion / using file://, etc. |
I'm going to close this and re-open this in submitted segments. I've already tried with the inclusion of using an app-name instead of graph and that PR was closed / linked to the previous issue as to why it did not work. I'll create a new PR to possibly integrate the |
So.. There's been quite a discussion on how we can improve the spec of Nulecule.
Not only removing the problems with the high learning-curve of Nulecule but also to make it a lot easier to use and understand intuitively without having to consult the documentation every second line.
We are ideally looking at universal format for Atomic App where not only is it simple to use but also simple to understand right-off-the-bat.
Personally, I learn by example, and here, I've created an example file for what a new Nulecule may look like with all the bells-and-whistles of a new spec.
There are some MAJOR changes which would majorly change the landscape of Nulecule, but these changes I believe will make Nulecule what we envisioned it to be.
I've made this as a pull-request for discussion so we can easily comment line-by-line on each part of the "example" and cultivate a new spec (and look!) for Nulecule.
P.S. Please be kind as I may have not encompassed / implemented everything that's suppose to be in it yet.