Skip to content

Commit 298cfed

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 84d2feb + d58e511 commit 298cfed

2 files changed

Lines changed: 97 additions & 122 deletions

File tree

docs/docker_tips.md

Lines changed: 91 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,157 @@
11
## Docker Tips
22

3-
Some things you might find useful while using this setup:
3+
This section includes some useful tips on running the HPC Toolset Tutorial.
44

5-
### Docker Documentation
6-
7-
https://docs.docker.com
8-
9-
### Install & Start Docker
10-
11-
https://docs.docker.com/engine/install/
12-
13-
**NOTE: You'll need to make sure the account you're running docker with is in the 'docker' group**
5+
### Starting/Stopping the HPC Toolset Tutorial
146

15-
### Install Docker Compose
16-
17-
https://docs.docker.com/compose/install/
18-
19-
### Verify working Docker
7+
If you have not already done so, clone this repo:
208

219
```
22-
docker info
10+
$ git clone https://github.com/ubccr/hpc-toolset-tutorial.git
11+
$ cd hpc-toolset-tutorial
2312
```
2413

25-
**This should display your system info along with Docker-specific info. If there are any errors, stop/start Docker**
14+
Ensure you have pulled all the latest changes. This is very important as lots
15+
has changed from previous years:
2616

27-
### Error when starting up tutorial containers
17+
```
18+
$ git pull
19+
```
2820

29-
If you get this error when starting the tutorial
21+
This step is optional, only run this if you've previosly run our tutorial and
22+
need to remove any old containers, volumes, and images. You can also run this
23+
if you need to start completely fresh. NOTE: this will delete all the hpcts
24+
container images and you will need to re-download them:
3025

3126
```
32-
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
27+
$ ./hpcts cleanup
28+
```
3329

34-
or
30+
Pull down and start the most recent container images:
3531

36-
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
32+
```
33+
$ ./hpcts start
3734
```
3835

39-
Try stopping and starting Docker (restart doesn't usually fix the problem). Commands for this differ depending on operating system.
36+
### If something goes wrong...
4037

41-
If the error persists, try:
38+
First, thing to try is stopping the containers, removing the volumes and re-starting:
4239

4340
```
44-
export DOCKER_HOST=127.0.0.1
41+
$ ./hpcts destroy
42+
$ ./hpcts start
4543
```
4644

47-
NOTE: this is only necessary on some systems so don't use it if the previous command works
45+
### Docker Documentation
4846

49-
**Sometimes restarting your operating system is the only solution.**
47+
- [Docker](https://docs.docker.com)
48+
- [Install & Start Docker](https://docs.docker.com/engine/install/)
49+
- [Install Docker Compose](https://docs.docker.com/compose/install/)
50+
- [Linux](https://docs.docker.com/engine/install/linux-postinstall/)
51+
- [MacOS Docker Desktop](https://docs.docker.com/docker-for-mac/troubleshoot/)
52+
- [Windows Docker Desktop](https://docs.docker.com/docker-for-windows/troubleshoot/)
5053

51-
### Windows Errors
54+
### Helpful Docker commands
5255

53-
NOTE: Windows users should get several pop-up messages from Docker Desktop during this process asking to allow local system access to the Docker containers. Please click the "Share it" button:
54-
![](windows_sharing.PNG)
56+
```
57+
# Start all HPC Toolset Containers manually
58+
$ docker-compose up -d
5559
56-
If you have notifications blocked, you may not see these pop-ups and the authorization will eventually time out. If this happens, you will get this type of error message:
60+
# Display Tutorial Container Logs
61+
$ docker-compose logs -f
62+
$ docker-compose logs -f coldfront
63+
$ docker-compose logs -f xdmod
5764
58-
```
59-
Error response from daemon: user declined directory sharing C:\Users\path_to_my_folder
60-
```
61-
Open Docker Desktop, navigate to Settings - Resources, and click on File Sharing. Then add the directory where you've cloned the HPC Toolset Tutorial and click "Apply & Restart"
65+
# Stop containers
66+
$ docker-compose stop
6267
63-
Re-run:
64-
```
65-
./hpcts start
66-
```
68+
# Stop containers and remove them
69+
$ docker-compose down
6770
68-
If this doesn't work, please run:
69-
```
70-
./hpcts cleanup
71-
./hpcts start
72-
```
71+
# Stop containers,remove them and all volumes
72+
$ docker-compose down -v
7373
74+
# Display Docker processes
75+
$ docker ps -a
7476
75-
### Docker Troubleshooting
77+
# Display Docker containers
78+
$ docker container list
7679
77-
Linux: https://docs.docker.com/engine/install/linux-postinstall/
78-
MacOS - Docker Desktop: https://docs.docker.com/docker-for-mac/troubleshoot/
79-
Windows - Docker Desktop: https://docs.docker.com/docker-for-windows/troubleshoot/
80+
# Display Docker images
81+
$ docker image list
8082
81-
### Display Docker processes
83+
# Display Docker volumes
84+
$ docker volume list
8285
83-
```
84-
docker ps -a
86+
# Finding IP address of container
87+
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' coldfront
88+
172.27.0.10
8589
```
8690

87-
### Display Tutorial Container Logs
91+
### Troubleshooting
8892

89-
```
90-
docker-compose logs -f
91-
```
93+
General troubleshooting tips to try:
94+
95+
#### Error when starting up tutorial containers
9296

93-
### Display Docker containers
97+
If you get this error when starting the tutorial:
9498

9599
```
96-
docker container list
100+
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
97101
```
98102

99-
### Display Docker images
103+
Try stopping and starting Docker (restart doesn't usually fix the problem).
104+
Commands for this differ depending on operating system.
105+
106+
If the error persists, try:
100107

101108
```
102-
docker image list
109+
export DOCKER_HOST=127.0.0.1
103110
```
104111

105-
### Display Docker volumes
112+
NOTE: this is only necessary on some systems so don't use it if the previous command works
106113

107-
```
108-
docker volume list
109-
```
114+
**Sometimes restarting your operating system is the only solution.**
110115

111-
### Shutting down the tutorial containers
116+
#### Windows Errors
112117

113-
**NOTE: This is the preferred method to stop/start or tear down the tutorial setup as the containers rely on each other and stopping, starting or deleting them individually usually has unintended side effects**
118+
NOTE: Windows users should get several pop-up messages from Docker Desktop during this process asking to allow local system access to the Docker containers. Please click the "Share it" button:
119+
![](windows_sharing.PNG)
114120

115-
To tear down all containers and remove the volumes:
121+
If you have notifications blocked, you may not see these pop-ups and the authorization will eventually time out. If this happens, you will get this type of error message:
116122

117123
```
118-
./hpcts destroy
124+
Error response from daemon: user declined directory sharing C:\Users\path_to_my_folder
119125
```
126+
Open Docker Desktop, navigate to Settings - Resources, and click on File Sharing. Then add the directory where you've cloned the HPC Toolset Tutorial and click "Apply & Restart"
120127

121-
To tear down all containers, remove volumes, and remove the container images (next time you run start they will be re-downloaded):
122-
128+
Re-run:
123129
```
124-
./hpcts cleanup
130+
./hpcts start
125131
```
126132

127-
### Starting everything up again
128-
133+
If this doesn't work, please run:
129134
```
130-
./hpcts start
135+
./hpcts cleanup
136+
./hpcts start
131137
```
132138

133-
### Deleting Docker containers/images/volumes manually
139+
#### Deleting Docker containers/images/volumes manually
134140

135-
If you really want to clean up images and start fresh:
141+
If you want to manually clean up images:
136142

137143
```
138-
docker image list
139-
docker image rm XX (XX=image id)
140-
docker container list
141-
docker container rm XX (XX=container id)
142-
docker volume list
143-
docker volume rm XX (XX=volume id)
144+
$ docker image list
145+
$ docker image rm XX (XX=image id)
146+
$ docker container list
147+
$ docker container rm XX (XX=container id)
148+
$ docker volume list
149+
$ docker volume rm XX (XX=volume id)
144150
```
145151

146-
If you're getting an error about volumes in use but there is nothing running, stop docker, manually delete the files, and start docker again. These commands are different depending on the operating system so we recommend using your favorite search provider to locate instructions for this.
147-
148-
149-
### Finding IP address of container
152+
If you're getting an error about volumes in use but there is nothing running,
153+
stop docker, manually delete the files, and start docker again. These commands
154+
are different depending on the operating system so we recommend using your
155+
favorite search provider to locate instructions for this.
150156

151-
```
152-
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' coldfront
153-
172.27.0.10
154-
```
155157
[Back to Start](../README.md)

docs/getting_started.md

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -103,36 +103,10 @@ Re-run:
103103

104104
If this doesn't work, please run:
105105
```
106-
./hpcts cleanup
106+
./hpcts destroy
107107
./hpcts start
108108
```
109109

110-
111-
### Error when starting up tutorial containers
112-
113-
If you get this error when starting the tutorial:
114-
115-
```
116-
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
117-
118-
or
119-
120-
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
121-
```
122-
123-
Try stopping and starting Docker (restart doesn't usually fix the problem). Commands for this differ depending on operating system.
124-
125-
If the error persists, try:
126-
127-
```
128-
export DOCKER_HOST=127.0.0.1
129-
```
130-
131-
NOTE: this is only necessary on some systems so don't use it if the previous command works
132-
133-
**Sometimes restarting your operating system is the only solution.**
134-
135-
136110
### Docker Logs
137111

138112
Once the helper script finishes you can check the status of the containers:
@@ -157,13 +131,15 @@ xdmod | ---> Starting XDMoD...
157131

158132
## Something still not right?
159133

134+
Please see our [troubleshooting section](docker_tips.md) for more info.
135+
160136
If errors are showing up in the logs or the services have not all started, check to see which images have been downloaded and which containers are running. This is what you should see:
161137
![](containers_images.PNG)
162138

163-
If not, run the 'stop' option of the helper script to shut everything down and remove all volumes. Then start everything back up again:
139+
If not, run the 'destroy' option of the helper script to shut everything down and remove all volumes. Then start everything back up again:
164140

165141
```
166-
$ ./hpcts stop
142+
$ ./hpcts destroy
167143
$ docker container list
168144
(Should show no containers)
169145
@@ -186,7 +162,7 @@ Then start it all up again:
186162

187163
Since you already downloaded all the images, this command will only startup the containers and services which only takes a few minutes.
188164

189-
To completely start over, run the cleanup script and then startup script:
165+
To completely start over and re-download all images, run the cleanup script and then startup script:
190166

191167
```
192168
$ ./hpcts cleanup
@@ -200,9 +176,6 @@ $ docker image rm [IMAGE IDs for mongo and mariadb images]
200176
$ ./hpcts start
201177
```
202178

203-
Just in case none of this worked here are [more Docker tips](docker_tips.md)
204-
205-
206179
## Tutorial Navigation
207180
[Next - Accessing the Applications](applications.md)
208181
[Docker Tips](docker_tips.md)

0 commit comments

Comments
 (0)