openshift

docker persistent storage for openshift cluster

房东的猫 提交于 2021-01-29 15:00:31
问题 while trying to install openshift 3.11 ( okd ) , they ask to setup a persistent storage for each node because it's needed for the container deamon and for etcd/web console container for master nodes. You must configure storage for all master and node hosts because by default each system runs a container daemon. For containerized installations, you need storage on masters. Also, by default, the web console and etcd, which require storage, run in containers on masters. Containers run on nodes,

Open shift - JWS - Tomcat 8 redirect base url to application war

前提是你 提交于 2021-01-29 08:50:52
问题 I am using tomcat in JWS 3-1. I have application war "myapp.war" in /opt/webserver/webapps Now my url is domain.com/myapp I want domain.com to also redirect to myapp I was trying to follow the following link. Tomcat base URL redirection. There is no ROOT folder in /opt/webserver/webapps. It doesn't seem to work. Can anyone suggest I should look in which direction? 回答1: If there is no separate Root folder then can deploy a ROOT.war in parallel to the application war. In Root.war we can add an

Spring Boot Application using Keycloak, single sign on doesn't work behind an Apache Web Server

本小妞迷上赌 提交于 2021-01-29 07:40:30
问题 I have a Spring Boot + Spring Security application with RedhatSSO (Keycloak) as OIDC provider. This application is deployed on Openshift which assings it a route like this: http://my-app.cloud.mycompany.com/ . The application has this context path: /my-app . When I access a protected resource using the application's Openshift route address, http://my-app.cloud.mycompany.com/my-app/someProtectedResource , I am redirected to the Keycloak login page https://sso.mycompany.com where I login and I

Spring Boot Application using Keycloak, single sign on doesn't work behind an Apache Web Server

眉间皱痕 提交于 2021-01-29 07:31:37
问题 I have a Spring Boot + Spring Security application with RedhatSSO (Keycloak) as OIDC provider. This application is deployed on Openshift which assings it a route like this: http://my-app.cloud.mycompany.com/ . The application has this context path: /my-app . When I access a protected resource using the application's Openshift route address, http://my-app.cloud.mycompany.com/my-app/someProtectedResource , I am redirected to the Keycloak login page https://sso.mycompany.com where I login and I

org.openqa.selenium.os.UnixProcess checkForError - Selenium doesn't work over jenkins (openshift linux - chrome slave)

情到浓时终转凉″ 提交于 2021-01-28 13:00:40
问题 Selenium code works my local. However it doesn't work over jenkins because of server connection error regarding to jenkins console output. Jenkins has openshift structure and chrome slave. I've set the configuration that selenium would work on chrome node. I've also written the selenium codes as bdd (cucumber). This is how webDriver is initialized: ChromeOptions options = new ChromeOptions(); System.setProperty("webdriver.chrome.driver","/usr/bin/google-chrome"); options.addArguments("-

Ansible, k8s and variables

◇◆丶佛笑我妖孽 提交于 2021-01-28 11:43:05
问题 I'm using Ansible and the k8s module for deploying applications to an OpenShift cluster. In general this is working really well. However, when I try to set the port value, in a deployment config, using a value from a variable, things are not so happy. I have the following ansible task as an example: - name: Create app service k8s: name: "{{ name | lower }}" state: present definition: apiVersion: v1 kind: Service metadata: annotations: labels: app: "{{ name | lower }}" name: "{{ name | lower }

Access OpenShift forwarded ports from remote host

浪尽此生 提交于 2021-01-28 11:05:43
问题 I would like to connect to a PostgreSQL (9.6) cluster that runs inside OpenShift (3.9) using port forwarding as described here. To this end I set up and sanity-check port forwarding on a jump host (outside the OpenShift cluster) like this: oc port-forward $pod 5432:5432 netstat -ln | grep 5432 # "tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN" psql -U postgres -h localhost # OK psql -U postgres -h $(hostname -i) # error: "connection refused" So it looks as if port forwarding listens only for

Write permissions on volume mount with OpenShift

被刻印的时光 ゝ 提交于 2021-01-28 09:13:34
问题 Using OpenShift 3.11, I've mounted an nfs persistent volume, but the application cannot copy into the new volume, saying: oc logs my-project-77858bc694-6kbm6 cp: cannot create regular file '/config/dbdata/resdb.lock.db': Permission denied ... I've tried to change the ownership of the folder by doing a chown in an InitContainers, but it tells me the operation not permitted. initContainers: - name: chowner image: alpine:latest command: ["/bin/sh", "-c"] args: - ls -alt /config/dbdata; chown

How to pass arguments to Docker container in Kubernetes or OpenShift through command line?

拈花ヽ惹草 提交于 2021-01-28 04:22:25
问题 I have a bash script in a Docker image to which I can pass a command line argument through docker run (having specified the bash script in ENTRYPOINT and a default parameter in CMD like in this answer). So I would run something like docker run my_docker_test argument_1 Now I would like to deploy multiple (ca. 50) containers to OpenShift or Kubernetes, each with a different value of the argument. I understand that in Kubernetes I could specify the command and args in the object configuration

Ansible K8s module: Failed to import the required Python library (openshift) on Python /usr/bin/python3

情到浓时终转凉″ 提交于 2021-01-28 03:10:56
问题 The env Ansible 2.9.6 (python3) Tried to run a simple playbook - hosts: master gather_facts: no become: yes tasks: - name: create name space k8s: name: testing api_version: v1 kind: Namespace state: present Getting following error The full traceback is: Traceback (most recent call last): File "/tmp/ansible_k8s_payload_u121g92v/ansible_k8s_payload.zip/ansible/module_utils/k8s/common.py", line 33, in <module> import kubernetes ModuleNotFoundError: No module named 'kubernetes' fatal: [192.168.20