Skip to content
Snippets Groups Projects
Commit f6c2a538 authored by Florent Gluck's avatar Florent Gluck
Browse files

updated README.md and docs

parent d3e8521b
Branches
No related tags found
No related merge requests found
......@@ -14,23 +14,27 @@ Nexus VDI is divided into three components:
- Exposes a REST API to manage users, VMs and templates
**[nexus-client](docs/client.md)**
- Documentation about how to use nexus clients [is described here](docs/client.md)
- Documentation on how to use nexus clients [is described here](docs/client.md)
- The client or end-user program to manage users, VMs and templates
- The client uses REST messages to communicate with `nexus-server`
- The client can be run from anywhere (locally or remotely) as long as it can communicate with `nexus-server`
- Two clients have been developed so far:
- `nexush`: an interactive command line client, similar to a shell. It is the most user-friendly way to interact with `nexus-server`, but it is not suited for scripting
- `nexus-cli`: a collection of commands particularly suited to scripting and automated operations
- Both clients offer the same commands, functionalities and syntax
- Most commands accept regular expressions so that many VMs can be created/started/stopped/destroyed/etc. at once
- The "vmattach" command allows users to interact with their VM's desktop
- requires `remote-viewer` which is part of the [virt-viewer project](https://gitlab.com/virt-viewer/virt-viewer.git)
**nexus-exam**
- A minimalistic graphical application used during live exams
- Doesn't feature any option and only allows a student to connect to her/his running VM
- Its source code resides within the nexus-client codebase despite technically not being a nexus-client
## Installation
Instructions on how to build and install nexus-server for development and production use, as well as building clients, [are described here](docs/install.md).
- The client uses REST messages to communicate with **nexus-server**
- The client can be run from anywhere (locally or remotely) as long as it can communicate with **nexus-server**
- Three clients have been developed so far:
- **nexush**
- interactive command line client, similar to a shell
- currently, the most user-friendly way to interact with **nexus-server**
- not suited to scripting or automated operations
- **nexus-cli**
- provides the same features and commands syntax as nexush
- by opposition to nexush, it is well suited to scripting and automated operations
- **nexus-exam**
- basic graphical application used by students during live exams to connect to their running VMs
- Clients need the `remote-viewer` third party application in order to view and interact with VMs' desktops
- `remote-viewer` is part of the [virt-viewer project](https://gitlab.com/virt-viewer/virt-viewer.git)
## Build and installation
[This documentation describes](docs/install.md) instructions on how to:
- build, install and run nexus-server for development and production
- build and run nexus clients
......@@ -3,7 +3,7 @@ author: Florent Gluck - Florent.Gluck@hesge.ch
title: Virtual Desktop Infrastructure (VDI) with Nexus
date: \vspace{.5cm} \footnotesize \today
date: \vspace{.5cm} \footnotesize July 15, 2023
pandoc-latex-fontsize:
- classes: [tiny]
......
......@@ -3,7 +3,7 @@ author: Florent Gluck - Florent.Gluck@hesge.ch
title: Infrastructure de bureau virtuel (VDI) avec Nexus
date: \vspace{.5cm} \footnotesize \today
date: \vspace{.5cm} \footnotesize 15 juillet 2023
pandoc-latex-fontsize:
- classes: [tiny]
......
......@@ -3,14 +3,11 @@ title : |
Programmation Système\
\
Librairies
solutions : false
author :
- "Professeur : Florent Gluck"
date : \today
papersize : A4
geometry : "left=2.5cm,right=2cm,top=1.5cm,bottom=2cm"
colorlinks : urlcolor
fontsize : 12pt
fontsize : 11pt
lang : fr-CH
---
......@@ -73,16 +70,6 @@ Sachant que `testat` utilisera la librairie `stat`, créez le sous-répertoire `
Quels fichiers avez-vous copiés dans le répertoire `lib` ?
\begin{comment}
\begin{lstlisting}
mkdir lib
cp -d ../ex1/stat.h lib
cp -d ../ex1/libstat.so.1.3.7 lib
cp -d ../ex1/libstat.so lib
cp -d ../ex1/libstat.a lib
\end{lstlisting}
\end{comment}
Tout comme pour l'exercice précédent, écrivez un Makefile permettant de générer chaque exécutable, dynamique et statique, en respectant les points suivants :
- l'exécutable `testat` lié en dynamique doit se trouver dans le sous-répertoire `dyn`
......@@ -97,23 +84,7 @@ Assurez-vous que vos dépendences sont correctes. Par exemple, si le répertoire
Observez le contenu du répertoire `lib` afin de répondre aux questions suivantes :
1. Quels fichier(s) de la librairie `stat` est/sont nécessaire(s) à la génération du programme `dyn/testat` ?
\vspace{.3cm}
1. Quels fichier(s) de la librairie `stat` est/sont nécessaire(s) à la génération du programme `static/testat` ?
\vspace{.3cm}
\begin{comment}
\begin{lstlisting}
dyn/testat:
stat.h
libstat.so
libstat.so.1.3.7 (car libstat.so pointe dessus)
static/testat:
stat.h
libstat.a
\end{lstlisting}
\end{comment}
## Exercice 3 - Utilisation de la lib stat pour l'exécution
......@@ -128,92 +99,20 @@ Commencez par vérifier que :
Comment avez-vous déterminé cela ?
\begin{comment}
\begin{lstlisting}
$ file static/testat
static/testat: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=3c63956edb77e9ff351093c28be73f26253dd344, for GNU/Linux 3.2.0, not stripped
$ file dyn/testat
dyn/testat: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f9868a388953edb7171b74b9a6e73f8a33e96ba6, for GNU/Linux 3.2.0, not stripped
\end{lstlisting}
\end{comment}
Ensuite, comparez les tailles des deux exécutables `testat`.
Quelles sont les tailles respectives de chaque exécutable et pourquoi ont-ils des tailles si différentes ?
\begin{comment}
\begin{lstlisting}
dyn/testat: 17KB
static/testat: 897KB
\end{lstlisting}
\end{comment}
Passez maintenant à l'exécution :
1. Déplacez-vous dans le répertoire `ex2/static/` et exécutez `testat`.
- Est-ce que celui-ci s'exécute correctement ?
\begin{comment}
\begin{lstlisting}
Oui, il s'exécute correctement: ./static/testat
\end{lstlisting}
\end{comment}
\vspace{.3cm}
1. Déplacez-vous dans le répertoire `ex2/dyn/` et exécutez `testat`.
- Est-ce que celui-ci s'exécute correctement ?
- Pourquoi ne peut-il pas être exécuté, contrairement à la version statique ?
- Que devez-vous faire pour exécuter `ex2/dyn/testat` ?
\begin{comment}
\begin{lstlisting}
Non, il ne fonctionne pas car le chargeur ne sait pas où trouver la librairie libstat.so.1 dont dépend l'exécutable :
$ ./testat
./testat: error while loading shared libraries: libstat.so.1: cannot open shared object file: No such file or directory
Il faut donc rajouter cette librairie, p.ex. dans le répertoire lib, puis indiquer au chargeur ce nouveau répertoire car ce n'est pas un répertoire système qu'il inspecte par défaut :
$ cp -d ../ex1/libstat.so.1 lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib
./dyn/testat
\end{lstlisting}
\end{comment}
Maintenant que vous avez réussi à exécuter chaque programme, vous devriez pouvoir facilement répondre à ces questions :
1. Quels fichier(s) de la librairie `stat` est/sont nécessaire(s) à l'exécution du programme `dyn/testat` ?
\vspace{.3cm}
1. Quels fichier(s) de la librairie `stat` est/sont nécessaire(s) à l'exécution du programme `static/testat` ?
\vspace{.3cm}
\begin{comment}
\begin{lstlisting}
dyn/testat:
libstat.so.1
libstat.so.1.3.7 (car libstat.so.1 pointe dessus)
static/testat:
aucun
\end{lstlisting}
\end{comment}
<!--
## Exercice 4 - Comparaisons
On génère la même lib de 2 manières différentes :
1) Toutes les fonctions sont dans le même .o
1) Chaque fonction se trouve dnans un .o séparé
A partir du même code source, on génère 2 exécutables liés **statiquement** :
- Remarquez-vous une différence de taille entre ces 2 exécutables ?
- Comment expliquez vous les tailles observées ?
Ensuite, à partir du même code source, on génère 2 exécutables liés **dynamiquement** :
- Remarquez-vous une différence de taille entre ces 2 exécutables ?
- Comment expliquez vous les tailles observées ?
-->
\ No newline at end of file
SRCS=$(wildcard *.md)
PDFS=$(SRCS:%.md=%.pdf)
PDFS_CORR=$(SRCS:%.md=%_corr.pdf)
UID=$(shell id -u)
GID=$(shell id -g)
......@@ -8,14 +7,8 @@ all: doc
doc: $(PDFS)
corr: $(PDFS_CORR)
%.pdf: %.md
docker run --user $(UID):$(GID) --rm --mount type=bind,src="$(PWD)",dst=/src thxbb12/md2pdf build_lab $<
%_corr.pdf: %.md
docker run --user $(UID):$(GID) --rm --mount type=bind,src="$(PWD)",dst=/src thxbb12/md2pdf build_lab_corr $<
clean:
rm -f $(PDFS) $(PDFS_CORR)
rm -f $(PDFS)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment