Skip to content
This repository has been archived by the owner on Aug 5, 2018. It is now read-only.

Commit

Permalink
Update README to address issues
Browse files Browse the repository at this point in the history
Update README to address issues in kubernetes/kubernetes#7122
Providing a bit more clarity to how to test and develop the kubernetes Web UI.
  • Loading branch information
satoshi75nakamoto committed Apr 21, 2015
1 parent ef4eba8 commit 192ed12
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Bower components should be refernced in one of the `vendor.json` files below:

### Serving the app during development

The app can be served through `kubectl`, but for some types of review a local web server is convenient. One can be installed as follows:
For development you can serve the files locally by installing a webserver as follows:

```
sudo npm install -g http-server
Expand All @@ -43,6 +43,9 @@ cd app
http-server -a localhost -p 8000
```

### Serving the app in production
https://<kubernetes-master>/static/app/

### Configuration
#### Configuration settings
A json file can be used by `gulp` to automatically create angular constants. This is useful for setting per environment variables such as api endpoints.
Expand All @@ -57,7 +60,6 @@ www/master
├── shared/config/development.json
└── components
├── dashboard/config/development.json
├── graph/config/development.json
└── my_component/config/development.json
```
produces ```www/master/shared/config/generated-config.js```:
Expand All @@ -66,14 +68,16 @@ angular.module('kubernetesApp.config', [])
.constant('ENV', {
'/': <www/master/shared/config/development.json>,
'dashboard': <www/master/components/dashboard/config/development.json>,
'graph': <www/master/components/graph/config/development.json>,
'my_component': <www/master/components/my_component/config/development.json>
});
```

#### Kubernetes server configuration

**RECOMMENDED**: By default the Kubernetes api server does not support CORS,
You'll need to run ```hack/build-ui.sh``` to create a new ```pkg/ui/datafile.go``` file.
This is the file that is built-in to the kube-apiserver.

**RECOMMENDED**: When working in development mode the Kubernetes api server does not support CORS,
so the `kube-apiserver.service` must be started with
`--cors_allowed_origins=.*` or `--cors_allowed_origins=http://<your
host here>`
Expand All @@ -87,7 +91,7 @@ angular.module('kubernetesApp.config', [])
See [master/components/README.md](master/components/README.md).

### Testing
Currently kuberntes-ui includes both unit-testing (run via [Karma](http://karma-runner.github.io/0.12/index.html)) and
Currently kuberntes/www includes both unit-testing (run via [Karma](http://karma-runner.github.io/0.12/index.html)) and
end-to-end testing (run via
[Protractor](http://angular.github.io/protractor/#/)).

Expand Down

0 comments on commit 192ed12

Please sign in to comment.