0

I'm using the new open shift 3 and I'm trying to create a new app with 3 different sources

  1. the centos/php-56-centos7 - base image
  2. A public github repo - external framework source code
  3. my local project files - 3rd party source code

The project "depends" on the 1st two sources being compiled and then and my local project files( 3rd item) needs to "merge/ integrated" with the compiled result contents already instantiated by the 1st 2.

What's the best approach to deal with this development approach?

I managed to get as far as creating a build for the first two sources via

oc new-build centos/php-56-centos7~https://github.com/invoiceninja/invoiceninja.git --dry-run -e DOCUMENTROOT=/public --name=invoiceninja-wipay

creating/ deploying on this build alone creates a successful deployment. I'm just not sure now how to "integrate" the 3rd source( local project assets/ files) into the build without replacing the contents already there

codedge
  • 4,754
  • 2
  • 22
  • 38
Kendall
  • 5,065
  • 10
  • 45
  • 70
  • 1
    What are the local project files? If they are configuration, you could use config maps to mount them into the container. If they are some sort of data files or assets, you could use a persistent volume mounted into the container and upload them into that. You might also use a separate binary input build to add them into and image and then incorporate them into the first build using image source linking in build configuration. How you handle it really depends on what the local files are. – Graham Dumpleton Jun 17 '17 at 12:47
  • @GrahamDumpleton the files are local project repo assets.I'm not familiar with open shift would you be able to explain via example? – Kendall Jun 17 '17 at 13:46
  • 1
    As there are different approaches as I noted, you need to really do a bit of research of the OpenShift documentation to work out which is appropriate. Saying they are 'local project repo assets' doesn't say much and doesn't help to narrow down which approach to provide an example for. Why aren't they in the repository where source code is pulled from? Are they actually secrets? Are they fixed files that can be baked into an image? Are they files that need to be updated at any time without needing to build a new image and go through a whole new deployment? – Graham Dumpleton Jun 17 '17 at 23:39
  • @GrahamDumpleton to answer 1) they are not in the source code because they are add ons... 2) Yes they are actually secrets. 3) They are not fixed files as they would be developed on. 4) If I can update the files without building a new image then I would take this approach. Right now I'm not sure how. – Kendall Jun 18 '17 at 11:09
  • 1
    If they are truly secrets, eg. credentials etc. then use secrets. https://docs.openshift.org/latest/dev_guide/secrets.html If you want live update ability without rebuilding image, use persistent volumes. https://docs.openshift.org/latest/dev_guide/volumes.html – Graham Dumpleton Jun 18 '17 at 20:32

0 Answers0