issue147:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue147:c_c [2019/07/29 23:13] – créée d52fr | issue147:c_c [2019/08/08 10:10] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | I recently replaced my aging MacBook Pro with a Dell XPS 15 (7590) with the intention of once again switching to one computer for both on-the-go and at my desk (via the use of an eGPU enclosure). Until now, my main computer was my Intel NUC with an i5 which was running ArchLinux and was on 90% of the time. It ran my local web apps, Plex installation, | + | **I recently replaced my aging MacBook Pro with a Dell XPS 15 (7590) with the intention of once again switching to one computer for both on-the-go and at my desk (via the use of an eGPU enclosure). Until now, my main computer was my Intel NUC with an i5 which was running ArchLinux and was on 90% of the time. It ran my local web apps, Plex installation, |
- | Initial Setup | + | J'ai récemment remplacé mon MacBook Pro vieillissant par un Dell XPS 15 (7590) avec l' |
+ | |||
+ | **Initial Setup | ||
Setup is pretty easy - follow the instructions for Raspbian and copy it to an SD card. Then boot it. | Setup is pretty easy - follow the instructions for Raspbian and copy it to an SD card. Then boot it. | ||
Ligne 15: | Ligne 17: | ||
• External storage? | • External storage? | ||
• Airflow/ | • Airflow/ | ||
- | • A direct power connection (versus battery)? | + | • A direct power connection (versus battery)?** |
- | What will you want to do with the RPi? | + | Paramétrage initial |
+ | |||
+ | La paramétrage est plutôt facile, suivez les instructions pour Raspbian et copiez-le sur une carte SD. Puis démarrez dessus. | ||
+ | |||
+ | Configuration | ||
+ | |||
+ | Posez-vous quelques questions pour l' | ||
+ | |||
+ | Où utiliserez-vous le Rpi le plus souvent ? Sera-t-il : | ||
+ | ••Câblé à Internet ? | ||
+ | ••Sur le même réseau/la même IP (c' | ||
+ | ••Gestion du clavier/de la souris/de l' | ||
+ | ••Stockage externe ? | ||
+ | ••Environnement de refroidissement/ | ||
+ | ••Alimentation directe sur secteur (ou batterie) ? | ||
+ | |||
+ | |||
+ | **What will you want to do with the RPi? | ||
Depending on the answers to some of these questions, it may impact your decision on what model of RPi you want. If you’re worried about temperatures, | Depending on the answers to some of these questions, it may impact your decision on what model of RPi you want. If you’re worried about temperatures, | ||
Ligne 28: | Ligne 47: | ||
• Airflow shouldn’t be a problem (in both cases, it will run on a table, not tucked into a closet). | • Airflow shouldn’t be a problem (in both cases, it will run on a table, not tucked into a closet). | ||
• It’ll run directly from the A/C adapter. | • It’ll run directly from the A/C adapter. | ||
- | • It’ll run Plex, a ruby on rails app, an SSH service, a VNC service, and will most likely run more local web apps to be accessed on the local network. | + | • It’ll run Plex, a ruby on rails app, an SSH service, a VNC service, and will most likely run more local web apps to be accessed on the local network.** |
- | The Problems | + | Que voulez-vous faire avec le RPi ? |
+ | |||
+ | Suivant les réponses à certaines de ces questions, cela peut influencer votre décision sur le modèle de RPi que vous voulez. Si la température vous préoccupe, vous pouvez trouver des petits radiateurs à placer sur les puces du RPi. C'est un refroidissement passif, mais cela augmentera la surface de dissipation de la chaleur. | ||
+ | |||
+ | Dans mon scénario, les réponses sont les suivantes : | ||
+ | ••Il tournera sur des réseaux câblés et non-câblés. | ||
+ | ••L' | ||
+ | ••Il aura un accès minimal aux dispositifs d' | ||
+ | ••Il accédera à des stockages externes, mais ce ne sera pas toujours le même disque. | ||
+ | ••L' | ||
+ | ••Il tournera directement sur une prise secteur. | ||
+ | ••Il fera tourner Plex, une appli Ruby-on-Rails, | ||
+ | |||
+ | |||
+ | **The Problems | ||
There were two big problems I saw with the requirements. One problem was the inconsistent external drive, and the other issue was the changing IP address. | There were two big problems I saw with the requirements. One problem was the inconsistent external drive, and the other issue was the changing IP address. | ||
- | One problem at a time - I set up my external drive using the UUID in my fstab file, and included the nofail flag. This will ensure that the RPi will boot even if the drive is unavailable. By default it will timeout after 90 seconds, which I deemed too long. Instead, I added “x-systemd.device-timeout=30” directly after the nofail flag. This sets the timeout to 30 seconds instead. | + | One problem at a time - I set up my external drive using the UUID in my fstab file, and included the nofail flag. This will ensure that the RPi will boot even if the drive is unavailable. By default it will timeout after 90 seconds, which I deemed too long. Instead, I added “x-systemd.device-timeout=30” directly after the nofail flag. This sets the timeout to 30 seconds instead.** |
- | The other problem I still haven’t found an ideal solution for. I set up and enabled the avahi-daemon to allow an mDNS broadcast on the RPi (which should make it available under raspberrypi.local on the network). Unfortunately, | + | Les problèmes |
- | I also tried to set up static IP addresses for the 2 different networks and 3 connections modes (location 1 wired, location 1 wireless, location 2 wireless). While this seems to work more readily than avahi, it’s still not a guarantee. I’ve experienced the RPi still pulling in random IP addresses in both locations, or running on a static | + | Il y a deux gros problèmes que j'ai vu dans les exigences. Le premier était un disque externe irrégulier, et l' |
- | Setting up a rails app | + | Un problème à la fois : j'ai paramétré mon disque externe en utilisant l'UUID dans mon fichier fstab et j'ai inclus le drapeau nofail. Ça assurera que le RPi démarrera même si le disque n'est pas disponible. Par défaut, la limite de temps se déclenche au bout de 90 secondes, ce qui me semblait trop long. À la place, j'ai ajouté « x-systemd.device-timeout=30 » directement après le drapeau nofail. Ça limite le temps d' |
+ | |||
+ | **The other problem I still haven’t found an ideal solution for. I set up and enabled the avahi-daemon to allow an mDNS broadcast on the RPi (which should make it available under raspberrypi.local on the network). Unfortunately, | ||
+ | |||
+ | I also tried to set up static IP addresses for the 2 different networks and 3 connections modes (location 1 wired, location 1 wireless, location 2 wireless). While this seems to work more readily than avahi, it’s still not a guarantee. I’ve experienced the RPi still pulling in random IP addresses in both locations, or running on a static IP in the wrong network (causing a complete failure of connection, as an IP in one location is invalid in another). I’ve since then tweaked the settings, but haven’t yet thoroughly checked the results. That will happen later this summer.** | ||
+ | |||
+ | Pour l' | ||
+ | |||
+ | J'ai aussi essayé de paramétrer des adresses IP statiques pour les 2 réseaux différents et 3 modes de connexion (emplacement 1 câblé, emplacement 1 sans fil, emplacement 2 sans fil). Alors que ça semble marcher plus facilement qu' | ||
+ | |||
+ | **Setting up a rails app | ||
This part is pretty easy - just install ruby and ruby-devel. Then I cloned the git repository I stored my app in and run ‘bundle install’. It took a little while as a few items were compiled from source for the ARM architecture. | This part is pretty easy - just install ruby and ruby-devel. Then I cloned the git repository I stored my app in and run ‘bundle install’. It took a little while as a few items were compiled from source for the ARM architecture. | ||
- | I then used the trick I wrote about in FCM#145 and created a systemd service for running the rails app. I also ensured it would bind to 0.0.0.0 so that I could access the site from other devices, regardless of what the IP address was. | + | I then used the trick I wrote about in FCM#145 and created a systemd service for running the rails app. I also ensured it would bind to 0.0.0.0 so that I could access the site from other devices, regardless of what the IP address was.** |
+ | |||
+ | Paramétrer une appli Rails | ||
+ | |||
+ | Cette partie est plutôt facile - j'ai juste installé ruby et ruby-devel. Puis, j'ai cloné le dépôt git dans lequel j'ai stocké mon appli et lancé « bundle install ». Ça a pris un petit moment pendant que quelques éléments étaient compilés depuis la source pour l' | ||
+ | |||
+ | Ensuite, j'ai utilisé l' | ||
- | Setting up Plex | + | **Setting up Plex |
This was also pretty easy - I just installed the service, configured it, and started it. The media for the plex library is stored on the external drive. While the drives can change, the locations should remain the same. On the smaller external drive the selection of media will also change. | This was also pretty easy - I just installed the service, configured it, and started it. The media for the plex library is stored on the external drive. While the drives can change, the locations should remain the same. On the smaller external drive the selection of media will also change. | ||
- | One note here: the RPi took a long time processing all the files and loading the metadata. During this time it was frequently unresponsive and laggy. I feared at first that this might be too much for the device. However, once the initial scans and metadata loading was done, it’s been absolutely fine for streaming both on a wired and a wireless connection, as well as casting to a TV. | + | One note here: the RPi took a long time processing all the files and loading the metadata. During this time it was frequently unresponsive and laggy. I feared at first that this might be too much for the device. However, once the initial scans and metadata loading was done, it’s been absolutely fine for streaming both on a wired and a wireless connection, as well as casting to a TV.** |
- | Connecting | + | Paramétrer Plex |
+ | |||
+ | C'est tout aussi facile. J'ai juste installé le service, l'ai configuré et démarré. Les médias pour la bibliothèque Plex est stockée sur disque externe. Alors que les disques peuvent changer, les emplacements doivent rester les mêmes. Sur le disque externe plus petit, la sélection des médias changera aussi. | ||
+ | |||
+ | Une note ici : le RPi a pris un long moment pour traiter tous les fichiers et charger les méta-données. Durant ce temps, il était souvent très lent et ne répondait pas. J'ai d' | ||
+ | |||
+ | **Connecting | ||
I had to initially connect it to a monitor, keyboard and mouse – as I hadn’t booted the device in some time, and I couldn’t connect to it using the information I had stored. In this case, the IP address it was supposed to be using had been occupied by another device, and so it received a random one. | I had to initially connect it to a monitor, keyboard and mouse – as I hadn’t booted the device in some time, and I couldn’t connect to it using the information I had stored. In this case, the IP address it was supposed to be using had been occupied by another device, and so it received a random one. | ||
- | I then took the time to use the direct input methods to run the dist-upgrade I needed, and then rebooted after tweaking the fstab file. | + | I then took the time to use the direct input methods to run the dist-upgrade I needed, and then rebooted after tweaking the fstab file.** |
- | After I knew the IP address the device was running (and avahi-daemon was working), I connected instead using VNC and SSH (VNC when I was trying to test the rails app and had to check in a local web browser, and SSH whenever I needed to quickly change a file or run a service). The RealVNC service I’m running is surprisingly good. I remember my last experience using VNC frequently were weird colors, artifacts, and a laggy interface. On this new laptop I’ve had no such issues. | + | Connexions |
- | I also took the time to set up a samba share on the RPi to share the external drive location on my local network. This way I can quickly and easily add media files to Plex if I need to. I didn’t need to do anything beyond the basic steps - install it, run it, and create | + | Je l'ai d' |
- | Verdict | + | Puis j'ai pris le temps d' |
+ | |||
+ | **After I knew the IP address the device was running (and avahi-daemon was working), I connected instead using VNC and SSH (VNC when I was trying to test the rails app and had to check in a local web browser, and SSH whenever I needed to quickly change a file or run a service). The RealVNC service I’m running is surprisingly good. I remember my last experience using VNC frequently were weird colors, artifacts, and a laggy interface. On this new laptop I’ve had no such issues. | ||
+ | |||
+ | I also took the time to set up a samba share on the RPi to share the external drive location on my local network. This way I can quickly and easily add media files to Plex if I need to. I didn’t need to do anything beyond the basic steps - install it, run it, and create a Samba share and password for the pi user.** | ||
+ | |||
+ | Une fois que je connaissais l' | ||
+ | |||
+ | J'ai aussi pris le temps de paramétrer un partage Samba sur le RPi pour partager l' | ||
+ | |||
+ | **Verdict | ||
Is everything as fast and reliable as when it ran on my NUC? No. On the other hand, it’s portable, small, quiet, and doesn’t draw as much power. So far, I haven’t run into any showstoppers, | Is everything as fast and reliable as when it ran on my NUC? No. On the other hand, it’s portable, small, quiet, and doesn’t draw as much power. So far, I haven’t run into any showstoppers, | ||
- | So for any readers who are hoping to use their Raspberry Pi for more than just tinkering - I say go for it! To any readers out there who have found a good solution to always knowing the device’s IP address, please do let me know! As always, any questions, comments, or suggestions can be sent to me at lswest34+fcm@gmail.com. | + | So for any readers who are hoping to use their Raspberry Pi for more than just tinkering - I say go for it! To any readers out there who have found a good solution to always knowing the device’s IP address, please do let me know! As always, any questions, comments, or suggestions can be sent to me at lswest34+fcm@gmail.com.** |
+ | |||
+ | Verdict | ||
+ | |||
+ | Est-ce que c'est aussi rapide et fiable que quand ça tournait sur mon NUC ? Non. En revanche, c'est portable, petit, silencieux et consomme peu. Jusqu' | ||
+ | |||
+ | Aussi, pour tous les lecteurs qui espèrent utiliser leur Raspberry Pi pour autre chose que du bricolage, je vous dis d'y aller ! À tous les lecteurs qui auraient trouvé une bonne solution pour connaître l' |
issue147/c_c.1564434786.txt.gz · Dernière modification : 2019/07/29 23:13 de d52fr