NOTE: This application is being deprecated and will be set into read-only archive mode on 1 December 2019
The Oshinko console extensions in OpenShift Origin.
- Install Nodejs and npm
- Install grunt-cli and bower by running
npm install -g grunt-cli bower
(may need to be run with sudo) - Install ruby
- Install bundler
gem install bundler
- Run
sudo npm install
&bower install
- Build the code via
grunt build
for minified files or withgrunt dev
- Spin-up a server (TLS enabled) to host the files located in the dist directory. If you're unsure on how to do this, see below for a tip.
- Login as system:admin and change to the openshift-web-console project.
Modify the webconsole-config configmap
oc edit configmap webconsole-config
to point to the URL where your files are hosted.
assetConfig:
...
extensionScripts:
- /<path to>https://yourserver.org/dist/scripts/templates.js
- /<path to>https://yourserver.org/dist/scripts/scripts.js
extensionStylesheets:
- /<path to>https://yourserver.org/dist/styles/oshinko.css
...
- Trigger a restart of the webconsole by deleting the only pod in the openshift-web-console project. The console will be restarted.
- Start Cluster
oc cluster up --public-hostname=<your IP>
- Spin-up a server (TLS enabled) to host the files located in the dist directory. If you're unsure on how to do this, see below for a tip.
- Login as system:admin and change to the openshift-web-console project.
Modify the webconsole-config configmap
oc edit configmap webconsole-config
to point to the URL where your files are hosted.
assetConfig:
...
extensionScripts:
- /<path to>https://yourserver.org/dist/scripts/templates.js
- /<path to>https://yourserver.org/dist/scripts/scripts.js
extensionStylesheets:
- /<path to>https://yourserver.org/dist/styles/oshinko.css
...
- Trigger a restart of the webconsole by deleting the only pod in the openshift-web-console project. The console will be restarted.
- Have an instance up and running with the extension installed (See Getting Started above)
- oc create configmap storedconfig --from-literal=mastercount=1 --from-literal=workercount=4
- grunt test-integration --baseUrl= (https://:8443 would be common)
- Get a certificate (see comment in script) and run the following python script in your oshinko-console directory.
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', server_side=True)
httpd.serve_forever()
- Verify that your scripts can be reached by pointing your browser at https://:4443/dist/scripts/scripts.js (You may need to accept the certificate if you're using a self-signed cert).
- Switch to a new project and run the following to serve the extension scripts (from github) via s2i.
oc new-app centos/httpd-24-centos7~https://github.com/radanalyticsio/oshinko-console --context-dir=dist
#optionally specify your server certs as part of the following command
oc create route edge --service oshinko-console
-
- Verify that your scripts can be reached by pointing your browser at https:///dist/scripts/scripts.js (You may need to accept the certificate if you're using a self-signed cert).