Fix / extend README

This commit is contained in:
Gašper Fele-Žorž 2025-09-02 11:22:49 +02:00
parent 0d1e32c626
commit 93b01e5d53
11 changed files with 267 additions and 32 deletions

View file

@ -1,7 +1,40 @@
# Using the ansible scripts
Ansible playbooks for deploying classroom computers. Run with something like: Ansible playbooks for deploying classroom computers. Run with something like:
ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py
or, for Apple computers: or, for Apple computers:
ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py
# How classroom computers are prepared at FRI
The computers are prepared as follows:
- Ask teachers to check their requirements.
- Fix ansible scripts according to the requirements.
- Set up a fresh Windows and Linux install on a VM.
- Use ansible to deploy the software, fixing fresh bugs due to changes in the install processes along the way.
- Fix root filesystem UUIDs to what they were last year so the network-booted menu still works.
- Create partition table image and partition images using [FRI Backup](https://github.com/UL-FRI/ansible_classroom_deploy/tree/main/fri_backup).
- Deploy the images on separate VMs - one for Linux, one for Windows.
- Have teachers check their software in the VMs, report any problems.
- Fix problems on the VMs.
- Create partition images for Windows on one VM, for Linux on the other.
- Deploy the images on a limited number of computers in the classrooms using FRI Backup.
- Test the newly deployed computers, fix identified problems on the VMs.
- Join the Linux VM into AD. One AD account is used for all computers.
- Deploy the partition tables and partitions to the classrooms using [custom ansible scripts](https://github.com/UL-FRI/ansible_classroom_deploy/tree/main/polz_scripts) running FRI Backup and [UDPCast](https://www.udpcast.linux.lu/cmd.html).
- Join Windows into AD.
# Immutable computers
Some pieces of modern software assume that a computer is only used by one user who has practically unlimited space in their home folder. Examples of such software are Android Studio, Visual Studio Code, Matlab, Windows Subsystem for Linux (WSUS) and others. Instead of trying to get the software to work, we might just give up and have everyone use the same account on each computer, then wipe all data after they log out / reboot.
## Windows
We intend to use [UWF](https://learn.microsoft.com/en-us/windows/configuration/wcd/wcd-unifiedwritefilter).
## Linux
We intend to use [snapper](https://wiki.archlinux.org/title/Snapper).

View file

@ -24,7 +24,7 @@
- name: "Rename" - name: "Rename"
# Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom
hostname: hostname:
name: "{{inventory_hostname}}" name: "{{inventory_hostname}}-linux"
register: hostname_res register: hostname_res
- name: Check whether we already joined - name: Check whether we already joined
@ -33,7 +33,7 @@
- name: Join using realmd - name: Join using realmd
expect: expect:
command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} FRI1.UNI-LJ.SI command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} {{domain_name}}
responses: responses:
(?i)Password: "{{ad_join_password}}" (?i)Password: "{{ad_join_password}}"
ignore_errors: yes ignore_errors: yes

View file

@ -36,8 +36,8 @@
- name: "Join domain" - name: "Join domain"
win_domain_membership: win_domain_membership:
domain_admin_user: "{{adjoin_user}}" domain_admin_user: "{{ad_join_user}}"
domain_admin_password: "{{adjoin_password}}" domain_admin_password: "{{ad_join_password}}"
dns_domain_name: "{{domain_name}}" dns_domain_name: "{{domain_name}}"
domain_ou_path: "{{ou_path}}" domain_ou_path: "{{ou_path}}"
hostname: "{{inventory_hostname}}" hostname: "{{inventory_hostname}}"

View file

@ -12,4 +12,4 @@
win_lineinfile: win_lineinfile:
path: "%ProgramFiles%\\Eclipse {{ target_version }}\\eclipse\\eclipse.ini" path: "%ProgramFiles%\\Eclipse {{ target_version }}\\eclipse\\eclipse.ini"
regexp: "osgi.instance.area.default" regexp: "osgi.instance.area.default"
line: "-Dosgi.instance.area.default=H:/Documents/eclipse-workspace" line: "-Dosgi.instance.area.default=D:/Documents/eclipse-workspace"

View file

@ -2,7 +2,7 @@
set_fact: set_fact:
target_version: "R2025a_Update_1" target_version: "R2025a_Update_1"
license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic
dest_dir: C:\matlab dest_dir: "{{ large_prog_dir }}\\matlab"
- name: Set ISO path - name: Set ISO path
set_fact: set_fact:

View file

@ -8,4 +8,4 @@
state: upgrade state: upgrade
version: "{{ target_version }}" version: "{{ target_version }}"
# TODO set default project directory to H:\something # TODO set default project directory to {{large_prog_dir}}\something

View file

@ -5,7 +5,7 @@
- name: Set SiFive Studio install location - name: Set SiFive Studio install location
set_fact: set_fact:
download_filedest: C:\FreedomStudio-4.18.0.2021-04-1-x86_64-w64-mingw32.zip download_filedest: "{{ large_prog_dir }}\\FreedomStudio-4.18.0.2021-04-1-x86_64-w64-mingw32.zip"
- name: Download SiFive - name: Download SiFive
win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/bulic_fri1_uni-lj_si/EdiSnJpoClJLtc3AtcAtEQ4BI76_PeDvL-ZmhxG4OEyvig?e=xBRYcb&download=1" -O "{{ download_filedest }}" win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/bulic_fri1_uni-lj_si/EdiSnJpoClJLtc3AtcAtEQ4BI76_PeDvL-ZmhxG4OEyvig?e=xBRYcb&download=1" -O "{{ download_filedest }}"
args: args:
@ -14,12 +14,12 @@
- name: Unzip SiFive Studio - name: Unzip SiFive Studio
win_unzip: win_unzip:
src: "{{ download_filedest }}" src: "{{ download_filedest }}"
dest: C:\SiFive\ dest: "{{ large_prog_dir }}\\SiFive\\"
creates: C:\SiFive\plugins creates: "{{ large_prog_dir }}\\SiFive\\plugins"
delete_archive: yes delete_archive: yes
- name: Create desktop shortcut - name: Create desktop shortcut
win_shortcut: win_shortcut:
description: "SiFive Freedom Studio" description: "SiFive Freedom Studio"
src: C:\SiFive\FreedomStudio.exe src: "{{ large_prog_dir }}\\SiFive\\FreedomStudio.exe"
dest: '%public%\Desktop\SiFive.lnk' dest: '%public%\Desktop\SiFive.lnk'

View file

@ -10,13 +10,13 @@
- name: Create STM32Duino directory - name: Create STM32Duino directory
win_file: win_file:
path: "D:\\RAVINOR\\STM32Duino" path: "{{large_prog_dir}}\\RAVINOR\\STM32Duino"
state: directory state: directory
- name: Install preinstalled STM32Duino & Arduino environment - name: Install preinstalled STM32Duino & Arduino environment
win_get_url: win_get_url:
url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ" url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ"
dest: "D:\\RAVINOR\\STM32Duino" dest: "{{large_prog_dir}}\\RAVINOR\\STM32Duino"
# TODO Don't know if unzipping is required? # TODO Don't know if unzipping is required?

View file

@ -1,6 +1,7 @@
- name: Install XAMPP - name: Install XAMPP
win_chocolatey: win_chocolatey:
name: xampp-81 name: xampp-81
install_args: ""
- name: Make XAMPP config world writable - name: Make XAMPP config world writable
win_acl: win_acl:
@ -12,7 +13,7 @@
- name: Add firewall rules for XAMPP - name: Add firewall rules for XAMPP
win_firewall_rule: win_firewall_rule:
name: "Allow inbound traffic for XAMPP: {{ item }}" name: "Allow inbound traffic for XAMPP: {{ item }}"
program: "%SystemDrive%\\xampp\\{{ item }}" program: "C:\\xampp\\{{ item }}"
action: allow action: allow
direction: in direction: in
protocol: tcp protocol: tcp

View file

@ -13,8 +13,16 @@
debugger: on_failed debugger: on_failed
vars_files: vars_files:
- vars/software_keys.yml - vars/software_keys.yml
- vars/dirs.yml
roles: roles:
- all_classes # - all_classes
# - fri_base
- android_studio
# - jdk
# - powerdesigner
# - solidworks
#
# - omnetpp
# - stm32cube # - stm32cube
# - processing # - processing
# - powerdesigner # - powerdesigner

File diff suppressed because one or more lines are too long