# ot journal 2024-01-22
## monday, january 22nd, 2024
- had issues with ot vpn connection. resolved by emailing ab who pointed out that my password expired and required reset.
- observed that my access to the cicd vms is still not possible as my ad account is not yet added to the local admin groups on tcc-apm-azu1-v.otg.om and wat-apm-azu1-v.otg.om
- observed that the jenkins-nightly pod had again gone into a boot-loop which is caused by jenkins plugins auto-updating while the server remains outdated (https://access.redhat.com/solutions/5233221). resolved by editing [deployment config](https://console-openshift-console.apps.ocpprod.otg.om/edit-deployment/ns/cicd-dev?name=jenkins-nightly&kind=DeploymentConfig) and updating the container image name source to: `registry.redhat.io/openshift4/ose-jenkins:latest` with *deploy image from an image stream tag* unchecked. this resulted in the pod coming back online with all build configuration and history intact.
- resolved all of the low-hanging-fruit issues on the [jenkins server management page](https://jenkins-nightly-cicd-dev.apps.ocpprod.otg.om/manage). some of the remaining issues related to plugin updates should disappear after the next server restart.
- created and tested openshift cloud jenkins agent configurations for:
- nodejs 12:
```groovy
podTemplate(
label: 'nodejs12',
cloud: 'openshift',
serviceAccount: 'jenkins',
containers: [
containerTemplate(
name: 'jnlp',
image: 'registry.redhat.io/openshift4/ose-jenkins-agent-nodejs-12-rhel8:latest',
alwaysPullImage: false,
ttyEnabled: true,
args: '${computer.jnlpmac} ${computer.name}',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
)
]
)
```
- nodejs 14
```groovy
podTemplate(
label: 'nodejs14',
cloud: 'openshift',
serviceAccount: 'jenkins',
containers: [
containerTemplate(
name: 'jnlp',
image: 'registry.redhat.io/openshift4/ose-jenkins-agent-base:v4.9.0',
alwaysPullImage: false,
args: '${computer.jnlpmac} ${computer.name}',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
),
containerTemplate(
name: 'nodejs14',
image: 'registry.redhat.io/rhscl/nodejs-14-rhel7:latest',
alwaysPullImage: false,
ttyEnabled: true,
command: 'sleep',
args: '99d',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
)
]
)
```
- nodejs 16
```groovy
podTemplate(
label: 'nodejs16',
cloud: 'openshift',
serviceAccount: 'jenkins',
containers: [
containerTemplate(
name: 'jnlp',
image: 'registry.redhat.io/openshift4/ose-jenkins-agent-base:v4.9.0',
alwaysPullImage: false,
args: '${computer.jnlpmac} ${computer.name}',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
),
containerTemplate(
name: 'nodejs16',
image: 'registry.redhat.io/rhel9/nodejs-16:latest',
alwaysPullImage: false,
ttyEnabled: true,
command: 'sleep',
args: '99d',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
)
]
)
```
- nodejs 18
```groovy
podTemplate(
label: 'nodejs18',
cloud: 'openshift',
serviceAccount: 'jenkins',
containers: [
containerTemplate(
name: 'jnlp',
image: 'registry.redhat.io/openshift4/ose-jenkins-agent-base:v4.9.0',
alwaysPullImage: false,
args: '${computer.jnlpmac} ${computer.name}',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
),
containerTemplate(
name: 'nodejs18',
image: 'registry.access.redhat.com/ubi8/nodejs-18:latest',
alwaysPullImage: false,
ttyEnabled: true,
command: 'sleep',
args: '99d',
envVars: [
containerEnvVar(key: 'TZ', value: 'Asia/Muscat')
]
)
]
)
```
- initially misinterpreted the [crm/admin](https://jenkins-nightly-cicd-dev.apps.ocpprod.otg.om/job/crm/job/admin) bustage as a nodejs version issue (i made assumptions about the agent being modern, while the code is older). attempted builds with 18, 16, 14 and 12 before determining that the build is in fact busted at the code level. ie:
```shell
Failed to compile.
Module not found: Error: Can't resolve 'constants' in '/tmp/workspace/crm/admin/src/utils'
Did you mean './constants'?
```
- determined that the [crm/cos](https://jenkins-nightly-cicd-dev.apps.ocpprod.otg.om/job/crm/job/cos) bustage is caused by the agent building in the
```
/tmp/workspace/crm/cos
```
folder, while the git checkout is in the
```
/home/jenkins/agent/workspace/crm/cos
```
folder