Add locmap documentation
All threads resolved!
All threads resolved!
Compare changes
docs/locmap/locmap.md
0 → 100644
+ 97
− 0
`locmap` is available on el8 and el9 through the [potd8el-stable](https://linuxsoft.cern.ch/internal/repos/potd8el-stable) or [potd9el-stable](https://linuxsoft.cern.ch/internal/repos/potd9el-stable) repositories (potd stands for "puppet on the desktop") and a [locmap-release](https://gitlab.cern.ch/linuxsupport/rpms/releases/locmap-release) RPM to configure these repositories exists in the CERN repo.
`locmap-functional-tests.sh` optionally accepts a list of modules to test. The script first installs `locmap`, then installs the latest version of locmap puppet modules (done via git clone / rpm-build), enables these modules, then runs `locmap --configure all`. Finally, some basic checks are performed to confirm/deny that `locmap`/module did the right thing.
`cern-anaconda-addon` provides a first boot GUI screen that the user must pass through before the system is usable. One of the options in `cern-anaconda-addon` is to "customize my system for CERN". Should this option be selected, `cern-anaconda-addon` will install `locmap-release`, then install `locmap`, enable [default modules](https://gitlab.cern.ch/linuxsupport/rpms/cern-anaconda-addon/-/blob/master/src/cern_customizations/constants.py?ref_type=heads#L6) and finally run `locmap --configure`
There are two options (radio buttons) to configure how to define user home directories (local /home or /afs). If the user chooses to have a /afs home, `LOCMAP_HOMEDIRECTORY_LOCAL=False` is defined in `/etc/sysconfig/locmap-initialsetup`. `useraddcern` has logic to check for the presence of this key.
The `podman` based helper script [`adev.sh`](https://gitlab.cern.ch/linuxsupport/rpms/cern-anaconda-addon/-/tree/master/utils?ref_type=heads) has been written to assist development. As `initial-setup` is graphical and requires a functional `systemd` installation, running through `podman` requires a bit of juggling. To achieve this, `podman` runs as root and the containers spawned are `--privileged`.
Images created by the script have an entry point of `/sbin/init` and have both `rsyslog` and `sshd` running as enabled services. The script communicates to the pod via ssh with X forwarding for the graphical component. `rsyslog` ensures that `/var/log/messages` is populated which can be useful whilst debugging.
This dashboard is generated by the number of unique hosts that hit "checkin" on potd paths. Such a call is made to linuxsoft every time `locmap` is invoked with `--configure`. We are abusing the log instrastrucutre a bit here, and this could be done better. See [here](https://gitlab.cern.ch/linuxsupport/rpms/locmap/locmap/-/blob/master/src/locmap/scripts/cli.py?ref_type=heads#L180) for more details.