2

A web application typically consists of code, config and data. Code can often be made open source on GitHub. But per-instance config and data may contain secretes therefore are inappropriate be saved in GH. Data can be imported to a persistent storage so disregard for now.

Assuming the configs are file based and are saved in another private secured SVN repo, in order to deploy the web app to OpenShift and implement CI, I need to merge config files with code prior to running build scripts. In addition, the build strategy should support GH webhooks for automated build.

My questions are, to be more specific:

  1. Does OS BuildConfig support multiple data sources, especially from svn?
  2. If not, how to deploy such web app to OS?
abbr
  • 5,361
  • 6
  • 30
  • 44
  • Have you looked at the 'secrets' feature of OpenShift? https://docs.openshift.com/enterprise/3.0/dev_guide/secrets.html – Graham Dumpleton Feb 20 '16 at 11:50
  • Multiple sources of input have been requested but are not implemented, so you can combine source code and secrets and image contents, but not multiple source code locations. You could use a Git sub module, but in this case using Jenkins makes sense. Be sure to checkout the OpenShift Jenkins plugin https://wiki.jenkins-ci.org/display/JENKINS/OpenShift+Pipeline+Plugin – Clayton Feb 20 '16 at 17:12

1 Answers1

1

The solution I came up with so far:

  1. Instead of relying on OS for CI, use Jenkin instead.
  2. Merge config files with code using Jenkins.
  3. Instead of using Git source type in BuildConfig, use binary source instead
  4. Let jenkins run oc start-build --from-dir=<directory> where <directory> contains merged code/config
abbr
  • 5,361
  • 6
  • 30
  • 44