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
Copy file name to clipboardExpand all lines: 02_virtualization_and_containers/virtualmachines_containers_exercise.md
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -67,17 +67,17 @@ We will install the minimal (server) version of Ubuntu 24.04 (codename Noble Num
67
67
68
68
This exercise consists of the following main steps:
69
69
70
-
1. Download the "Ubuntu Server 24.04" installation image.
71
-
2. Create a new virtual machine in VirtualBox with (recommended, lower might work as well)
70
+
1. Downloading the "Ubuntu Server 24.04" installation image.
71
+
2. Creating a new virtual machine in VirtualBox with (recommended, lower might work as well)
72
72
- 6 GB virtual disk
73
73
- 1024 MB of memory
74
74
- 32 MB video memory
75
-
3. Install Ubuntu on the virtual machine with
75
+
3. Installing Ubuntu on the virtual machine with
76
76
- user called `USERNAME` (if your GitLab name is `@musterm`, then`musterm`)
77
77
- (host)name of the machine `USERNAMEvm` (e.g., `mustermvm`)
78
-
4. Install the software package `neofetch`.
79
-
5. Run`neofetch`in the terminal and take a screenshot
80
-
6. Upload the screenshot in a new issue on the SIM GitLab.
78
+
4. Installing the software package `neofetch`.
79
+
5. Running`neofetch`in the terminal and take a screenshot
80
+
6. Uploading the screenshot in a new issue on the SIM GitLab.
81
81
82
82
In the following subsections you will find additional instructions and explanations. This should help you, especially if you do not have much experience with software installation and Linux.
83
83
@@ -90,12 +90,13 @@ See instruction in the introduction to this section.
90
90
While the "Ubuntu Server 24.04" installation image is downloading, you can already prepare the virtual machine.
91
91
92
92
- Create a new VM in VirtualBox called "Ubuntu Server".
93
+
- If given the option, select`Skip Unattended Installation`: let's experience the full process this time.
93
94
- Assign RAM and virtual drive as stated in the introduction.
94
95
- After the creation, the virtual machine shows up in the "VirtualBox Manager". Open the settings of the VM and:
95
96
- inspect the settings of the virtual machine and set the video memory to at least 32 MB.
96
97
- in the same settings, you can also increase the number of CPU cores allocated (not necessary).
97
98
98
-
#### 2. Ubuntu installation process
99
+
#### 3. Ubuntu installation process
99
100
100
101
This is a summary of the [Ubuntu Server installation tutorial](https://ubuntu.com/tutorials/install-ubuntu-server).
101
102
@@ -104,29 +105,30 @@ This is a summary of the [Ubuntu Server installation tutorial](https://ubuntu.co
104
105
- The VM will boot from the Ubuntu image and will welcome you with a configuration program. Choose your preferred language and then choose "Start Ubuntu Server". It brings you to the installation routine. The starting process might take a short while.
105
106
- When the boot process has finished, you will be presented with Ubuntu's installation program. Go through it carefully.
106
107
- Choose your preferred language and keyboard layout. Note that you cannot use your mouse in the menus, instead you have to use your keyboard.
108
+
- You do not need to update the installer.
107
109
- For most settings you can accept the default values Ubuntu suggests (mirror, empty proxy, using entire disk with LVM group, storage configuration etc.)
108
110
- After verifying that Ubuntu wants to use the virtual hard drive, confirm formatting of the virtual hard drive ("Confirm destructive action") when asked so.
109
111
- When setting up your user, please use your GitLab username, e.g. `musterm`, as username and choose the username + VM, e.g. `mustermvm`, as the server's name. The password you can choose freely, but it cannot be empty. If you do not feel creative, use `sse` as password.
110
112
- When you are asked about the SSH Setup, you can decide whether you want to activate the `Install OpenSSH Server` option (using spacebar) or not. If you want to test out the SSH connection to the VM (optional task), you can activate it now. If you do not activate it here, you can still install the OpenSSH server later.
111
113
- In the next window, skip all suggested "Featured Server Snaps" to keep the size of the image minimal. It suggests common software used on the Ubuntu Server edition, such as Docker, for example. However, we do not need it here. Confirming your choice will start the installation procedure.
112
114
- The installation procedure might take a while since it will also install security updates. You can already start reading on the subsequent sections.
113
-
- After the installation has finished confirm the reboot with "Reboot Now".
115
+
- After the installation has finished confirm the reboot with "Reboot Now". The installation medium is automatically removed, so just press ENTER when asked.
114
116
115
-
#### 3. Installation of neofetch
117
+
#### 4. Installation of neofetch
116
118
117
119
- After (re)booting you will be greeted by the Ubuntu login screen. If it looks like a mess press `CTRL-C` to clear the screen. You might have to wait for a moment and maybe switch in and out of the VM's window for it to be refreshed properly.
118
120
- Login using your username and password.
119
121
- We want to install [`neofetch`](https://github.com/dylanaraps/neofetch) which prints the system's information to the terminal and take a screenshot of this.
120
122
- Install `neofetch` via `sudo apt update && sudo apt install -y neofetch`. This command will download and install `neofetch` using the package manager [`apt`](https://wiki.debian.org/Apt).
121
123
122
-
#### 4. Running neofetch and Taking a Screenshot (VirtualBox)
124
+
#### 5. Running neofetch and Taking a Screenshot (VirtualBox)
123
125
124
126
- Clear the terminal using `clear` (or `Ctrl-L`) and run neofetch via by typing `neofetch` into the terminal and pressing `Enter`. It will show information about the Ubuntu version, available memory etc.
125
127
- Take a screenshot via VirtualBox. At the top of the VirtualBox window you find the menu item `View`. There you find the option `Take Screenshot (Host+E)`. Save the screenshot as `neofetch-screenshot-USERNAME.png`.
126
128
127
129
Congratulations. You have successfully set up a virtual machine, installed Ubuntu and installed additional software. You are now done with this part of the exercise. If you do not want to play with the VM later nor do you want to do any of the optional assignments, you can power-off and delete the VM. Be sure that your screenshot displays the correct information though (correct username, correct hostname etc.) before deleting the VM.
128
130
129
-
#### 5. Upload the Screenshot to SIM GitLab
131
+
#### 6. Upload the Screenshot to SIM GitLab
130
132
131
133
- Go to the SIM GitLab Repository ["Exercise Virtual Machines"](https://gitlab-sim.informatik.uni-stuttgart.de/simulation-software-engineering-wite2425/exercise-virtual-machines). You will find an example issue. Your issue should look similar in terms of title, labels etc.
132
134
- Open the issue.
@@ -150,9 +152,9 @@ In the previous section we set up a VM manually. This was quite tedious. Therefo
150
152
151
153
This exercise consists of the following main steps:
152
154
153
-
1. Create a fork of the GitLab repository ["Exercise Virtual Machines"](https://gitlab-sim.informatik.uni-stuttgart.de/simulation-software-engineering-wite2425/exercise-virtual-machines)
155
+
1. Creating a fork of the GitLab repository ["Exercise Virtual Machines"](https://gitlab-sim.informatik.uni-stuttgart.de/simulation-software-engineering-wite2425/exercise-virtual-machines)
154
156
2. Initialization of the VM
155
-
- Name this virtual machine `USERNAME-ubuntu-server`.
157
+
- Name this virtual machine `USERNAME-ubuntu-server-vagrant`.
156
158
- Make sure that the virtual machine requests 1024 MB memory.
157
159
- Create a shared/synced directory `/mnt/shared` inside the VM.
158
160
- Test the new VM.
@@ -161,8 +163,8 @@ This exercise consists of the following main steps:
161
163
- Edit the `Vagrantfile` such that the `bootstrap.sh` script is run during provisioning. The script should:
162
164
- add a new environment variable `ENV_TEST_VARIABLE` with the value `USERNAME`.
163
165
- install `neofetch`.
164
-
4. Run`neofetch`in the terminal and take a screenshot.
165
-
5. Create a merge request containing your changes.
166
+
4. Running `neofetch` in the terminal and taking a screenshot.
167
+
5. Creating a merge request containing your changes.
166
168
167
169
In the following subsections you will find additional instructions and explanations.
168
170
@@ -255,7 +257,7 @@ This exercise consists of the following main steps:
255
257
256
258
1. Create a fork of the GitLab repository ["Exercise Containers"](https://gitlab-sim.informatik.uni-stuttgart.de/simulation-software-engineering-wite2425/exercise-containers).
257
259
2. Setting up the `Dockerfile`
258
-
- The name of this container will be `USERNAME-ubuntu`.
260
+
- Base your image on Ubuntu 24.04
259
261
- Create a file called `testfile` that contains `USERNAME`. This file should be copied to a directory called `/testfiles` inside the container.
260
262
- Set the environment variable `ENV_TEST_VARIABLE` inside the container.
0 commit comments