Skip to content

Conversation

@jcantrill
Copy link
Contributor

@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

@jcantrill jcantrill force-pushed the devex_457_create_app_from_image branch 4 times, most recently from f9fb187 to 8ba6041 Compare March 10, 2015 14:44
@jcantrill
Copy link
Contributor Author

@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.

@jcantrill
Copy link
Contributor Author

@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.
Maybe @pweil- should have a look to see its reasonable to him as well.
cc @bparees @csrwng @EmilyDirsh @sg00dwin

@jcantrill jcantrill changed the title WIP DO Not MERGE - [DEVEXP-457] Create app from image WIP DO Not MERGE - [DEVEXP-457] Create app from source Mar 13, 2015
@jwforres
Copy link
Member

See comments in below screenshots:

create_route_for_me
secure_route_config

Also, not sure i like the "Specify route" label in combination with "Create a route for me". Seems like specify should be more like "Let me specify a route" or "I have a route already"

@liggitt
Copy link
Contributor

liggitt commented Mar 16, 2015

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

@liggitt
Copy link
Contributor

liggitt commented Mar 16, 2015

Also, should we have the cert/key/ca be selected as a file browse instead of pasting in content?

@jwforres
Copy link
Member

@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.

@pweil-
Copy link

pweil- commented Mar 16, 2015

/cc @ramr Ram, it looks like this could use a hook into your route allocator code merged in #1291 for auto-generating route names

@jwforres
Copy link
Member

scaling

See comment in screenshot for style fix on scaling input. Also should we be letting them specify 0 for scaling, right now you have min set to 1, but I could see someone wanting to get everything set up with 0 scale to start with.

@jwforres
Copy link
Member

"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).

@jwforres
Copy link
Member

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?

@jwforres
Copy link
Member

Don't forget to update the help tip for scaling. Say something about it controlling the number of running instances of your built image.

@jwforres
Copy link
Member

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

Copy link
Contributor

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)?

Copy link
Member

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.

Copy link
Contributor

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

@bparees
Copy link
Contributor

bparees commented Mar 17, 2015

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?

@bparees
Copy link
Contributor

bparees commented Mar 17, 2015

also we're not doing any validation on the source-url input field? (at least confirming it's a valid url?)

@jcantrill
Copy link
Contributor Author

@bparees Correct there is no source url validation. @jwforres ??? In regards to rebuild when builder image changes is that "Autodeploy when a new builder image is available"?

@bparees
Copy link
Contributor

bparees commented Mar 18, 2015

@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.

@jcantrill jcantrill force-pushed the devex_457_create_app_from_image branch from 01b3f4d to 7613a29 Compare March 18, 2015 20:01
Copy link
Contributor

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.

@jcantrill
Copy link
Contributor Author

@jwforres @bparees @csrwng @sg00dwin Rebased to latest and updated to address previous comments(routing, key/value wigit for labels and env vars). It really needs some styling help especially in regards to the file upload and routing stuff

@jcantrill jcantrill force-pushed the devex_457_create_app_from_image branch from 7613a29 to e1941c5 Compare March 18, 2015 20:19
@jcantrill
Copy link
Contributor Author

@jwforres @bparees @sg00dwin Updated PR to add imageChange trigger

@bparees
Copy link
Contributor

bparees commented Mar 25, 2015

imagechange bits look right.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@jcantrill jcantrill force-pushed the devex_457_create_app_from_image branch from 1eec6c8 to 37b4cb3 Compare April 9, 2015 19:13
@jcantrill jcantrill changed the title WIP DO Not MERGE - [DEVEXP-457] Create app from source [DEVEXP-457] Create app from source Apr 9, 2015
@jwforres
Copy link
Member

jwforres commented Apr 9, 2015

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1519/) (Image: devenv-fedora_1246)

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1766/)

@bparees
Copy link
Contributor

bparees commented Apr 9, 2015

woo! awesome work!

@pweil-
Copy link

pweil- commented Apr 9, 2015

🏆

@jcantrill jcantrill force-pushed the devex_457_create_app_from_image branch from 37b4cb3 to bb87590 Compare April 10, 2015 00:59
@jcantrill
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin up to bb87590

openshift-bot pushed a commit that referenced this pull request Apr 10, 2015
@openshift-bot openshift-bot merged commit c43c334 into openshift:master Apr 10, 2015
@jcantrill jcantrill deleted the devex_457_create_app_from_image branch April 10, 2015 01:35
jboyd01 pushed a commit to jboyd01/origin that referenced this pull request Sep 14, 2017
…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
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
Signed-off-by: yuexiao-wang <[email protected]>
Miciah pushed a commit to Miciah/origin that referenced this pull request Jun 27, 2018
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants