How to get install path in YAML - kubernetes

I installed keycloak in Redhat openshift and the yaml file link is below:
https://raw.githubusercontent.com/keycloak/keycloak-quickstarts/latest/openshift-examples/keycloak.yaml
what I am confused is that I can not find the full path where the keycloak installed in pod.
Can anyone help me out to explain where it config it the yaml?

Please have a look at the keycloak image manifest to get more details on where exactly the keycloak is getting installed within container.
https://quay.io/repository/keycloak/keycloak/manifest/sha256:64fb81886fde61dee55091e6033481fa5ccdac62ae30a4fd29b54eb5e97df6a9
As per what i see from manifest JBOSS_HOME points to below location in manifest
JBOSS_HOME=/opt/jboss/keycloak
Also, i think you are trying to find the install location in the yaml file but there is no reference to install path in yaml file using env variables as far as i could see which might override the location defined in the Docker image file. Hope this helps

Related

unable to import a grafana dashboard from json file using the kube-prometheus-stack helm chart

I am playing around with the kube-prometheus-stack and stumbled upon an issue which I am not sure how to approach to fix.
looking at the comfigmap-dashboards.yaml (https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/templates/grafana/configmap-dashboards.yaml)
It seems that if I put the .json files for the different custom dashboards inside the folder dashboards-1.14, it will be automatically picked up and the config maps would be automatically created based on the number pf the json files present in the folder.
I have double checked values for the grafana enabled and grafana defaultdahsboardenable to be true.
But when I run the helm template command, I am not getting the config map/maps generated.
I am trying to understand what am I doing wrong here.
Please note, if I create a configmap with the json content pasted in it and put the configmap in the dashboards-1.14 folder I am getting the configmap while I run the helm template command. But my understanding is that we need not write the configmap as it should be automatically generated from configmap-dashboard (the link that I pasted above)
Put your .json files into a new folder kube-prometheus-stack/dashboards-1.14, not into the existing one kube-prometheus-stack/templates/grafana/dashboards-1.14

How to add / copy a custom jar file into KafkaMirrorMaker?

I'm developing some custom topic name mapping and a jar file has been produced out of it.
And since I'm using MirrorMaker v1, these variables have also been added KAFKA_MIRRORMAKER_MESSAGE_HANDLER and KAFKA_MIRRORMAKER_MESSAGE_HANDLER_ARGS inside the KafkaMirrorMaker yaml file.
But I don't know how to physically add this custom jar file into the KafkaMirrorMaker pod. I have checked the CRD of the KafkaMirrorMaker but can't find any clue yet.
So, is there a way to let KafkaMirrorMaker download some file(s) / artifact(s) and include the jar file(s) into the classpath so that the custom MessageHandler can find it?
The helm install command is used to deploy the Mirror Maker. The apiVersion of the KafkaMirrorMaker I'm using currently: kafka.strimzi.io/v1beta2
Based on the strimzi tag, I assume you use Strimzi's Mirror Maker v1? To add your own JAR, you would need to build a custom container image.
You could modify the Strimzi project sources and build everything from scratch (you can add your JAR as a dependency into the 3rd party libs in `docker-images/kafka/...). But that is rather complicated as you build the whole project.
The easiest way is to just write your own Dockerfile and use the existing Strimzi image as a base image. For example:
FROM quay.io/strimzi/kafka:0.26.0-kafka-3.0.0
USER root:root
COPY ./my-jar.jar /opt/kafka/libs/my-jar.jar
USER 1001
You can build this Dockerfile and push it into your own Docker registry (Docker Hub, Quay, whetever you use). You should make sure the FROM uses the right image based on the Strimzi version you use and KAfka version you use.
And once you have it, you have to tell Strimzi to use this image. You can do that either using the .spec.image option in the KafkaMirrorMaker custom resource. Or you can just change the environment variable STRIMZI_KAFKA_MIRROR_MAKER_IMAGES in the Strimzi Cluster Operator deployment and update the images which should be used there.

Why is the gcloud sdk's deploy command looking at my home directory for files?

I'm attempting to deploy a python server to Google App Engine.
I'm trying to use the gcloud sdk to do so.
It appears the command I need to use is gcloud app deploy.
I get the following error:
me#mymachine:~/development/some-app/backend$ gcloud app deploy
ERROR: (gcloud.app.deploy) Error Response: [3] The directory [~/.config/google-chrome/Default/Cache] has too many files (greater than 1000).
I had to add ~/.config to my .gcloudignore to get past this error.
Why was it looking there at all?
The full repo of my project is public but I believe I've included the relevant portion.
I looked at your linked repo and there aren't any yaml files. As far as I know, a GAE project needs an app.yaml file because that file tells GAE what your runtime is so that GAE knows how to deploy/run your code. In fact, according to the gcloud app deploy documentation, if you don't specify any yaml files to be deployed, it will default to app.yaml in the current directory. If it can't find any in the current directory, it will try to build one.
Your repo also shows you have a Dockerfile. GAE documentation for custom runtimes says ...Custom runtimes let you build apps that run in an environment defined by a Dockerfile... In the app.yaml file for custom runtimes, you will have the following entry
runtime: custom
env: flex
Since you don't have an app.yaml file and you have a Docker file in which you are downloading and installing Chrome, it seems to me that gcloud app deploy is trying to infer your runtime and this has led to it executing some or all of the contents of the Dockerfile before it attempts to then push it to Production. This is what is making it take a peek at the config file on your local machine till you explicitly tell it to ignore it. To be clear, I'm not 100% sure of this, just trying to see if I can draw a logical conclusion.
My suggestion would be to create an app.yaml file and specify a custom runtime. Or just use the python runtime with flex

Scripting in Grafana

I am a beginner in Grafana and I am trying to go through all the tutorial and documentation from Grafana.net, however, I am having trouble learning how to do scripted dashboard on Grafana, there is a documentation page on the site but it is very brief and I do not know how to proceed. Could anyone share with me a useful site for learning how to build scripted Dashboard on Grafana (especially using InfluxDB as the DB server).
As per my understanding :
In the folder grafana install folder under public/dashboards/ there is a file named scripted.js
you have to modify scripted.js file.
In Brief :
First you need to install GRAFANA (centos or ubuntu anything)
then Configure the grafana Example
path : /etc/yum.repos.d/grafana.repo
configuration and installation link :
http://docs.grafana.org/installation/rpm/
now you can check your grafana related file using grep or find commands and check required path.
then
In the folder grafana install folder under public/dashboards/ there is a file named scripted.js
you have to modify scripted.js file.
You can take help of below given site :
https://github.com/grafana/grafana/blob/master/docs/sources/reference/scripting.md

Installing Grafana Panel Plugin

I am attempting to install the piechart plugin on my Grafana v2.5 environment and no matter what I do the panel does now show as an option in the UI. I cloned the repository to /var/lib/grafana/plugins as documented and restarted the grafana-server service and that did not work. I also tried putting the plugin in a separate directory and referencing it as:
[plugin.piechart]
path = /home/usr/share/grafana/panel-plugin-piechart
I made sure that the grafana service has ownership of the plugin directory, and checked the grafana logs but it did not have useful information.
https://github.com/grafana/panel-plugin-piechart
You will need Grafana master based on the release date of the plugin.
Confirmed here - https://groups.io/g/grafana/message/1181
You definitely need to upgrade your Grafana. This is very seamless operation - just install a new package on top of the old one. You can back up through copy /var/lib/grafana/grafana.db for safety before doing that.
Check the permission of the files in plugins directory,
all the files of the plugin should be in its directory, i.e. every plugin should be contained its own directory
if the plugins directory has any package.json file or webpack.config.js available outside then also your plugins will fail to load.
the above mentioned files are part of every panel plugins and should only exist in their respective directories.
execute "chown" and set the owner to grafana:grafana group:user
(by default root is the owner of the files and directories.)
Are you running Grafana as a standalone service or in a docker container?
If running as a service directly you can visit the Grafana community page and find the plugin installation instructions from there.
https://grafana.com/grafana/plugins/grafana-piechart-panel
(Verified on Grafana version 6.x.x & 7)
If running within a dockerized service you need to copy the plugin in your workspace and specify the directory within the docker image so it can locate the plugin from there. You can do this by using the environment variables and mention these within a docker-compose file
GF_PATHS_PLUGINS /var/lib/grafana/plugins
https://grafana.com/docs/grafana/latest/installation/configure-docker/
I have been able to work with both these options