• Stars
    star
    123
  • Rank 288,504 (Top 6 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Web Console for the OpenShift Application Platform

OpenShift Management Console

The management console for OpenShift Origin.

Build Status

Contributing

Getting started

  1. Be sure to have a development environment running for OpenShift. See the contributing doc, we recommend the use of oc cluster up.

  2. Install Nodejs and npm

  3. Install grunt-cli and bower by running npm install -g grunt-cli bower (may need to be run with sudo)

  4. Install dev dependencies by running hack/install-deps.sh

  5. Launch the console and start watching for asset changes by running grunt serve. This should open https://localhost:9000/ in your default browser.

    Note: If you see an ENOSPC error, you may need to increase the number of files your user can watch by running this command:

    echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
  6. Accept the self-signed certificate for the web console. (For Chrome on OS X, import server.crt into Keychain Access or accept the web console certificate in Safari.)

Enable / disable console log output

Debug logging can be enabled by opening your browser's JavaScript console, running the commands below, and then refreshing the page.

localStorage["OpenShiftLogLevel.main"] = "<log level>";
localStorage["OpenShiftLogLevel.auth"] = "<log level>";

Loggers:

  • OpenShiftLogLevel.main - default logger for OpenShift
  • OpenShiftLogLevel.auth - auth specific logger, this includes login, logout, and oauth

The supported log levels are:

  • OFF (default for all loggers except main)
  • INFO
  • DEBUG
  • WARN
  • ERROR (default for main)

Note: currently most of our logging either goes to INFO or ERROR

Local configuration

app/config.js is the default configuration file for web console development. If you need to change the configuration, for example, to point to a different API server, copy app/config.js to app/config.local.js and edit the copy. app/config.local.js is not tracked and will be used instead if it exists.

Before opening a pull request

Please configure your editor to use the following settings to avoid common code inconsistencies and dirty diffs:

  • Use soft-tabs set to two spaces.
  • Trim trailing white space on save.
  • Set encoding to UTF-8.
  • Add new line at end of files.

Or configure your editor to utilize .editorconfig, which will apply these settings automatically.

Then:

  1. If needed, run grunt build to update the files under the dist directory
  2. Run the spec tests with grunt test
  3. Run the integrations tests (your api server must be running) grunt test-integration
  4. Rebase and squash changes to a single commit

Note: in order to run the end to end tests you must have Firefox installed.

Production builds

  1. Make sure all dev dependencies are up to date by running hack/install-deps.sh
  2. Run grunt build
  3. TODO - run script to build bindata.go from the dist in this repo
  4. In your origin repo run hack/build-go.sh

The assets served by the OpenShift all-in-one server will now be up to date. By default the assets are served from http://localhost:8091

Debugging dist diff failures

If Jenkins complains that the built dist files are different than the committed version, ensure the committed version is correct:

  1. Run hack/clean-deps.sh
  2. Run hack/install-deps.sh
  3. Run grunt build
  4. If anything under dist or dist.java has changed, add it to your commit and re-push

Contributing to the primary repositories

The web console is currently split into three repositories. The two dependency repos are origin-web-common and origin-web-catalog. To make changes to one of these repositories while working in the web console, it is recommended that you clone down the repository and create a bower link. The following example assumes you clone your forks to ~/git-repos:

# fork the origin-web-console & clone:
$ cd ~/git-repos
$ git clone [email protected]:<your-fork>/origin-web-console.git
# fork origin-web-common & clone:
$ cd ~/git-repos
$ git clone [email protected]:<your-fork>/origin-web-common.git
# fork origin-web-catalog & clone:
$ cd ~/git-repos
$ git clone [email protected]:<your-fork>/origin-web-catalog.git
#
# Now, using bower link you can:
$ cd ~/git-repos/origin-web-common
$ bower link
$ cd ~/git-repos/origin-web-catalog
$ bower link
$ cd ~/git-repos/origin-web-console
$ bower link origin-web-common
$ bower link origin-web-catalog
#
# NOTE:
# When you make changes in the linked repos you will need to rebuild
# as origin-web-console pulls from the /dist.  `grunt build` or `grunt watch`
# should take care of this.

When finished, be sure to hack/clean-deps.sh and hack/install-deps.sh to remove the links & avoid having issues with /dist conflicts the next time you build.

Architecture

The OpenShift v3 web console is based on AngularJS and Hawt.io

Navigation

The v3 console supports a custom context root. When running as part of the openshift start command the console's context root is injected into the <base> tag of the index.html file. In order to support custom context roots, all console URLs must be relative, so they should not contain a leading "/" character.

For example if you want to specify a URL directly in an HTML template to go to the project overview it would look like

<a href="project/foo/overview">

and would actually resolve to be /contextroot/project/foo/overview by the browser. Similarly, if you want to use JavaScript to change the current page location, you should use the $location service from angular like

$location.url("project/foo/overview")

Finally, if you want to reference the root of the web console use the path ./

Extension points

There are two main ways to extend the v3 OpenShift console.

Add primary / secondary navigation tabs to the project nav

We rely on hawtio-core-navigation to build the primary/secondary nav that appears once you are in a project. We have customized the rendering of the tabs, so refer to app/scripts/app.js to see how we register our out of the box tabs.

Inject additional content into the page

We include the hawtio-extension-service. Currently we do not render any extension points, but if there are any locations where you would like to see customizable content, this is how we will add a hook to do that. As hooks are added we will provide a list of them here.

More Repositories

1

origin

Conformance test suite for OpenShift
Go
8,372
star
2

source-to-image

A tool for building artifacts from source and injecting into container images
Go
2,379
star
3

openshift-ansible

Install and config an OpenShift 3.x cluster
Python
2,136
star
4

osin

Golang OAuth2 server library
Go
1,832
star
5

installer

Install an OpenShift 4.x cluster
1,312
star
6

okd

The self-managing, auto-upgrading, Kubernetes distribution for everyone
HCL
1,276
star
7

origin-server

OpenShift 2 (deprecated)
Ruby
885
star
8

openshift-docs

OpenShift 3 and 4 product and community documentation
HTML
687
star
9

microshift

A small form factor OpenShift/Kubernetes optimized for edge computing
Go
528
star
10

geard

geard is no longer maintained - see OpenShift 3 and Kubernetes
Go
407
star
11

hypershift

Hyperscale OpenShift - clusters with hosted control planes
Go
347
star
12

console

OpenShift Cluster Console UI
TypeScript
334
star
13

openshift-ansible-contrib

Additional roles and playbooks for OpenShift installation and management
Python
284
star
14

training

Shell
280
star
15

pipelines-tutorial

A step-by-step tutorial showing OpenShift Pipelines
Shell
272
star
16

jenkins

Shell
260
star
17

release

Release tooling for OpenShift
Shell
229
star
18

ansible-service-broker

Ansible Service Broker
Go
226
star
19

hive

API driven OpenShift cluster provisioning and management
Go
222
star
20

rhc

OpenShift 2 Client Tools (deprecated)
Ruby
220
star
21

machine-config-operator

Go
218
star
22

jenkins-client-plugin

Java
218
star
23

cluster-monitoring-operator

Manage the OpenShift monitoring stack
Go
218
star
24

openshift-restclient-python

Python client for the OpenShift API
Python
205
star
25

library

Examples and Components for deploying into OpenShift
Go
163
star
26

openshift-tools

A public repository of scripts used by OpenShift Operations for various purposes
Python
161
star
27

enhancements

Enhancements tracking repository for OKD
Go
156
star
28

generic-admission-server

A library for writing admission webhooks based on k8s.io/apiserver
Go
153
star
29

oc

The OpenShift Command Line, part of OKD
Go
150
star
30

origin-aggregated-logging

JavaScript
142
star
31

machine-api-operator

Machine API operator
Go
137
star
32

svt

Shell
117
star
33

imagebuilder

Builds Dockerfile using the Docker client (with squashing! and secrets!)
Go
116
star
34

client-go

Go client for OpenShift
Shell
104
star
35

compliance-operator

Operator providing OpenShift cluster compliance checks
Go
100
star
36

telemeter

Prometheus push federation
Go
96
star
37

assisted-service

Go
90
star
38

cluster-network-operator

Create and manage cluster networking configuration
Go
85
star
39

cincinnati

Rust
84
star
40

vagrant-openshift

Ruby
83
star
41

cluster-logging-operator

Operator to support logging subsystem of OpenShift
Go
83
star
42

openshift-pep

Public Project Enhancement Proposals for the OpenShift product. Tracks and maintains high level architectural documents related to future OpenShift changes.
82
star
43

jenkins-plugin

Java
81
star
44

sriov-network-operator

SR-IOV Network Operator
Go
81
star
45

origin-metrics

Shell
78
star
46

openshift-restclient-java

Java
78
star
47

must-gather

A client tool for gathering information about an operator managed component.
Shell
77
star
48

api

Canonical location of the OpenShift API definition.
Go
75
star
49

sdn

Go
73
star
50

cluster-version-operator

Go
72
star
51

library-go

Helpers for going from apis and clients to useful runtime constructs
Go
72
star
52

os

Shell
71
star
53

cluster-etcd-operator

Operator to manage the lifecycle of the etcd members of an OpenShift cluster
Go
70
star
54

cluster-node-tuning-operator

Manage node-level tuning by orchestrating the tuned daemon.
Go
69
star
55

openshift-sdn

Go
69
star
56

openshift-origin-design

Design repository for all things OpenShift
SCSS
68
star
57

autoheal

Autoheals based on monitoring alerts
Go
66
star
58

elasticsearch-operator

Go
66
star
59

cluster-kube-apiserver-operator

The kube-apiserver operator installs and maintains the kube-apiserver on a cluster
Go
65
star
60

oadp-operator

OADP Operator
Go
64
star
61

openshift-java-client

Java Client for the OpenShift REST API
Java
63
star
62

rosa

Go
61
star
63

ovn-kubernetes

Kubernetes integration for OVN
Go
61
star
64

community

Community organizational documentations and process for OKD
61
star
65

federation-dev

Dev preview of federation
Shell
59
star
66

cluster-ingress-operator

The Cluster Ingress Operator manages highly available network ingress for OpenShift
Go
59
star
67

oc-mirror

Lifecycle manager for internet-disconnected OpenShift environments
Go
58
star
68

openshift-client-python

A python library for interacting with OpenShift via the OpenShift client binary.
Python
56
star
69

cincinnati-graph-data

Release node and upgrade edge metadata for Cincinnati graphs.
Python
56
star
70

router

Ingress controller for OpenShift
Go
55
star
71

cluster-image-registry-operator

The image registry operator installs+maintains the internal registry on a cluster
Go
55
star
72

cluster-operator

Go
52
star
73

local-storage-operator

Operator for local storage
Go
51
star
74

tektoncd-pipeline-operator

tektoncd-pipeline operator for Kubernetes to manage installation, updation and uninstallation of tekton-cd pipelines.
Go
51
star
75

pipelines-catalog

A repository for OpenShift Pipelines tasks
Python
50
star
76

openshift-azure

Azure Red Hat Openshift
Go
49
star
77

cloud-credential-operator

Manage cloud provider credentials as Kubernetes CRDs
Go
48
star
78

assisted-installer

Go
48
star
79

verification-tests

Blackbox test suite for OpenShift.
Gherkin
47
star
80

community.okd

OKD/Openshift collection for Ansible
Python
45
star
81

service-idler

A controller for idling and unidling groups of scalable Kubernetes resources
Go
44
star
82

ruby-hello-world

Hello world ruby sample for OpenShift v3
Ruby
44
star
83

managed-cluster-config

Static deployable artifacts for managed OSD clusters
HTML
42
star
84

cluster-authentication-operator

OpenShift operator for the top level Authentication and OAuth configs.
Go
41
star
85

image-registry

OpenShift cluster image registry
Go
40
star
86

console-operator

The console operator installs and maintains the web console on a cluster
Go
38
star
87

sriov-cni

An SRIOV CNI plugin
Go
38
star
88

openshift-extras

Unofficial tools for use with OpenShift
Ruby
38
star
89

runbooks

Runbooks for Alerts on OCP
Shell
37
star
90

cluster-kube-controller-manager-operator

The kube-controller-manager operator installs and maintains the kube-controller-manager on a cluster
Go
37
star
91

cluster-kube-descheduler-operator

An operator to run descheduler on OpenShift.
Go
37
star
92

assisted-test-infra

Python
36
star
93

windows-machine-config-operator

Windows MCO for OpenShift that handles addition of Windows nodes to the cluster
Go
36
star
94

insights-operator

Go
36
star
95

service-ca-operator

Controller to mint and manage serving certificates for Kubernetes services
Go
36
star
96

openshift-jee-sample

A sample app to be deployed on openshift environments
HTML
35
star
97

cluster-autoscaler-operator

Manage Kubernetes cluster-autoscaler deployments
Go
35
star
98

certman-operator

Operator to Manage Let's Encrypt certificates for OpenShift Clusters
Go
35
star
99

python-interface

Python
35
star
100

cluster-dns-operator

The Cluster DNS Operator manages cluster DNS services for OpenShift
Go
35
star