Skip to content

Commit 2195220

Browse files
cheldurcan
authored andcommitted
moved development docu to sub-folder
1 parent 3321cbb commit 2195220

File tree

3 files changed

+122
-102
lines changed

3 files changed

+122
-102
lines changed

README.md

Lines changed: 7 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -7,115 +7,20 @@ itself.
77

88
## Usage
99

10-
The Dashboard is currently under active development and is not ready for production use (yet!).
10+
The Dashboard is currently under active development and is not ready for production use (yet!). To run the latest _unstable_ version execute the following command:
1111

12-
## Architecture Overview
12+
``
13+
kubectl create -f src/deploy/kubernetes-dashboard.yaml
14+
``
1315

14-
Kubernetes Dashboard project consists of two main components. They are called here the frontend and the backend. The frontend is a single page web application that runs in a browser. It fetches all its business data from the backend using standard HTTP methods. The backend implements UI-business logic and fetches raw data from the various Kubernetes APIs.
1516

16-
## Preparation
1717

18-
Make sure the following software is installed and added to the `$PATH` variable:
19-
* docker (1.3+)
20-
* go (1.5+)
21-
* nodejs (4.2.2+)
22-
* npm (1.3+)
23-
* Java (Java Development Kit 7+)
24-
* gulp (3.9+)
25-
* bash
18+
## Documentation
2619

27-
Clone the repository and install the dependencies:
28-
```
29-
$ npm install
30-
```
20+
* The [Design overview](docs/design/README.md) describes design concepts of Dashboard
3121

32-
## Run dashboard inside a container
22+
* The [Developer guide](docs/devel/README.md) is for anyone wanting to contribute to Dashboard
3323

34-
It's possible to run `gulp` and all the dependencies inside a development container. To do this, just replace `gulp [some arg]` commands with `build/run-gulp-in-docker.sh [some arg]`. If you do this, the only dependency is `docker`, and required commands such as `npm install` will be run automatically.
35-
36-
## Run a Kubernetes Cluster
37-
38-
For development it is recommended to run a local Kubernetes cluster. For your convenience, a task is provided that runs a small Kubernetes cluster inside Docker containers. Run the following command:
39-
40-
```
41-
$ gulp local-up-cluster
42-
```
43-
44-
This will start a lightweight local cluster. All processes run locally, in Docker containers. The local cluster should behave like a real cluster, but it has some shortcomings. See issues related to https://github.com/kubernetes/kubernetes/tree/master/docs/getting-started-guides/docker.md for more details. To shut it down, you can type the following command that kills all running Docker containers:
45-
46-
```
47-
$ docker kill $(docker ps -aq)
48-
```
49-
50-
From time to time you might want to use to a real Kubernetes cluster (e.g. GCE, Vagrant) instead of the local one. The most convenient way is to create a proxy. Run the following command instead of the gulp task from above:
51-
```
52-
$ kubectl proxy --port=8080
53-
```
54-
kubectl will handle authentication with Kubernetes and create an API proxy with the address `localhost:8080`. Therefore, no changes in the configuration are required.
55-
56-
## Serving Dashboard for Development
57-
58-
It is easy to compile and run Dashboard. Open a new tab in your terminal and type:
59-
```
60-
$ gulp serve
61-
```
62-
Open a browser and access the UI under `localhost:9090`. A lot of things happened underneath. Let's scratch on the surface a bit.
63-
64-
Compilation:
65-
* Stylesheets are implemented with SASS and compiled to CSS with libsass
66-
* JavaScript is implemented in ES6. It is compiled with Babel for development and the Google-Closure-Compiler for production.
67-
* Go is used for the implementation of the backend. The source code gets compiled into the single binary 'dashboard'
68-
69-
70-
Execution:
71-
* Frontend is served by BrowserSync. It enables features like live reloading when HTML/CSS/JS change and even synchronize scrolls, clicks and form inputs across multiple devices.
72-
* Backend is served by the 'dashboard' binary.
73-
74-
File watchers listen for source code changes (CSS, JS, GO) and automatically recompile. All changes are instantly reflected, e.g. by automatic process restarts or browser refreshes. The build artifacts are created in a hidden folder (`.tmp`).
75-
76-
After successful execution of `gulp local-up-cluster` and `gulp serve`, the following processes should be running (respective ports are given in parentheses):
77-
78-
BrowserSync (9090) ---> Dashboard backend (9091) ---> Kubernetes API server (8080)
79-
80-
81-
## Building Dashboard for Production
82-
83-
The Dashboard project can be built for production by using the following task:
84-
```
85-
$ gulp build
86-
```
87-
The code is compiled, compressed and debug support removed. The artifacts can be found in the `dist` folder.
88-
89-
In order to serve Dashboard from the `dist` folder, use the following task:
90-
91-
```
92-
$ gulp serve:prod
93-
```
94-
Open a browser and access the UI under `localhost:9090.` The following processes should be running (respective ports are given in parentheses):
95-
96-
97-
Dashboard backend (9090) ---> Kubernetes API server (8080)
98-
99-
In order to package everything into a ready-to-run Docker image, use the following task:
100-
```
101-
$ gulp docker-image:canary
102-
```
103-
You might notice that the Docker image is very small and requires only a few MB. Only Dashboard assets are added to a scratch image. This is possible, because the `dashboard` binary has no external dependencies. Awesome!
104-
105-
## Run the Tests
106-
Unit tests should be executed after every source code change. The following task makes this a breeze by automatically executing the unit tests after every save action.
107-
108-
```
109-
$ gulp test:watch
110-
```
111-
The full test suite includes static code analysis, unit tests and integration tests. It can be executed with:
112-
```
113-
$ gulp check
114-
```
115-
116-
## Contribute
117-
118-
Wish to contribute !! Great start [here](CONTRIBUTING.md).
11924

12025
## License
12126

docs/devel/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Dashboard Developer Guide
22

33
The developer guide is for anyone wanting to contribute code to Dashboard
4+
5+
## Setup
6+
* Getting started ([getting-started.md](getting-started.md))

docs/devel/getting-started.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Getting Started
2+
3+
This document describes how to setup your development environment.
4+
5+
## Architecture Overview
6+
7+
Kubernetes Dashboard project consists of two main components. They are called here the frontend and the backend. The frontend is a single page web application that runs in a browser. It fetches all its business data from the backend using standard HTTP methods. The backend implements UI-business logic and fetches raw data from the various Kubernetes APIs.
8+
9+
## Preparation
10+
11+
Make sure the following software is installed and added to the `$PATH` variable:
12+
* Docker (1.3+)
13+
* go (1.5+)
14+
* nodejs (4.2.2+)
15+
* npm (1.3+)
16+
* java (7+)
17+
* gulp (3.9+)
18+
19+
Clone the repository and install the dependencies:
20+
```
21+
$ npm install
22+
```
23+
24+
## Run a Kubernetes Cluster
25+
26+
For development it is recommended to run a local Kubernetes cluster. For your convenience, a task is provided that checks out the latest stable version, and runs it inside a Docker container. Open a separate tab in your terminal and run the following command:
27+
28+
```
29+
$ gulp local-up-cluster
30+
```
31+
32+
This will build and start a lightweight local cluster, consisting of a master and a single node. All processes run locally, in Docker container. The local cluster should behave like a real cluster, however, plugins like heapster are not installed. To shut it down, type the following command that kills all running Docker containers:
33+
34+
```
35+
$ docker kill $(docker ps -aq)
36+
```
37+
38+
From time to time you might want to use to a real Kubernetes cluster (e.g. GCE, Vagrant) instead of the local one. The most convenient way is to create a proxy. Run the following command instead of the gulp task from above:
39+
```
40+
$ kubectl proxy --port=8080
41+
```
42+
kubectl will handle authentication with Kubernetes and create an API proxy with the address `localhost:8080`. Therefore, no changes in the configuration are required.
43+
44+
## Serving Dashboard for Development
45+
46+
It is easy to compile and run Dashboard. Open a new tab in your terminal and type:
47+
```
48+
$ gulp serve
49+
```
50+
Open a browser and access the UI under `localhost:9090`. A lot of things happened underneath. Let's scratch on the surface a bit.
51+
52+
Compilation:
53+
* Stylesheets are implemented with SASS and compiled to CSS with libsass
54+
* JavaScript is implemented in ES6. It is compiled with Babel for development and the Google-Closure-Compiler for production.
55+
* Go is used for the implementation of the backend. The source code gets compiled into the single binary 'dashboard'
56+
57+
58+
Execution:
59+
* Frontend is served by BrowserSync. It enables features like live reloading when HTML/CSS/JS change and even synchronize scrolls, clicks and form inputs across multiple devices.
60+
* Backend is served by the 'dashboard' binary.
61+
62+
File watchers listen for source code changes (CSS, JS, GO) and automatically recompile. All changes are instantly reflected, e.g. by automatic process restarts or browser refreshes. The build artifacts are created in a hidden folder (`.tmp`).
63+
64+
After successful execution of `gulp local-up-cluster` and `gulp serve`, the following processes should be running (respective ports are given in parentheses):
65+
66+
BrowserSync (9090) ---> Dashboard backend (9091) ---> Kubernetes API server (8080)
67+
68+
69+
## Building Dashboard for Production
70+
71+
The Dashboard project can be built for production by using the following task:
72+
```
73+
$ gulp build
74+
```
75+
The code is compiled, compressed and debug support removed. The artifacts can be found in the `dist` folder.
76+
77+
In order to serve Dashboard from the `dist` folder, use the following task:
78+
79+
```
80+
$ gulp serve:prod
81+
```
82+
Open a browser and access the UI under `localhost:9090.` The following processes should be running (respective ports are given in parentheses):
83+
84+
85+
Dashboard backend (9090) ---> Kubernetes API server (8080)
86+
87+
88+
89+
In order to package everything into a ready-to-run Docker image, use the following task:
90+
```
91+
$ gulp docker-image:canary
92+
```
93+
You might notice that the Docker image is very small and requires only a few MB. Only Dashboard assets are added to a scratch image. This is possible, because the `dashboard` binary has no external dependencies. Awesome!
94+
95+
## Run the Tests
96+
Unit tests should be executed after every source code change. The following task makes this a breeze by automatically executing the unit tests after every save action.
97+
98+
```
99+
$ gulp test:watch
100+
```
101+
The full test suite includes static code analysis, unit tests and integration tests. It can be executed with:
102+
```
103+
$ gulp check
104+
```
105+
106+
## Building Dashboard Inside a Container
107+
108+
It's possible to run `gulp` and all the dependencies inside a development container. To do this, just replace `gulp [some arg]` commands with `build/run-gulp-in-docker.sh [some arg]`. If you do this, the only dependency is `docker`, and required commands such as `npm install` will be run automatically.
109+
110+
## Contribute
111+
112+
Wish to contribute !! Great start [here](CONTRIBUTING.md).

0 commit comments

Comments
 (0)