Giter Club home page Giter Club logo

origin-web-console-server's Introduction

OpenShift Web Console Server

The API server for the OpenShift web console, part of the OpenShift application platform.

Build Status

The web console server runs as a pod on the platform. The OpenShift master proxies requests from the web console context root, typically /console/, to the server running in the pod. The pod then serves the static HTML, JavaScript, and CSS files that make up the console.

The web console assets themselves are developed in the origin-web-console repository. They are included in the web console server binary using go-bindata.

Building

To build the binary, run

$ make

To build the RPM and origin-web-console image, run

$ OS_BUILD_ENV_PRESERVE=_output/local/bin hack/env make build-images

Installing the Console

If you use openshift-ansible or run oc cluster up, the console will be installed for you. If you start OpenShift another way, you'll need to install the console template.

Clone the origin repository and edit the file install/origin-web-console/console-config.yaml for your cluster. Then run the commands:

$ oc login -u system:admin
$ oc create namespace openshift-web-console
$ oc process -f install/origin-web-console/console-template.yaml -p "API_SERVER_CONFIG=$(cat install/origin-web-console/console-config.yaml)" | oc apply -n openshift-web-console -f -

Updating Go Tooling

See https://github.com/openshift/release/tree/master/tools/hack/golang for instructions on how to update the Go tooling used by this project.

Vendoring origin-web-console

A Jenkins job automatically vendors the dist files from origin-web-console into this repository periodically. Typically you don't need to manually vendor the console dist, but you might want to build an origin-web-console image with changes that haven't merged.

To vendor the console manually, run grunt build in the origin-web-console repo to build the dist files with your changes, then run make vendor-console to vendor. For example:

$ GIT_REF=master CONSOLE_REPO_PATH=$HOME/git/origin-web-console COMMIT=1 make vendor-console

origin-web-console-server's People

Contributors

deads2k avatar jwforres avatar openshift-merge-robot avatar smarterclayton avatar spadgett avatar tbielawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

origin-web-console-server's Issues

Console pod CrashLoopBackOff: 'secrets "webconsole-serving-cert" not found'

I used the AWS playbooks located here to set up an openshift cluster; I just installed the master node and wanted to make sure everything is running fine. The external master ELB leads to the error message detailed in this issue.
I therefore tried to install the console from the template linked in this repo's README.

Used configuration file:

apiVersion: webconsole.config.openshift.io/v1
kind: WebConsoleConfiguration
clusterInfo:
  consolePublicURL: https://ec****.eu-central-1.compute.amazonaws.com:8443/console/
  loggingPublicURL: ""
  logoutPublicURL: ""
  masterPublicURL: https://ec****.eu-central-1.compute.amazonaws.com:8443
  metricsPublicURL: ""
extensions:
  scriptURLs: []
  stylesheetURLs: []
  properties: null
features:
  inactivityTimeoutMinutes: 0
  clusterResourceOverridesEnabled: false
servingInfo:
  bindAddress: 0.0.0.0:8443
  bindNetwork: tcp4
  certFile: /root/certs/tls.crt
  clientCA: ""
  keyFile: /root/certs/tls.key
  maxRequestsInFlight: 0
  namedCertificates: null
  requestTimeoutSeconds: 0

It's difficult to get a clear error message from the pod, it apparently just prints the config file when I do 'oc logs -f '.
Event log:

Events:
  Type     Reason                 Age                 From                                                     Message
  ----     ------                 ----                ----                                                     -------
  Normal   Scheduled              28m                 default-scheduler                                        Successfully assigned webconsole-5d4cfd95db-7m49z to ip-****.eu-central-1.compute.internal
  Normal   SuccessfulMountVolume  28m                 kubelet, ip-****.eu-central-1.compute.internal  MountVolume.SetUp succeeded for volume "webconsole-config"
  Normal   SuccessfulMountVolume  28m                 kubelet, ip-****.eu-central-1.compute.internal  MountVolume.SetUp succeeded for volume "webconsole-token-2spzk"
  Warning  FailedMount            28m                 kubelet, ip-****.eu-central-1.compute.internal  MountVolume.SetUp failed for volume "serving-cert" : secrets "webconsole-serving-cert" not found
  Normal   SuccessfulMountVolume  28m                 kubelet, ip-****.eu-central-1.compute.internal  MountVolume.SetUp succeeded for volume "serving-cert"
  Normal   Created                28m (x4 over 28m)   kubelet, ip-****.eu-central-1.compute.internal  Created container
  Normal   Started                28m (x4 over 28m)   kubelet, ip-****.eu-central-1.compute.internal  Started container
  Normal   Pulled                 27m (x5 over 28m)   kubelet, ip-****.eu-central-1.compute.internal  Container image "openshift/origin-web-console:latest" already present on machine
  Warning  BackOff                3m (x119 over 28m)  kubelet, ip-****.eu-central-1.compute.internal  Back-off restarting failed container

Why is there no clearer documentation on this? It's a pretty big change from earlier versions (the console not coming with the master by default anymore).

Build image path is hard code to /go/

It always looking for the path /go/github.com/... when I'm trying to build images. As I understand golang working path should be /xx/src/xx. Then I found variable in hack/lib/constants.sh is set to a static path which is readonly OS_BUILD_ENV_WORKINGDIR="/go/${OS_GO_PACKAGE}". Would it be make more sense to use GOPATH like readonly OS_BUILD_ENV_WORKINGDIR="${GOPATH}/src/${OS_GO_PACKAGE}"

Infinite loop if we change the URL of the consolePublicURL and MAsterPublicURL to use the route address

When we create an Openshift route to expose the WebConsole, in order to resolve the address using an external DNS, as such

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app: openshift-web-console
  name: admin
  namespace: openshift-web-console
spec:
  host: admin-openshift-web-console.192.168.99.50.nip.io
  port:
    targetPort: https
  tls:
    termination: passthrough
  to:
    kind: Service
    name: webconsole
    weight: 100
  wildcardPolicy: None

next reconfigure the configMap of the webconsole to use the Route Address

oc get configmap/webconsole-config -o yaml
apiVersion: v1
data:
  webconsole-config.yaml: |
    apiVersion: webconsole.config.openshift.io/v1
    clusterInfo:
      consolePublicURL: https://admin-openshift-web-console.192.168.99.50.nip.io/console/
      loggingPublicURL: ''
      logoutPublicURL: ''
      masterPublicURL: https://admin-openshift-web-console.192.168.99.50.nip.io
      metricsPublicURL: ''
    extensions:
      properties: {}
      scriptURLs: []
      stylesheetURLs: []
    features:
      clusterResourceOverridesEnabled: false
      inactivityTimeoutMinutes: 0
    kind: WebConsoleConfiguration
    servingInfo:
      bindAddress: 0.0.0.0:8443
      bindNetwork: tcp4
      certFile: /var/serving-cert/tls.crt
      clientCA: ''
      keyFile: /var/serving-cert/tls.key
      maxRequestsInFlight: 0
      namedCertificates: null
      requestTimeoutSeconds: 0
kind: ConfigMap

modify the Oauthclient resource

[root@cloud ~]# oc get OAuthClient/openshift-web-console -o yaml
apiVersion: oauth.openshift.io/v1
grantMethod: auto
kind: OAuthClient
metadata:
  name: openshift-web-console
redirectURIs:
- https://admin-openshift-web-console.192.168.99.50.nip.io/console

and recreate a new pod

oc scale --replicas=0 deploy/webconsole
oc scale --replicas=1 deploy/webconsole

Then, when we access the web console, the screen is looping continusouly

screenshot 2018-05-18 10 10 56

and the log of the webconsole's pod reports this error

W0518 08:10:08.940019       1 start.go:93] Warning: config.clusterInfo.loggingPublicURL: Invalid value: "": required to view aggregated container logs in the console, web console start will continue.
--
  | W0518 08:10:08.940336       1 start.go:93] Warning: config.clusterInfo.metricsPublicURL: Invalid value: "": required to view cluster metrics in the console, web console start will continue.
  | I0518 08:10:09.256195       1 start.go:201] OpenShift Web Console Version: v3.9.0+b600d46-dirty
  | I0518 08:10:09.256502       1 serve.go:89] Serving securely on 0.0.0.0:8443
  | I0518 08:10:19.139673       1 logs.go:41] http2: server: error reading preface from client 10.128.0.1:33750: read tcp4 10.128.0.17:8443->10.128.0.1:33750: read: connection reset by peer
  | I0518 08:10:19.342687       1 logs.go:41] http2: server: error reading preface from client 10.128.0.1:33754: read tcp4 10.128.0.17:8443->10.128.0.1:33754: read: connection reset by peer
  | I0518 08:10:19.704623       1 logs.go:41] http2: server: error reading preface from client 10.128.0.1:33746: read tcp4 10.128.0.17:8443->10.128.0.1:33746: read: connection reset by peer
  | I0518 08:10:37.052718       1 logs.go:41] http2: server: error reading preface from client 10.128.0.1:33796: read tcp4 10.128.0.17:8443->10.128.0.1:33796: read: connection reset by peer

Web Console - Javascript reports API discovery error

screenshot 2018-05-18 10 33 30

docker file integrity checksum failed for "usr/share/licenses/origin-web-console-3.10.0/LICENSE"

Issue

Is there an issue with the docker image 3.10 as I get this error when I try to save it ?

docker save docker.io/openshift/origin-web-console:v3.10  > ./okd-v3.10.tar
Error response from daemon: file integrity checksum failed for "usr/share/licenses/origin-web-console-3.10.0/LICENSE"

docker images | grep web-console
docker.io/openshift/origin-web-console                          v3.10               7098d8b0a928        2 months ago        337 MB

Info about docker

docker info
Containers: 35
 Running: 0
 Paused: 0
 Stopped: 35
Images: 29
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc docker-runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: 5eda6f6fd0c2884c2c8e78a6e7119e8d0ecedb77 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: You're not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
 selinux
Kernel Version: 3.10.0-693.17.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 2
Total Memory: 4.569 GiB
Name: cloud
ID: J5BB:VC5U:Y43J:XZY6:IDRB:4F2C:Z4SV:KTYO:S3NI:MNLS:QWEU:FL5Q
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 172.30.0.0/16
 127.0.0.0/8
Live Restore Enabled: false
Registries: docker.io (secure)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.