replace hardcoded hostnames with environment variables
- Dominant language
- Shell
- Stars
- 21
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Description
We have hardcoded host names, such as `cmsweb.cern.ch`, `cmsweb-testbed.cern.ch` in various places. For instance, these names are used in `deploy` scripts. But for k8s setup deploy scripts are used during build of image, i.e. it implies that these names are propagated into the image. We should remove all hardcoded host names and replace them as following:
```
cmsweb_prod=${CMSWEB_HOSTNAME:-cmsweb.cern.ch}
cmsweb_preprod=${CMSWEB_HOSTNAME:-cmsweb-testbed.cern.ch}
```
and then replace usage of host names with `$cmsweb_prod` and `$cmsweb_preprod` variables. This will allow to manipulate host names during k8s deployment where we can set appropriate host name via environment variables. Then we can adjust cmsweb docker images to rely on this environment variable.
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the deploy scripts for cmsweb.cern.ch and cmsweb-testbed.cern.ch, then inspect how those scripts are used while building the k8s image. Replace the hardcoded values with environment-variable-backed shell variables and verify that deployment can override the hostnames without embedding them in the image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes, shell
- Domain
- devops, infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100