Open dikpater opened 1 month ago
@dikpater Thank you for opening this issue to let us know about the problems you ran into and the work-arounds you needed. I am sorry you had trouble; but it sounds like you were able to get everything working in the end.
v4m_replace
function issue
I am not aware of any other users having problems with this function. The existing function code has generally worked on Bash 4 on Linux and with the Bash built into the Apple Mac. But there can always be compatibility issues. What operating system were you using? What version of BASH are you using?AIRGAP_HELM_FORMAT
environment variable
I am glad you found the AIRGAP_HELM_FORMAT
environment variable. We discuss it in the documentation about deploying into an air-gapped environment but some people miss it.AIRGAP_IMAGE_PULL_SECRET_NAME
environment variable? I have just double-checked the code and it should have generated the line properly (including the brackets and name:
). Seeing how you set the environment variable will allow us to do additional testing.yaml:
indentations:
can_be: difficult
In any case, we know providing additional Grafana configuration information can be difficult. We hope to make things like this easier in the future.
Thank you again for opening this issue and sharing information on the problems you ran into. Please provide the information I requested so we can make any needed improvements.
Regards, Greg
@dikpater Sorry, I've been out of office and haven't had a chance to follow-up on this for the last couple of weeks. It would be very helpful if you could provide more information about your experience so we can address any bugs or needed tweaks to our code or documentation. I included some questions in my earlier response, but let me list them here:
AIRGAP_HELM_FORMAT
, AIRGAP_IMAGE_PULL_SECRET_NAME
, etc.)Regards, Greg
Greg At this moment I am not working. My wife suffers from Alzheimer’s and is now in a nursery home. We need time to recover from the situation. When I am back I will give the requested info. But this will be half November. Regards Dik Pater
Op vr 1 nov 2024 om 22:00 schreef Greg Smith @.***>
@dikpater https://github.com/dikpater Sorry, I've been out of office and haven't had a chance to follow-up on this for the last couple of weeks. It would be very helpful if you could provide more information about your experience so we can address any bugs or needed tweaks to our code or documentation. I included some questions in my earlier response, but let me list them here:
- Please describe the environment in which you were running our deployment scripts (e.g. operating system, BASH versions, etc.)
- Please share information on the values you set for the various air-gap related environment variables (e.g. AIRGAP_HELM_FORMAT, AIRGAP_IMAGE_PULL_SECRET_NAME, etc.)
Regards, Greg
-
— Reply to this email directly, view it on GitHub https://github.com/sassoftware/viya4-monitoring-kubernetes/issues/689#issuecomment-2452582818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIKLRVDUWVNHXIUOR3BVNETZ6PTVDAVCNFSM6AAAAABP7B6HYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJSGU4DEOBRHA . You are receiving this because you were mentioned.Message ID: @.***>
Hi Greg,
I also had an error related to v4m_replace function definition I believe as my deployment was failing with sed error:
./deploy_logging.sh _INFO User directory: /opt/work/deployments/sas-prod-oss/viya4mon/config INFO Helm client version: 3.16.2 INFO Kubernetes client version: v1.27.9 INFO Kubernetes server version: v1.27.9 INFO Loading user environment file: /opt/work/deployments/sas-prod-oss/viya4mon/config/logging/user.env INFO Deploying into an 'air-gapped' cluster from private registry [x.x.x.x/monitoring]
Deploying logging components to the [logging] namespace [Tue Nov 5 09:04:06 PM UTC 2024]_
sed: -e expression #1, char 44: unknown option to `s' ERROR Exiting script [deploy_logging.sh] due to an error executing the command [logging/bin/deployosd.sh].
After editing the function as per the above, deployment went through... I saw some sed errors from time to time: sed: can't read : No such file or directory
...but resources were created and pods were Running, however, deployment failed.
INFO Loading Content into OpenSearch ERROR The OpenSearch REST endpoint has NOT become accessible in the expected time; exiting. ERROR Review the OpenSearch pod's events and log to identify the issue and resolve it before trying again. ERROR Exiting script [deploy_logging.sh] due to an error executing the command [logging/bin/deploy_opensearch_content.sh].
_export NODE_PORT=$(kubectl get --namespace logging -o jsonpath="{.spec.ports[0].nodePort}" services v4m-osd) export NODE_IP=$(kubectl get nodes --namespace logging -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT http://x.x.x.x:31033_ ... x.x.x.x is the IP of the CAS node.
,and indeed I get nothing in the browser.
What am I doing wrong? Is it ok to run this on the CAS node? Can I take this with SAS Support?
Please describe the environment in which you were running our deployment scripts (e.g. operating system, BASH versions, etc.):
_Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-43-generic x86_64) GNU bash, version 5.1.16(1)-release (x8664-pc-linux-gnu)
Please share information on the values you set for the various air-gap related environment variables (e.g. AIRGAP_HELM_FORMAT, AIRGAP_IMAGE_PULL_SECRET_NAME, etc.)
_AIRGAP_DEPLOYMENT=true AIRGAP_REGISTRY=x.x.x.x/monitoring AIRGAP_IMAGE_PULL_SECRET_NAME=v4m-image-pull-secret AIRGAP_HELM_FORMAT=tgz AIRGAP_HELMREPO=/opt/helm
We are using harbor for private registry.
Thanks a lot!
Mr. Smith. We , my collegue Rob and I had to make some changes to get the installation working in our environment, I wanted to email , but I did not know how. If there is a better way to inform you, please inform me.
We changed the common.sh :
function v4m_replace {
#
if echo "$OSTYPE" | grep 'darwin' > /dev/null 2>&1; then
sed -i '' s/"$1"/"$2"/g "$3"
else
sed -i s/"$1"/"$2"/g "$3"
fi
}
INTO function v4m_replace { sed -i ''s%$1%$2%g'' "$3" }
In the example yaml user.env here stood AIRGAP_HELM_FORMAT: oci. we changed : to = → AIRGAP_HELM_FORMAT= tgz
Change in /appl/mon/viya4-monitoring-kubernetes/monitoring/prom-operator_container_image.template the line
imagePullSecrets: IMAGE_PULL_SECRETS
into imagePullSecrets: [name: IMAGE_PULL_SECRET]
/appl/mon/viya4-monitoring-kubernetes/monitoring/pushgateway_container_image.template also needs this change.
adding smtp configuration added these lines in the user-values-prom-operator.yaml(create a kubernets secret kube-prometheus-stack-grafana-secret-mail with MAILUSER + MAILPASSWORD): This was a struggle, with outlining..so I think to post it. grafana:
See https://grafana.com/docs/grafana/latest/administration/configuration/#smtp
envFromSecret: kube-prometheus-stack-grafana-secret-mail "grafana.ini": smtp: enabled: "true" host: mailhost:25 from_address: someone@nowhere.com from_name: someone skip_verify: "true" user: $env{MAILUSER} password: $env{MAILPASSWORD}