Thank you. It’s great help. I am now able to add few extra arguments as requied by nss_wrapper to default run script to jboss process to look for passwd file from differetn location. I want to run each application its own OS generic user name rather default “jboss”.
Leveraged nss_wrapper as per Brenton advise. It is working for both java and non java apps. -- Srinivas Kotaru From: Ben Parees <[email protected]<mailto:[email protected]>> Date: Wednesday, March 16, 2016 at 12:53 PM To: skotaru <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: binary tar.gz format the scripts are in /usr/local/s2i inside the image, so: docker run registry.access.redhat.com/jboss-eap-6/eap64-openshift<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift> ls /usr/local/s2i docker run registry.access.redhat.com/jboss-eap-6/eap64-openshift<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift> cat /usr/local/s2i/assemble etc On Wed, Mar 16, 2016 at 3:49 PM, Srinivas Naga Kotaru (skotaru) <[email protected]<mailto:[email protected]>> wrote: Got it . Thanks Where I can find default assemble and run scripts for JBOSS EAP? I want to add few extra export arguments to run script to be affective at build time. Is it possible to run both my run script along with default build time run script? -- Srinivas Kotaru From: Ben Parees <[email protected]<mailto:[email protected]>> Date: Wednesday, March 16, 2016 at 12:38 PM To: skotaru <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: binary tar.gz format On Wed, Mar 16, 2016 at 3:28 PM, Srinivas Naga Kotaru (skotaru) <[email protected]<mailto:[email protected]>> wrote: Ben Did binary deploy using —from-dir support .sti/bin/run script? it really has nothing to do with the run script. the contents supplied via --from-dir end up being made available to the assemble script, just as if you had provided a git repo and we had cloned the git repo. So it's up to the assemble script what to do with the content you supplied via --from-dir. -- Srinivas Kotaru From: Ben Parees <[email protected]<mailto:[email protected]>> Date: Thursday, March 10, 2016 at 10:18 AM To: skotaru <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: binary tar.gz format On Thu, Mar 10, 2016 at 12:54 PM, Srinivas Naga Kotaru (skotaru) <[email protected]<mailto:[email protected]>> wrote: Can some one comment whether this doable or not? Am looking for a similar OSE 2.X binary deploy compatibility I don't think it will work exactly like as it did in v2, if you provide an archive as your binary input, then the build, when it runs, will have that archive available, but it will not be extracted, so you either need to: 1) use a directory (--from-dir pointing to a directory containing your extracted content) as the binary input or 2) your build (s2i assemble script, or your Dockerfile) needs to include logic to extract the archive you are providing, prior to proceeding with the build logic. -- Srinivas Kotaru On 3/9/16, 10:11 PM, "[email protected]<mailto:[email protected]> on behalf of Srinivas Naga Kotaru (skotaru)" <[email protected]<mailto:[email protected]> on behalf of [email protected]<mailto:[email protected]>> wrote: >One more question > >Am exploring binary deployment using .tar.gz format. The reason for this >exercise is to take advantage of our OSE2 build system which currently package >and generate final artifact in .tar.gz format ( OSE 2.x binary deploy format) > >Is OSE 3.x binary deploy support tar.gz format? As per my testing, it is not >working > ># tar -czvf sales-dev.tar.gz ./Deployments ./Configuration ># oc start-build sales-dev —from-file=sales-dev.tar.gz > >I rsh into pod and checked source folder. It was not untared > ># oc rsh sales-dev-3-mdcs3 ># ls -l source/ >total 12 >-rw-r--r--. 1 jboss jboss 8395 Mar 9 23:49 sales-dev.tar.gz > > > > >-- >Srinivas Kotaru > > > > > > >On 3/9/16, 9:46 PM, >"[email protected]<mailto:[email protected]> > on behalf of Srinivas Naga Kotaru (skotaru)" ><[email protected]<mailto:[email protected]> > on behalf of [email protected]<mailto:[email protected]>> wrote: > >>Ok thanks. >> >>Can we raise a RFE for tracking purpose if you guys think it useful feature. >> >> >>-- >>Srinivas Kotaru >> >> >> >> >> >> >> >>On 3/9/16, 9:06 PM, "Clayton Coleman" >><[email protected]<mailto:[email protected]>> wrote: >> >>>Binary builds today have to come from direct user input (directly from >>>a start command or a call to the rest API). In the future we plan on >>>supporting other ways of getting the content. >>> >>>> On Mar 9, 2016, at 11:59 PM, Srinivas Naga Kotaru (skotaru) >>>> <[email protected]<mailto:[email protected]>> wrote: >>>> >>>> Clayton >>>> >>>> What you described already working if I pass using start-build. >>>> >>>> I am trying to pass one sample.war as a argument to template and use this >>>> to create initial application. Think about this is sample hello world >>>> program as part of provision. Once app was provisioned, app teams can >>>> deploy the way you described. >>>> >>>> If I put empty string to asFile, app creation is successful but build is >>>> waiting forever. So if clients hit browser, they wont get any output and >>>> might get confuse. >>>> >>>> Am sure we can pass git repo by adjusting strategy but exploring if >>>> possible to use a sample.war as argument to template >>>> >>>> >>>> >>>> -- >>>> Srinivas Kotaru >>>> >>>> >>>> >>>> >>>> >>>> >>>>> On 3/9/16, 8:49 PM, "Clayton Coleman" >>>>> <[email protected]<mailto:[email protected]>> wrote: >>>>> >>>>> The container itself is what determines whether the image will be used >>>>> and what directory is it expecting to see WARs in >>>>> >>>>> I *think* you need to do >>>>> >>>>> $ mkdir deployments >>>>> $ mv .../sample.war deployments/ >>>>> $ oc start-build --from-dir=. >>>>> >>>>> Binary builds require you to launch start-build --from-X, otherwise >>>>> the build will wait forever for you to send it the binary. >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Mar 9, 2016 at 11:04 PM, Srinivas Naga Kotaru (skotaru) >>>>> <[email protected]<mailto:[email protected]>> wrote: >>>>>> I think that is pretty desired feature. I can think multiple use cases, >>>>>> one could by taking final artifacts from Jenkins builds. >>>>>> >>>>>> BTY, am still having issues. Am creating an application using template. >>>>>> This time I mentioned sample.war and copied sample.war file to folder >>>>>> where am running oc. Also copied same file to templates folder where my >>>>>> template exist. In either cases build is failing >>>>>> >>>>>> "spec": { >>>>>> "source": { >>>>>> "type": "Binary", >>>>>> "binary": { >>>>>> "asFile": "sample.war" >>>>>> }, >>>>>> "contextDir": "${CONTEXT_DIR}" >>>>>> >>>>>> >>>>>> >>>>>> # oc logs sales-dev-1-build >>>>>> master ✗ ✭ ✱ >>>>>> >>>>>> I0309 22:58:52.610618 1 sti.go:173] The value of ALLOWED_UIDS is >>>>>> [1-] >>>>>> I0309 22:58:52.642387 1 docker.go:242] Pulling Docker image >>>>>> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2> >>>>>> ... >>>>>> I0309 22:58:59.932801 1 sti.go:195] Creating a new S2I builder >>>>>> with build config: "Builder Name:\t\tJBoss EAP 6.4\nBuilder >>>>>> Image:\t\tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2\nSource<http://tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2%5CnSource>:\t\t\tfile:///tmp/s2i-build632502898/upload/src\nContext >>>>>> Directory:\t/Users/skotaru/lae3/build/ose-binary-builds\nOutput Image >>>>>> Tag:\t172.30.238.173:5000/sales/sales-dev:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=sales-dev-1,OPENSHIFT_BUILD_NAMESPACE=sales\nIncremental >>>>>> Build:\tdisabled\nRemove Old Build:\tdisabled\nBuilder Pull >>>>>> Policy:\talways\nQuiet:\t\t\tdisabled\nLayered >>>>>> Build:\t\tdisabled\nWorkdir:\t\t/tmp/s2i-build632502898\nDocker >>>>>> NetworkMode:\tcontainer:05752cac5dbdce4a5f77d60ed23030dda17a9344aa904ec3c9786e231a858233\nDocker >>>>>> Endpoint:\tunix:///var/run/docker.sock\n" >>>>>> I0309 22:58:59.932858 1 docker.go:242] Pulling Docker image >>>>>> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2> >>>>>> ... >>>>>> I0309 22:59:01.449811 1 sti.go:140] Preparing to build >>>>>> 172.30.238.173:5000/sales/sales-dev:latest<http://172.30.238.173:5000/sales/sales-dev:latest> >>>>>> I0309 22:59:01.453593 1 source.go:151] Receiving source from STDIN >>>>>> as file sample.war >>>>>> [ose-binary-builds] >>>>>> master ✗ ✭ ✱ >>>>>> [ose-binary-builds] >>>>>> master ✗ ✭ ✱ >>>>>> [ose-binary-builds] oc logs sales-dev-1-build -f >>>>>> master ✗ ✭ ✱ >>>>>> I0309 22:58:52.610618 1 sti.go:173] The value of ALLOWED_UIDS is >>>>>> [1-] >>>>>> I0309 22:58:52.642387 1 docker.go:242] Pulling Docker image >>>>>> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2> >>>>>> ... >>>>>> I0309 22:58:59.932801 1 sti.go:195] Creating a new S2I builder >>>>>> with build config: "Builder Name:\t\tJBoss EAP 6.4\nBuilder >>>>>> Image:\t\tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2\nSource<http://tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2%5CnSource>:\t\t\tfile:///tmp/s2i-build632502898/upload/src\nContext >>>>>> Directory:\t/Users/skotaru/lae3/build/ose-binary-builds\nOutput Image >>>>>> Tag:\t172.30.238.173:5000/sales/sales-dev:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=sales-dev-1,OPENSHIFT_BUILD_NAMESPACE=sales\nIncremental >>>>>> Build:\tdisabled\nRemove Old Build:\tdisabled\nBuilder Pull >>>>>> Policy:\talways\nQuiet:\t\t\tdisabled\nLayered >>>>>> Build:\t\tdisabled\nWorkdir:\t\t/tmp/s2i-build632502898\nDocker >>>>>> NetworkMode:\tcontainer:05752cac5dbdce4a5f77d60ed23030dda17a9344aa904ec3c9786e231a858233\nDocker >>>>>> Endpoint:\tunix:///var/run/docker.sock\n" >>>>>> I0309 22:58:59.932858 1 docker.go:242] Pulling Docker image >>>>>> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2<http://registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2> >>>>>> ... >>>>>> I0309 22:59:01.449811 1 sti.go:140] Preparing to build >>>>>> 172.30.238.173:5000/sales/sales-dev:latest<http://172.30.238.173:5000/sales/sales-dev:latest> >>>>>> I0309 22:59:01.453593 1 source.go:151] Receiving source from STDIN >>>>>> as file sample.war >>>>>> >>>>>> >>>>>> >>>>>> I think build is still expecting sample.war file from STDIN >>>>>> >>>>>> >>>>>> -- >>>>>> Srinivas Kotaru >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> On 3/9/16, 7:55 PM, "Clayton Coleman" >>>>>>> <[email protected]<mailto:[email protected]>> wrote: >>>>>>> >>>>>>> No, binaries are passed directly to the build, we don't support >>>>>>> download from URL as a build source yet. >>>>>>> >>>>>>> On Wed, Mar 9, 2016 at 10:35 PM, Srinivas Naga Kotaru (skotaru) >>>>>>> <[email protected]<mailto:[email protected]>> wrote: >>>>>>>> Can we pass FQDN to fetch WAR file like below? >>>>>>>> >>>>>>>> "spec": { >>>>>>>> "source": { >>>>>>>> "type": "Binary", >>>>>>>> "binary": { >>>>>>>> "asFile": >>>>>>>> "https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war" >>>>>>>> }, >>>>>>>> "contextDir": "${CONTEXT_DIR}” >>>>>>>> >>>>>>>> >>>>>>>> When I try it is failing … >>>>>>>> >>>>>>>> spec.source.binary.asFile: invalid value >>>>>>>> 'https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war', >>>>>>>> Details: file name may not contain slashes or relative path segments >>>>>>>> and >>>>>>>> must be a valid POSIX filename >>>>>>>> >>>>>>>> -- >>>>>>>> Srinivas Kotaru >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> users mailing list >>>>>>>> [email protected]<mailto:[email protected]> >>>>>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users >>>>>>>> >> >>_______________________________________________ >>users mailing list >>[email protected]<mailto:[email protected]> >>http://lists.openshift.redhat.com/openshiftmm/listinfo/users > >_______________________________________________ >users mailing list >[email protected]<mailto:[email protected]> >http://lists.openshift.redhat.com/openshiftmm/listinfo/users _______________________________________________ users mailing list [email protected]<mailto:[email protected]> http://lists.openshift.redhat.com/openshiftmm/listinfo/users -- Ben Parees | OpenShift -- Ben Parees | OpenShift -- Ben Parees | OpenShift
_______________________________________________ users mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/users
