ods-core icon indicating copy to clipboard operation
ods-core copied to clipboard

Create verify-configuration make target

Open clemensutschig opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Although we have just one env file that needs to be configured based on your install - there is plenty errors one can make. E.g. wrong bitbucket url .. as these settings are applied into many Components- getting one wrong causes a lot of frustration

Describe the solution you'd like A make Target that verifies if the settings are right

clemensutschig avatar Aug 19 '20 06:08 clemensutschig

I started to give this some more thoughts - and how this could work.

basically - we have two options

  1. a shell+ script that does all the checks, or
  2. a deployable image - that gets deployed thru tailor

the second option would have the possibility to verify stuff inside OCP (e.g. internal docker registry url) ..

@michaelsauter - thoughts?

clemensutschig avatar Dec 15 '20 10:12 clemensutschig

Hmm, I just looked at the sample config file. It's not entirely clear to me what we are trying to achieve for each setting. Maybe we can start by listing each setting we want to check, and what checks we want to perform on it.

Some examples:

  • ODS_NAMESPACE: I think nothing can be done here
  • ODS_IMAGE_TAG: I think nothing can be done here
  • ODS_GIT_REF: We could show a warning if the ref doesn't exist in GitHub?
  • ODS_BITBUCKET_PROJECT I think nothing can be done here
  • NEXUS_FROM_IMAGE: I guess there is some way to verify if that image tag exists on DockerHub ...
  • NEXUS_HOST: Here we could create a dummy route, then check if the app domain matches ... if not, we could show a warning (error is not possible as Nexus could be hosted elsewhere)
  • NEXUS_URL: same as host, and warning if protocol is not https://
  • NEXUS_USERNAME: nothing to be done here
  • NEXUS_PASSWORD warning/error if not changed from changeme

... and so on :)

I guess most things can be done via a shell script. I'd suggest we should start with this, and then we can extend to an image if need be (we can still reuse the script in that case).

michaelsauter avatar Dec 15 '20 11:12 michaelsauter

:) or we revert the entire idea, and make the whole config much simpler - #623 - and then test only a few topics,..

What's coming to my mind:

  1. verify openshift projects are NOT there / or there - for upgrade
  2. verify bitbucket projects are NOT there / or there - for upgrade
  3. verify all URL / HOST configs, to be there, accessible
  4. verify download URLs
  5. verify image tags & docker.io references

clemensutschig avatar Dec 15 '20 11:12 clemensutschig