services:labtest:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:labtest:start [2025/02/24 09:38] – jas | services:labtest:start [2025/04/02 13:53] (current) – jas | ||
---|---|---|---|
Line 1120: | Line 1120: | ||
eclass.yorku.ca/ | eclass.yorku.ca/ | ||
eclass.yorku.ca/ | eclass.yorku.ca/ | ||
+ | eclass.yorku.ca/ | ||
</ | </ | ||
Line 1141: | Line 1142: | ||
< | < | ||
- | eclass.yorku.ca/ | + | eclass.yorku.ca/ |
</ | </ | ||
| | ||
Line 1308: | Line 1309: | ||
\\ | \\ | ||
WARNING: Before you can re-use the same secureq directory for another test, at a minimum, you must move any existing “secureq/ | WARNING: Before you can re-use the same secureq directory for another test, at a minimum, you must move any existing “secureq/ | ||
+ | |||
+ | ====== Labtest and Containers ====== | ||
+ | |||
+ | It may be helpful to some courses to use containers from within labtest. | ||
+ | |||
+ | Download an Ubuntu image: | ||
+ | |||
+ | < | ||
+ | % podman pull ubuntu: | ||
+ | </ | ||
+ | |||
+ | **NOTE:** Your EECS home directory has limited storage space and is on network storage. | ||
+ | |||
+ | Start up the container from the ubuntu: | ||
+ | |||
+ | < | ||
+ | % podman run -it --name my-ubuntu ubuntu: | ||
+ | </ | ||
+ | | ||
+ | Make changes -- in this case, we'll just add an empty file named " | ||
+ | |||
+ | < | ||
+ | # cd | ||
+ | # touch file | ||
+ | # exit | ||
+ | </ | ||
+ | |||
+ | Now let's stop the container: | ||
+ | |||
+ | < | ||
+ | % podman stop my-ubuntu | ||
+ | </ | ||
+ | |||
+ | Commit the changes in my-ubuntu container to my-new-ubuntu image: | ||
+ | |||
+ | < | ||
+ | % podman commit my-ubuntu my-new-ubuntu | ||
+ | </ | ||
+ | |||
+ | Save the image to a tar file: | ||
+ | |||
+ | < | ||
+ | % podman save -o my-new-ubuntu.tar my-new-ubuntu | ||
+ | </ | ||
+ | |||
+ | Place my-new-ubuntu.tar into ltinit directory in the course labtest web directory: | ||
+ | |||
+ | In ltinit/ | ||
+ | |||
+ | < | ||
+ | podman load -i $HOME/ | ||
+ | podman run -dit --name labtest my-new-ubuntu | ||
+ | gnome-terminal -- podman exec -it labtest bash | ||
+ | </ | ||
+ | |||
+ | Now, when the user logs in, the image is unpacked and loaded. Podman run starts the container. | ||
+ | |||
+ | * -d runs it in the background (detached). | ||
+ | * -i keeps stdin open. | ||
+ | * -t allocates a pseudo-tty. | ||
+ | * --name labtest names the container labtest. | ||
+ | * my-new-ubuntu is the image used to create the container | ||
+ | |||
+ | **NOTE:** Large container downloads with large multi lab labtests could result in performance issues since all users will be downloading the container on login. | ||
====== Labtest File Synchronization (ltsave) ====== | ====== Labtest File Synchronization (ltsave) ====== |
services/labtest/start.1740407914.txt.gz · Last modified: 2025/02/24 09:38 by jas