-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[DEVEXP-457] Create app from source #1221
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
[DEVEXP-457] Create app from source #1221
Conversation
f9fb187 to
8ba6041
Compare
|
@jwforres This latest commit wires the 'create' action to the back-end. Still need to add some validations around validating labels, validating a user entering appname, warning a user if a generated appname is taken. Also needs some testing to confirm the resources are all wired correctly. |
|
@jwforres Added validations and fixes to post resources to the server that will actually trigger a build. I think its ready to be evaluated by a wider audience. Also, I think we should decide if the way I implemented the routing functionality is what we really desire and if the UI makes sense for routing. The styling could also use another once over. |
|
Can we combine the "create for me" and "specify" cases, and just put a default value in the route text box? Also, instead of a checkbox for secure/insecure, can we put a combo in front of the text field that lets you select "http://" or "https://"? I think that would clarify a few things: 1) what the option does to the route, 2) that you don't need the scheme in the route textbox |
|
Also, should we have the cert/key/ca be selected as a file browse instead of pasting in content? |
|
@jcantrill where do you get the auto-generated route from, is that something you have hard-coded? Should check with @pweil- and @smarterclayton related to the skydns stuff @smarterclayton added. We probably need to send another config back to the web console in config.js for the subdomain that routes will be auto-generated at. |
|
"Automatically build new images when code changes" is a deceptive label, we aren't doing that level of magic for them. Need to be more clear about what exactly we are giving them (which are webhooks they can then use). |
|
Possibly instead of "Autodeploy when a new image is available " make it "Autodeploy when a new builder image is available" so it is clear what image we are talking about? |
|
Don't forget to update the help tip for scaling. Say something about it controlling the number of running instances of your built image. |
|
nothing tells me what the "Name" is actually being used for, I may want to know so that it helps me decide what to call it |
assets/app/index.html
Outdated
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.
is there a reason to prefix these with 'osc' (I would think all directives are part of the openshift console)?
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 was the discussion we had the other day about prefixing our directives, its apparently a "best practice" to prefix them, so . It is debatable whether the file name really needs to have the prefix since in some of these files we are putting multiple directives.
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 decide to prefix the files, it'd make sense to eventually prefix all of them
|
sorry, jumping in late, but it looks like we're missing an option for "rebuild when builder image changes" or did we decide that's an expert mode configuration and we'll just default it to true here? |
|
also we're not doing any validation on the source-url input field? (at least confirming it's a valid url?) |
|
@jcantrill no, and in fact i think you've got mixed wording there. will comment directly on that code. but in any case deploy is different from build. |
01b3f4d to
7613a29
Compare
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.
assuming this is ties to line 152, this line should not say "builder", it's just autodeploy when a new image is available.
what this should translate into is "when a new version of my application image is created, either because i manually pushed something, or a build pushed something, redeploy my app"
That's separate from what I think is still missing here which is "if my builder image (eg ruby-20-centos7) changed, rebuild my application". That rebuild might then trigger a redeploy, but that's a separate issue.
7613a29 to
e1941c5
Compare
|
imagechange bits look right. |
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 feel like all these generate functions should really be abstracted out. Some kind of service that generates JSON for a type based on a set of inputs. The second we want to create/update individual components we are going to have to duplicate this.
Significant set of changes at this point, we can do that as a refactor later.
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 would say that's a strong maybe. Update operations would allow us to
modify the existing json so I'm not sure it applies. Also, creating
individual resources I would think we might want to offer a user more
options then the simplified version of 'Generate Application'.
On 04/08/2015 03:48 PM, Jessica Forrester wrote:
In assets/app/scripts/services/applicationGenerator.js
#1221 (comment):
return this.name + ":" + this.tag;}};}
var resources = {imageRepo: scope._generateImageRepo_(input),buildConfig: scope._generateBuildConfig_(input, imageSpec, input.labels),deploymentConfig: scope._generateDeploymentConfig_(input, imageSpec, ports, input.labels),service: scope._generateService_(input, input.name, scope._getFirstPort_(ports))};resources.route = scope._generateRoute_(input, input.name, resources.service.metadata.name);return resources;- };
- scope.generateRoute = function(input, name, serviceName){
I feel like all these generate functions should really be abstracted
out. Some kind of service that generates JSON for a type based on a set
of inputs. The second we want to create/update individual components we
are going to have to duplicate this.Significant set of changes at this point, we can do that as a refactor
later.—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/1221/files#r28005808.
Jeff Cantrill
Senior Software Engineer, Red Hat Engineering
Red Hat
Office: 703-748-4420 | 866-546-8970 ext. 8162420
[email protected]
http://www.redhat.com
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.
Sure an independent create may allow more operations, but the "model"
service or whatever it would be called should in theory handle varied
levels of input, when stuff isn't specified it would take defaults.
I just don't want us duplicating JSON building all over the place if it
isn't necessary, makes dealing with API model changes more troublesome.
On 04/09/2015 02:15 PM, Jeff Cantrill wrote:
In assets/app/scripts/services/applicationGenerator.js
#1221 (comment):
return this.name + ":" + this.tag;}};}
var resources = {imageRepo: scope._generateImageRepo_(input),buildConfig: scope._generateBuildConfig_(input, imageSpec, input.labels),deploymentConfig: scope._generateDeploymentConfig_(input, imageSpec, ports, input.labels),service: scope._generateService_(input, input.name, scope._getFirstPort_(ports))};resources.route = scope._generateRoute_(input, input.name, resources.service.metadata.name);return resources;- };
- scope.generateRoute = function(input, name, serviceName){
I would say that's a strong maybe. Update operations would allow us to
modify the existing json so I'm not sure it applies. Also, creating
individual resources I would think we might want to offer a user more
options then the simplified version of 'Generate Application'.
… <#>
On 04/08/2015 03:48 PM, Jessica Forrester wrote: In
assets/app/scripts/services/applicationGenerator.js
[DEVEXP-457] Create app from source #1221 (comment):- return this.name + ":" + this.tag; > + } > + }; > + } > + > + var
resources = { > + imageRepo: scope.generateImageRepo(input), > +
buildConfig: scope.generateBuildConfig(input, imageSpec,
input.labels), > + deploymentConfig:
scope.generateDeploymentConfig(input, imageSpec, ports,
input.labels), > + service: scope.generateService(input, input.name,
scope.getFirstPort(ports)) > + }; > + resources.route =
scope.generateRoute(input, input.name,
resources.service.metadata.name); > + return resources; > + }; > + > +
scope.generateRoute = function(input, name, serviceName){ I feel
like all these generate functions should really be abstracted out.
Some kind of service that generates JSON for a type based on a set of
inputs. The second we want to create/update individual components we
are going to have to duplicate this. Significant set of changes at
this point, we can do that as a refactor later. — Reply to this email
directly or view it on GitHub
https://github.com/openshift/origin/pull/1221/files#r28005808.
-- Jeff Cantrill Senior Software Engineer, Red Hat Engineering Red Hat
Office: 703-748-4420 | 866-546-8970 ext. 8162420 [email protected]
http://www.redhat.com—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/1221/files#r28087565.
1eec6c8 to
37b4cb3
Compare
|
[merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1519/) (Image: devenv-fedora_1246) |
|
[Test]ing while waiting on the merge queue |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1766/) |
|
woo! awesome work! |
|
🏆 |
…forres, cewong, sgoodwin
37b4cb3 to
bb87590
Compare
|
[merge] |
|
Evaluated for origin up to bb87590 |
Merged by openshift-bot
…service-catalog/' changes from ef63307bdb..ae6b643caf ae6b643caf Use oc adm instead of oadm which might not exist in various installations. 66a4eb2a2c Update instructions... will remove once documented elsewhere 1b704d1530 replace build context setup with init containers ee4df18c7f hack/lib: dedup os::util::host_platform and os::build::host_platform 1cd6dfa998 origin: Switch out owners to Red Hatters 664f4d318f Add instructions for syncing repos 2f2cdd546b origin-build: delete files with colon in them cdf8b12848 origin-build: don't build user-broker ebfede9056 origin build: add _output to .gitignore 55412c7e3d origin build: make build-go and build-cross work 68c74ff4ae origin build: modify hard coded path 3d41a217f6 origin build: add origin tooling a8fc27d Fix typos in walkthrough (openshift#1224) e77edbf openshift#1157: Limit the amount of time for reconciliations (openshift#1196) 1b1a749 temporarily disabled verify-links.sh from the verify target (openshift#1226) acf8fab Send originating identity headers in OSB requests (openshift#1162) 821ba16 new admission controller to block updates to service instance updates that (openshift#1210) d69c5e5 Minor improvement to godoc in binaries (openshift#1211) 5b81814 fix typos (openshift#1221) 836dc4a Adds how to download Helm chart (charts/catalog) (openshift#1219) 2fd0115 Fix "visit the project on github" link. (openshift#1217) 325e4b6 Add how to set $GOPATH. (openshift#1218) 68b775f Update the installation (openshift#1199) 6e3a3c1 v0.0.19 (openshift#1207) 8b69791 Removing errexit from TLS setup script (openshift#1206) 273260f Instance deletion lifecycle enhancements, issue openshift#820 (openshift#1159) c050713 fix cleaning of build output for non-root users (openshift#1205) 5995df1 Merge branch 'pr/1204' 72f4802 Remove osb prefix from example ServiceClass (openshift#1201) f9dbd4e pin all dependencies in glide to current version except for glog where we want to pick up the prior version to fix issue 1187. f148bc5 v0.0.18 (openshift#1202) b86ab8d Removing the helm install command (openshift#1185) 3cff482 Remove Alpha* prefix on all API fields for issue openshift#1180 (openshift#1184) 154b74d Fix gofmt issue (openshift#1192) 2ee894a do the clean before building an arch (openshift#1179) b4976ef Fix bad URL (openshift#1189) cd3dede Fix hrefs again (openshift#1190) f066226 Design: Instance/Binding parameters (openshift#1075) eb37682 This generated file is missing from master (openshift#1191) 28c0ae7 Use generation instead of checksum for Instances and InstanceCredentials (openshift#1151) 5cdd323 Fix bad href (openshift#1188) 8a892f0 handle lingering polling cases (openshift#1174) f5fabd6 remove TPRs from Jenkins e2e pipeline (openshift#1175) 717df78 Add godoc explaining that Instance and InstanceCredential specs are immutable (openshift#1182) REVERT: ef63307bdb origin build: add origin tooling git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog git-subtree-split: ae6b643cafd3a17412f173e70ed7c1a2e39ee549
Signed-off-by: yuexiao-wang <[email protected]>
This reverts commit 076f026. This change was too broad as it affected other binaries beyond atomic-openshift-node. When trying to reduce the scope of this change in PR openshift#1221 I found out that we were racing with another signal handler and if that fired first it would always exit with status code 1. The solution is a combination of PR openshift#1221 and an upstream kubernetes change to remove the registration of a signal handler in pkg/ code.



@liggitt @jwforres Please do an initial review with regards to structure and what I'm pushed for filters, directives, specs, routes to see if I am moving in the direction you would expect