openshift | Teiid on OpenShift demo | Cloud library
kandi X-RAY | openshift Summary
kandi X-RAY | openshift Summary
Two web applications are deployed with the Teiid OpenShift installation:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of openshift
openshift Key Features
openshift Examples and Code Snippets
Community Discussions
Trending Discussions on openshift
QUESTION
There is a Java 11 (SpringBoot 2.5.1) application with simple workflow:
- Upload archives (as multipart files with size 50-100 Mb each)
- Unpack them in memory
- Send each unpacked file as a message to a queue via JMS
When I run the app locally java -jar app.jar
its memory usage (in VisualVM) looks like a saw: high peaks (~ 400 Mb) over a stable baseline (~ 100 Mb).
When I run the same app in a Docker container memory consumption grows up to 700 Mb and higher until an OutOfMemoryError. It appears that GC does not work at all. Even when memory options are present (java -Xms400m -Xmx400m -jar app.jar
) the container seems to completely ignore them still consuming much more memory.
So the behavior in the container and in OS are dramatically different.
I tried this Docker image in DockerDesktop Windows 10
and in OpenShift 4.6
and got two similar pictures for the memory usage.
Dockerfile
...ANSWER
Answered 2021-Jun-13 at 03:31In Java 11, you can find out the flags that have been passed to the JVM and the "ergonomic" ones that have been set by the JVM by adding -XX:+PrintCommandLineFlags
to the JVM options.
That should tell you if the container you are using is overriding the flags you have given.
Having said that, its is (IMO) unlikely that the container is what is overriding the parameters.
It is not unusual for a JVM to use more memory that the -Xmx
option says. The explanation is that that option only controls the size of the Java heap. A JVM consumes a lot of memory that is not part of the Java heap; e.g. the executable and native libraries, the native heap, metaspace, off-heap memory allocations, stack frames, mapped files, and so on. Depending on your application, this could easily exceed 300MB.
Secondly, OOMEs are not necessarily caused by running out of heap space. Check what the "reason" string says.
Finally, this could be a difference in your app's memory utilization in a containerized environment versus when you run it locally.
QUESTION
I have a container with IBM MQ (Docker image ibmcom/mq/9.2.2.0-r1
) exposing two ports (9443 - admin, 1414 - application).
All required setup in OpenShift is done (Pod, Service, Routes).
There are two routes, one for each port.
pointing to the ports accordingly (external ports are default http=80, https=443).
Admin console is accessible through the first route, hence, MQ is up and running.
I tried to connect as a client (JMS 2.0, com.ibm.mq.allclient:9.2.2.0
) using standard approach:
ANSWER
Answered 2021-Jun-12 at 11:32I'm not sure to fully understand your setup, but"Routes"
only route HTTP traffic (On ports 80 or 443 onyl), not TCP traffic.
If you want to access your MQ server from outside the cluster, there are a few solutions, one is to create a service of type: "NodePort"
Your Service is not a NodePort Service. In your case, it should be something like
QUESTION
Story: in my java code i have a few ScheduledFuture's that i need to run everyday on specific time (15:00 for example), the only available thing that i have is database, my current application and openshift with multiple pods. I can't move this code out of my application and must run it from there.
Problem: ScheduledFuture works on every pod, but i need to run it only once a day. I have a few ideas, but i don't know how to implement them.
Idea #1: Set environment variable to specific pod, then i will be able to check if this variable exists (and its value), read it and run schedule task if required. I know that i have a risk of hovered pods, but that's better not to run scheduled task at all than to run it multiple times.
Idea #2: Determine a leader pod somehow, this seems to be a bad idea in my case since it always have "split-brain" problem.
Idea #3 (a bit offtopic): Create my own synchronization algorithm thru database. To be fair, it's the simplest way to me since i'm a programmer and not SRE. I understand that this is not the best one tho.
Idea #4 (a bit offtopic): Just use quartz schedule library. I personally don't really like that and would prefer one of the first two ideas (if i will able to implement them), but at the moment it seems like my only valid choice.
UPD. May be you have some other suggestions or a warning that i shouldn't ever do that?
...ANSWER
Answered 2021-May-30 at 11:20You can create cron job using openshift https://docs.openshift.com/container-platform/4.7/nodes/jobs/nodes-nodes-jobs.html and have this job trigger some endpoint in you application that will invoke your logic.
QUESTION
Is it possible via EFS provisioner to create PVC mounting to specific directory in the EFS. Current behaviour of the provisioner is that every time we use the storage class aws-efs it creates new sub directory in the EFS and pod was not able to see the existing directory in the EFS
EFS provisioner setup is inherited from this https://docs.openshift.com/container-platform/4.2/storage/persistent_storage/persistent-storage-efs.html
...ANSWER
Answered 2021-Jun-07 at 20:48Solved by manually creating PVC and PV specifying existing EFS directory, storage class, nfs endpoint
QUESTION
I want to add the download and installation step of OpenShift CLI 4.6 on a docker file. I have added the following lines but it's not working.
...ANSWER
Answered 2021-Jun-07 at 10:09curl -L https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz | tar xz
will extract the files in the tarball, so finally, the files in that folder would be next:
QUESTION
I have a spring boot 2.5 application with spring spring security 5 where I am using embedded hazelcast cache to back spring sessions. This application is deployed on openshift with two pods where same application is running, hence I have used hazelcast kubernetes plugin for service discovery. Everything is working as expected. However, I can see application logs are flooded with below log lines. Any suggestion what is wrong with the hazelcast configuration ? Why so many log lines are generated ?
Generated logs
10.1.8.58 is IP address of second pod which joined cluster later and logs are printed in this pod only.
...ANSWER
Answered 2021-Jun-07 at 07:29The exception you get SplitBrainMergeValidationOp
means that the Hazelcast cluster might have been started in the split-brain and later tries to merge into one cluster. Could you check if you follow all the Hazelcast Kubernetes recommendations?
Especially, check if you use StatefulSet (not Deployment). In the case of DNS Lookup discovery, using Deployment may cause Hazelcast to start in the split-brain mode.
QUESTION
I have created a custom nginx.conf file with simple proxy and I have put it in the root of my project.
nginx.conf
...ANSWER
Answered 2021-Jun-04 at 12:16After A LOT of trial and error I have finally managed to make this work. First of all change image inside Dockerfile from: nginxinc/nginx-unprivileged to nginx:alpine
Second, give the right privileges to the user inside the openshift. Run :
QUESTION
I am trying to implement flask-healthz (https://pypi.org/project/flask-healthz/) for my python application to get return on liveness and rediness probes. But somehow it doesn't work for me. Below is my code snippet :
...ANSWER
Answered 2021-Jun-02 at 03:00Assuming this is a copy-paste from the documentation, here is what you can change to make it work.
flat app.py
:
QUESTION
I have an OpenShift/Tekton pipeline which in Task A
deploys an application to a test environment. In Task B
, the application's test suite is run. If all tests pass, then the application is deployed to another environment in Task C
.
The problem is that Task A
's pod is deployed (with oc apply -f
), and before the pod is actually ready to receive requests, Task B
starts running the test suite, and all the tests fail (because it can't reach the endpoints defined in the test cases).
Is there an elegant way to make sure the pod from Task A
is ready to receive requests, before starting the execution of Task B
? One solution I have seen is to do HTTP GET requests against a health endpoint until you get a HTTP 200 response. We have quite a few applications which do not expose HTTP endpoints, so is there a more "generic" way to make sure the pod is ready? Can I for example query for a specific record in Task A
's log? There is a log statement which always shows when the pod is ready to receive traffic.
If it's of any interest, here is the definition for Task A
:
ANSWER
Answered 2021-May-27 at 16:47After your step that do oc apply
, you can add a step to wait for the deployment to become "available". This is for kubectl
but should work the same way with oc
:
QUESTION
I have a turbine server running on openshift 3 and deployed a donet core 3.1 c# microservice using steeltoe 3.0.2 circuit breaker libraries. I can monitor the microservice stream on hystrix dashboard through service stream url (/hystrix/hystrix.stream). What I want to do is to register the microservice hystrix event stream to the turbine server event stream. Does anyone know how to do this? any reference link will be a great help also.
Update: project references and setup files configuration
myproject.csproj:
...ANSWER
Answered 2021-May-27 at 14:42This error message is telling us that HystrixConfigurationStream
hasn't been registered with the service container. That can be added with this code in startup.cs:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install openshift
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page