developers.redhat.com | Sources for developer.redhat.com
kandi X-RAY | developers.redhat.com Summary
kandi X-RAY | developers.redhat.com Summary
This repository contains the Drupal configuration and code to support the developers.redhat.com website. The developers.redhat.com project operates on the "fork and pull request model". That is you should fork this repository into your own GitHub account and then raise changes on the main repository via pull requests. Any change you raise via a pull request will go through the developers.redhat.com CI process for quality control and must be approved by a core member of the developers.redhat.com team.
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 developers.redhat.com
developers.redhat.com Key Features
developers.redhat.com Examples and Code Snippets
Community Discussions
Trending Discussions on developers.redhat.com
QUESTION
at work I need to make it possible to change the environmet variables at runtime, from an Azure web service, through docker and nginx. I tried this, this and some similar solutions, but I couln't get any of them to work.
I also couldn't find any solution online or any article/thread/post that explained if this is even possible, I only always find the text that vite statically replaces the env variables at build time.
During our CI/CD pipeline vite gets the env variables but our Azure admins want to be able to configure them from Azure, just for the case of it.
Does anyone know if this is possible and or maybe has a solution or some help, please ? :)
...ANSWER
Answered 2022-Jan-07 at 10:59You can set the variables in YAML format and update them accordingly as per your requirement.
Below is the sample YAML format which we use as a template:
QUESTION
I read an article https://developers.redhat.com/articles/2021/07/16/whats-new-fabric8-kubernetes-client-version-550#new_features_in_fabric8_kubernetes_client_5_5_0, it mentioned in 5.5 release it adds "Certification management", however, seem I could not find any source codes related to it in fabric8 repo.
when I run a simple code like this
...ANSWER
Answered 2021-Oct-23 at 07:37You wouldn't find CertManager related features in kubernetes-client
jar itself. All Fabric8 Kubernetes Client Extensions are available via their own individual jars. For CertManager, you need to add this dependency:
Maven:
QUESTION
For a long time I thought that event loop implementation (libuv?) used in Chrome and Node.js used threads. But then I was reading this article on lightweight threads in Java that stated the following:
...instead of creating threads for each concurrent task (and blocking tasks), a dedicated thread (called an event loop) looks through all the tasks that are assigned to threads in a non-reactive model, and processes each of them on the same CPU core.
And the the book Computer Systems. A Programmer’s Perspective in the chapter on concurrent applications states that modern operating systems provide three basic approaches for building concurrent programs (3 approaches to implementing logic flows):
Processes. With this approach, each logical control flow is a process that is scheduled and maintained by the kernel. Since processes have separate virtual address spaces, flows that want to communicate with each other must use some kind of explicit interprocess communication (IPC) mechanism.
I/O multiplexing. This is a form of concurrent programming where applications explicitly schedule their own logical flows in the context of a single process. Logical flows are modeled as state machines that the main program explicitly transitions from state to state as a result of data arriving on file descriptors. Since the program is a single process, all flows share the same address space.
Threads. Threads are logical flows that run in the context of a single process and are scheduled by the kernel. You can think of threads as a hybrid of the other two approaches, scheduled by the kernel like process flows and sharing the same virtual address space like I/O multiplexing flows.
So now I'm wondering now if the event loop falls under I/O multiplexing
logical flow and doesn't use threads?
ANSWER
Answered 2021-Jun-29 at 19:28I have nothing to do with V8 team, but I'll try to answer the question.
First of all, V8 itself has nothing to do with an event loop. Node.js uses libuv to implement the event loop plus abstractions for OS-specific APIs (network, FS, and so on). The event loop itself is run on a single OS thread and most of the network operations are executed on that thread based I/O multiplexing APIs (epoll, kqueue, etc.).
But libuv also has a thread pool to run blocking I/O (e.g. FS, DNS lookups) and CPU intensive operations (e.g. crypto). The thread pool is integrated (communicates) with the event loop through an in-memory queue. When a blocking/CPU intensive task has to be started it's put into the queue and later on one of the threads starts processing it.
So, Node.js uses a number of approaches to achieve concurrency among the user operations: OS threads (BTW this includes the worker_threads
module), I/O multiplexing, multiple processes (with the child_process
module).
V8 also uses a number of OS threads for its own purposes (say, GC), but it doesn't need to be aware of the event loop or provide any abstractions for the OS-level APIs. Its goal is to, well, execute the given JS code and provide a solid embedder API, so that you can build a browser/runtime with it.
QUESTION
I'm trying to write a Rust module which can be called from Python. I'm following this page:
https://developers.redhat.com/blog/2017/11/16/speed-python-using-rust#edit_src_lib_rs
On cargo build --release
I get this error:
= note: LINK : fatal error LNK1181: cannot open input file 'python39.lib'
This has come up before, and this seems the most recent and relevant answer.
I seem to have tried all the possible solutions in that answer, including locating and running vcvars64.bat, as detailed here. No joy.
I have MS Visual Studio (2019) installed, with the C++ and W10 SDK components.
Significantly, this error sometimes does not occur when I don't include the --release
switch. Without it, the program (sometimes) compiles and runs OK. Given that one reason for wanting to make a Rust module is performance, however, I'd like to solve this problem. Also I have now found that this successul building of a "debug" build is a) intermittent and b) partial: when it fails, some of the desired output files are created but not others.
And...
According to the page at the first link, it seems that after build
, I should then be looking for a file ending .so. In a W10 OS I'm looking for a .dll file.
If it builds completely successfully, under target\debug I have myrustlib.d, myrustlib.dll, myrustlib.dll.exp, myrustlib.dll.lib, myrustlib.pdb, pyext_myrustlib.pdb, pyext_myrustlib.d and pyext_myrustlib.exe. None of these, renamed and/or given an .dll extension as applicable, can be successfully imported as a Python module, at least as documented on that page.
I've also found this more recent page for doing the same thing. I get the same 1181 error.
python39.lib
I found out where this is located in my system, under ... Python\Python39\libs. I modified my PATH env var to specifically include this path (and rebooted). Still the same error.
...ANSWER
Answered 2021-Jun-23 at 19:45QUESTION
According to this, I can specify system property KUBECONFIG to tell defaultKubernetesClient to use the specified kubeconfig file instead of the default ~/.kube/config
file.
What should I do that then I'm using fabric8io?
Tks in advance.
ANSWER
Answered 2021-May-18 at 18:09It looks like there is a typo in the blogpost, If I look at Fabric8 code Config.java, property name is kubeconfig
not KUBECONFIG
.
I moved my .kube/config
file to /tmp/mykubeconfig
and then I tested with the following code on minikube and it seemed to be working okay
QUESTION
ANSWER
Answered 2021-Mar-31 at 01:09First, I'd like to say that this changes the behavior of myfunction
. The first version does not insert the integer if the key already exists in the map. The second version replaces the integer with the new value.
That said, In the case where the passed string is not already in the map, and hence it would have made a copy, this could be slightly more efficient. If myfunction
is passed a temporary, the compiler could move construct (or even optimize the move out), and that would then be moved into the map. While std::move
doesn't move anything, using it causes the map::operator[]
to use the rvalue reference overload, which can in turn invoke the move constructor on std::string.
However, in cases where the key already exists, it might cause the creation of an extra copy that's not needed.
QUESTION
I'm testing Hibernate Search 6 multitenancy with Hibernate (referred to this link) and got error message "HSEARCH000520: Hibernate Search encountered failures during bootstrap", with additional detail, "HSEARCH600029: Invalid backend configuration: index 'Users' requires multi-tenancy but no multi-tenancy strategy is set".
I apply to my Users entity. Here is the Users entity class.
...ANSWER
Answered 2021-Feb-22 at 09:13You need to explicitly pick a multi-tenancy strategy in your backend. Just add this property to your persistence.xml
:
QUESTION
I need to configure Keycloak to get a JWT token as in this blog post, but I have to do it with cUrl. They create a client and then update it setting access type
to confidential
, Direct Grant Flow
to direct grant
, and Browser Flow
to browser
. The PUT
request from the web UI that does this has some uuids
that they seem to have pulled out of nowhere. Here is the relevant part of the payload:
ANSWER
Answered 2020-Dec-21 at 07:00The PUT request from the web UI that does this has some uuids that they seem to pull out of nowhere.
Those uuids are generated by keycloak to get them you need to call the endpoint:
QUESTION
I have an Angular app deployed to kubernetes with the kubernetes ingress controller. There is one setup with a single-node cluster and one with a multi-node cluster. The MIME-Type problem occurs with both setups but the single-node can resolve it very quick while on the multi-node the latency is not acceptable.
On the multi-node cluster the Time To First Byte takes about 5 sec for:
- initial call to example.com
- runtime-es2015.js
- polyfills-es2015.js
- appConfig.json (custom config file)
- favicon.ico
- various png/svg files
What works within a normal timeframe are:
- main-es2015.js
- scripts.js
- styles.css
- ng-validate.js
My cluster setup is as following:
- 2 Control-Plane nodes
- 2 Worker nodes
- Cluster networking with canal
- The cluster was setup with RKE (if that matters)
The index.html
in the Angular app contains:
ANSWER
Answered 2020-Oct-11 at 13:45DNS responses are typically cached so in case you do two requests in row and second still has same Time to first Byte
you can scratch out DNS latency. You can verify DNS latency by Wireshark.
Different namespace hardly makes any difference.
You didn't say any details about cloud provider but I assume there is load balancer (possibly offloading SSL decryption) balancing requests between 2 worker node (where ingress listens). You can enable some sort of logging for sure so do that.
Your nginx ingress is keeping access logs too so you can check them kubectl logs -n nginx-ingress
- you'll have to run this on each of your worker node (or each node where ingress pods are located). Inside of these logs you'll find how long it took to nginx to receive response from your Angular App pod.
With combination of Wireshark, load balancer logs, nginx ingress logs and Angular logs (maybe you need to increase logging level for these to see every HTTP request) you should be able to pinpoint where the problem is.
QUESTION
I am working on an application that has a cluster of Artemis servers. Each live server is paired with a backup server for failover. I happened on an article by Bilgin Ibryam, and it has me wondering.
If the clustered live servers are running as containers, and the orchestrator restarts any containers that die, is the failover configuration necessary? The article says "no".
So if I understand correctly, running a cluster of Artemis brokers in an environment that detects and restarts failed brokers will provide the same semantics (and similar availability) as running a cluster where each live server is paired with a backup. Is that right?
...ANSWER
Answered 2020-Nov-02 at 19:53Yes. Running a cluster of ActiveMQ Artemis brokers in an environment that detects and restarts failed brokers will provide the same semantics (and similar availability) as running a cluster where each live server is paired with a backup.
The caveat here is that the data for each broker (i.e. everything in the the broker's data
directory) needs to be "stateful" so that in the event a broker dies it is restarted with the same data. As the article mentions:
For example, in the case of a node failure, Kubernetes would start a broker pod on a different node and make the same PV and data available.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install developers.redhat.com
We use mkcert for creating a local Certificate Authority for local development so that your browser fully trusts https://localhost. Please read the instructions on how to install this for your operating system.
If you intend to write custom PHP code for Drupal or work with our frontend assets, then you may wish to install PHP and NodeJS to support this. At time of writing the supported versions of these are:. We run our production environment using RHEL 7 and Software Collection Libraries (SCL) versions of PHP and NodeJS and this is why we are slightly down-rev on the most recent versions. Please follow instuctions relevant to your operating system to install these tools.
PHP - 7.2.10
NodeJS - 10.10.0
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