-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added section on creating from templates #314
Conversation
|
||
You can create a project from a template that has been uploaded to your OpenShift instance. After a template has been uploaded, you can create a new project from either the Management Console or the CLI. | ||
|
||
On the Management Console, click on the Create button on the project page. It will then ask you to choose the template to create from, or upload a new template. |
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 don't think we offer to upload a template today, do we?
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.
@bparees we do not offer an 'upload' function unless this refers to a 'osc create -f '. I have considered adding some functionality to eclipse which would allow you to 'create app' from a template that you select from disk
@jcantrill Agreed, that section currently exists here: http://docs.openshift.org/latest/dev_guide/console.html#creating-from-template. Bilhar has suggested that that @bfallonf Item 1 in @bparees' list above would be a new section, like "Loading Templates to a Library" or something. E.g., when you try to browse the template library in the Mgmt Console before loading any, it says: "There are no templates to select from. To add a template to your project run osc create -f <template_file> -n testproject" ("testproject" is the name of the project I was viewing). This is related to your https://trello.com/c/yws1qwmQ that we talked about last night. The Mgmt Console part of item 2 in the list is what you were describing with your WIP content. That flow assumes a template has already been loaded. This is what you could probably just pull/move Cesar's content mentioned above for. The CLI part of item 2 and all of 3 in the list is what is currently in the "Generating a Configuration" section in this topic, though it needs to get updated (it still talks about |
@bparees Ok. I think it looks a lot better now. I've done as @jcantrill and @adellape suggested and moved across the console stuff (cos yes, I remember Bilhar talking about that too), and moved the Generating a Configuration stuff to the relevant part of the doc. I've also added in a small section about uploading the template to the library and reworded a few of the sentences. I have a few more questions though:
and
Guys, thanks for your help on this! |
@bfallonf In response to your questions:
In regards to the eclipse work, there are several cards listed here: https://trello.com/b/wqe9UaaZ/openshift-origin-developer-experience. Specifically, the ones either completed or in play are: https://trello.com/c/vv8XBZky and https://trello.com/c/f2fMXYjc |
@@ -10,7 +10,7 @@ | |||
toc::[] | |||
|
|||
== Overview | |||
A template describes a set of resources intended to be used together that can be customized and processed to produce a configuration. Each template defines a list of parameters that can be modified for consumption by containers. It also defines a set of labels to apply to every resource created by the template. | |||
A template describes a set of resources intended to be used together that can be customized and processed to produce a configuration. Each template defines a set of parameters that can be modified for consumption by containers, and defines a set of labels to apply to every resource created by the template. |
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.
It would be nice to be linked here (probably on the word "resources" in the first sentence) to something that helps inform or remind what those resources could be. Maybe the best target right now would be http://docs.openshift.org/latest/architecture/core_objects/overview.html. It's a stub at the moment, but it would at least get them in the right subdir (to then check out kubernetes_model.adoc
and openshift_model.adoc
), and we can add some info there to give context.
Also a reminder to try and hard-wrap this line at 80 while you're in the file.
section outlines how the Kubernetes infrastructure is used in your OpenShift | ||
instance. The link:../architecture/core_objects/openshift-model.html[OpenShift | ||
Model] section outlines any OpenShift-specific information about your | ||
infrastructure. |
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.
Thanks for filling this stub out. It's a bit of a misnomer to say the kubernetes_model
topic outlines the "Kubernetes infrastructure", when in a neighboring directory we have infrastructure_components/kubernetes_infrastructure
. Maybe something like:
"The following topics provide information on important resources in the link:kubernetes_model.html[Kubernetes model], which is extended by the link:openshift_model[OpenShift model]."
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.
Changed to "The Kubernetes model topic provides information about important resources of your OpenShift instance, which is extended by the OpenShift model topic."
I think putting in "the following" might be specific to books or sections of the same topic.
@bparees @adellape @bfallonf The Dev Guide will be task based, with those tasks categorized. If any task can be accomplished with the CLI and the console, then we will document those there. The only way I see a separate console dir/topic is if customers can accomplish every CLI task in the console as well. Otherwise, we're going to keep our docs task focused, and that will result in this topic being broken up into those relevant tasks. Hope that makes sense. |
@CowboysFan yeah i think so. |
MYSQL_ROOT_PASSWORD database password expression [a-zA-Z0-9]{8} | ||
MYSQL_DATABASE database name root | ||
---- | ||
Alternatively, you can upload a template then create from the same template by |
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.
that command isn't uploading the template, it's just processing it from the filesystem, so the template doesn't end up in the template library.
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.
Oh, now I get you. I've changed this to:
"Alternatively, you can create from a template without uploading it to the
template library by processing the template and creating from the same template
by piping both commands:"
You can override any link:../dev_guide/templates.html#parameters[parameters] | ||
defined in the JSON configuration file by adding the `-v` option and any desired | ||
parameters. For example, you can override the *`ADMIN_USERNAME`* and | ||
*`MYSQL_DATABASE`* parameters to create a JSON string with customized |
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 still don't like that we're calling this a "JSON string" everywhere. the user isn't trying to create a "JSON string", they're trying to create a definition of the objects they ultimately want to create in openshift.
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.
Ok. I think I know what you mean. I've taken out the few references where it says JSON string, and worded around it so it sounds ok.
Made a few more changes after @bparees 's suggestions. |
routing process. | ||
|
||
You can create many of these resources by utilizing | ||
link:../dev_guide/templates.html[Templates]. |
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.
Most of the links in this topic are bad.
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.
This took me a while, but fixed.
…erview info to core_objects page
@adellape You're right, your other comment disappeared. I placed the "Alternatively..." section to your suggested place. I believe my reasoning was mistakenly about it serving both purposes; uploading and creating. But it isn't about uploading. Let me know if there's anything for this PR. |
Thanks for the updates. Merging. |
Added section on creating from templates
Fix procedure structure
Very much a WIP. Not sure if all the correct information is here.
@bparees @smarterclayton I asked @adellape a few questions about this today and he gave me a little more context. I'm not sure if "Project" is the thing that's actually being created from templates here. I can't find anything particularly indicative in my notes.
I'm particularly interested why this is explaining the same process as outlined later in the same file under the "Generating a Configuration" section... At least, the process Ben explained to me via email is essentially the same here.