You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Installing Requirements for the Kubernetes Dashboard
2
2
3
-
This document assumes you have a Linux machine (or VM), and that you have a brand new Ubuntu Linux environment setup, but does not assume familiarity with Linux. If you don't have a Linux environment and you're using Windows, you may want to read instructions on how to setup a Linux VM on Windows first.
3
+
These instructions are an elaboration on how to install the requirements listed on the [Getting Started page](getting-started.md). This document assumes you have a Linux machine (or VM), and that you have a brand new Ubuntu Linux environment setup, but does not assume familiarity with Linux. If you don't have a Linux environment and you're using Windows, you may want to read instructions on how to setup a Linux VM on Windows first.
4
4
5
5
Before you begin please make sure you can connect to your Linux machine and login. Command line instructions for Linux will be shown starting with `$`; you should only type the text following the `$`.
6
6
7
-
## Basic Setup
7
+
## Initial System Setup
8
8
Based on instructions from: https://docs.docker.com/engine/installation/linux/ubuntulinux/
9
9
10
-
This will update Linux and get curl and vim, which you'll need later.
10
+
This will update and upgrade Linux.
11
11
```
12
12
$ sudo apt-get update
13
13
$ sudo apt-get upgrade
14
-
$ sudo apt-get install curl
15
-
$ sudo apt-get install vim
16
14
```
17
-
Unless you have another text editor you prefer, vim may be useful for beginners; instructions below use vim.
18
-
19
-
### Initial checks
15
+
### Check
20
16
```
21
17
$ uname -r
22
18
```
23
-
You should get `3.2.0-23-generic`, `3.13.0-88-generic`, or something similar depending on what the current version is.
19
+
You should get `3.2.0-23-generic` or something similar depending on what the current version is.
20
+
24
21
25
22
```
26
23
$ lsb_release -a
@@ -34,74 +31,60 @@ Release: 12.04
34
31
Codename: precise
35
32
```
36
33
37
-
## Get Kubernetes
38
34
35
+
## Install Helpful Programs
36
+
Install some programs that we'll need later on, and verify that they're there.
You should receive a message that includes: `This message shows that your installation appears to be working correctly`.
113
96
114
-
####Configure Docker for your user
97
+
### Configure Docker for your user
115
98
Based on instructions from https://docs.docker.com/engine/installation/linux/ubuntulinux/#create-a-docker-group
116
99
117
100
The example below uses "username" as a placeholder. Please substitute with the user you are logged in as, which can be seen by using `$ id`.
@@ -120,68 +103,117 @@ If you are running Linux in a VM using Vagrant, your username will be "vagrant".
120
103
```
121
104
$ sudo groupadd docker
122
105
$ sudo usermod -aG docker username
123
-
$ env
124
106
$ sudo reboot
107
+
```
108
+
109
+
#### Check
110
+
111
+
```
125
112
$ docker run hello-world
126
113
```
127
114
128
115
You should get the same message as above, that includes: `This message shows that your installation appears to be working correctly`.
129
116
117
+
For an additional check you can run these commands:
118
+
130
119
`$ status docker` --> should say "docker start/running, process [some number]"
120
+
131
121
`$ docker ps` --> should show a table of information (or at least headers)
132
122
133
123
134
-
###Install Go
124
+
## Install Go
135
125
136
-
Get the latest download URL from https://golang.org/dl/
126
+
The instructions below are for install a specific version of Go (1.6.2 for linux amd64). If you want the latest Go version or have a different system, then you can get the latest download URL from https://golang.org/dl/
Should return something like `go version go1.6.2 linux/amd64`. Note that if you already had Go installed, ensure that `GO15VENDOREXPERIMENT` is unset.
140
+
The Go version should return something like `go version go1.6.2 linux/amd64`. Note that if you already had Go installed, ensure that `GO15VENDOREXPERIMENT` is unset.
141
+
142
+
## Install Node and NPM
143
+
144
+
For some reason doing `sudo apt-get install nodejs` gives a much older version, so instead we will get the more recent version:
145
145
146
-
### Install Node and NPM
147
-
For some reason doing this...
148
-
```
149
-
$ sudo apt-get install nodejs
150
-
```
151
-
... gives a much older version, so instead we will get the more recent version:
## Install Other Dashboard Dependencies Automatically with NPM
176
202
177
203
```
178
-
$ cd /dashboard
204
+
$ cd ~/dashboard
179
205
$ npm install
180
206
```
181
-
This will install all the dependencies that are in the `package.json` file.
207
+
208
+
This will install all the dependencies that are in the `package.json` file in the dashboard repo. *This could take a while.*
182
209
183
210
## Run the Kubernetes Cluster
211
+
212
+
Run the script included with the dashboard that checks out the latest Kubernetes and runs it in a Docker container.
213
+
184
214
```
215
+
$ cd ~/dashboard
216
+
$ sudo ./build/setup-docker.sh
185
217
$ gulp local-up-cluster
186
218
```
187
219
If you need to stop the cluster you can run `$ docker kill $(docker ps -aq)`
@@ -190,4 +222,40 @@ If you need to stop the cluster you can run `$ docker kill $(docker ps -aq)`
190
222
$ gulp serve
191
223
```
192
224
225
+
### Check
226
+
227
+
Open up another terminal to your machine, and try to access the dashboard.
228
+
229
+
```
230
+
curl http://localhost:9090
231
+
```
232
+
This should return the HTML for the dashboard.
233
+
234
+
### Continue
235
+
193
236
Now you may [continue with the Getting Started guide](getting-started.md) to learn more about developing with the Kubernetes Dashboard.
237
+
238
+
# Troubleshooting
239
+
240
+
## Docker
241
+
If you're having trouble with the `gulp local-up-cluster` step, you may want to investigate the docker containers.
242
+
243
+
* `docker ps -a` lists all docker containers
244
+
* `docker inspect name_of_container | grep "Error"` will look through the details of a docker container and display any errors.
245
+
246
+
If you have a error like "linux mounts: Path /var/lib/kubelet is mounted on / but it is not a shared mount." you should try `sudo mount --bind /var/lib/kubelet /var/lib/kubelet` followed by `sudo mount --make-shared /var/lib/kubelet`. ([source](https://github.com/kubernetes/kubernetes/issues/4869#issuecomment-193640483))
247
+
248
+
## Go
249
+
250
+
If you run into an error like "Go is not on the path.", you may need to re-run `export PATH=$PATH:/usr/local/go/bin`
251
+
252
+
## Helpful Linux Tips
253
+
254
+
* `env` will show your environment variables. One common error is not having every directory needed in your PATH.
255
+
256
+
Using *vim* to edit files may be helpful for beginners.
257
+
* `sudo apt-get install vim` will get *vim*
258
+
* `sudo vim /path/to/folder/filename` will open the file you want to edit.
0 commit comments