# Entwicklungs VirtualBox

# Aufsetzen der Virtuellen Maschine

Basis System installieren und Standard Setup anpassen.

# Installation Raspberry Desktop

##### Installationsmedium herunterladen und entpacken

[Download](https://www.raspberrypi.org/downloads/raspberry-pi-desktop/)

##### Neue Virtuelle Maschine anlegen und konfigurieren

- Architektur: Debian (32 bit)
- Festplattengröße auf 16 GB erhöhen (Standard: 8GB)
- ISO Image des Installationsmedium als optisches Laufwerk einhängen

##### Installation durchführen - Raspberry Desktop

- In Grub Menü `Installation` wählen
- Gesamte Festplatte nutzen mit einer Partition und Standard Bootloader Installation
- Nach erstem Start: Sprache und Standort auf Deutschland setzen.
- Passwort für Benutzer "pi" leer lassen (oder setzen und merken...)
- Updates für Anwendungen "skippen"
- Unter `Einstellungen` =&gt; `Recommended Software` alle Anwendungen abwählen

[![VirtualBox_CasaCorrently_19_07_2020_15_08_19.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_08_19.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_08_19.png)

- Zum Abschluss einen Neustart durchführen

# Casa Corrently installieren

In diesem Schritt wird von GitHub ein Installationsscript geladen, welches alle Pakete installiert, das System auf den aktuellen Stand bringt und eine Standard InfluxDB einrichtet.

Diese Schritte werden in einer Shell ausgeführt.

[![VirtualBox_CasaCorrently_19_07_2020_15_14_15.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_14_15.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_14_15.png)

```shell
sudo -s
cd /opt
git clone https://github.com/energychain/casa.corrently.git
cd casa.corrently
chmod +x install.sh
./install.sh
```

- Are you really sure you want to install as root? =&gt; `'Y'`
- Are you really sure you want to do this? =&gt;`'Y'`
- Would you like to re-install pi-specific components =&gt; `'Y'`

Hintergrund: Diese virtuelle Maschine soll nicht in einem produktiven Betrieb zum Einsatz kommen. Die Installation als *root* (Superuser) vereinfacht hier jedoch den Installationsprozess sehr stark.

[![VirtualBox_CasaCorrently_19_07_2020_15_16_29.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_16_29.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_16_29.png)

Der Installer wird zwar ein Grafana installieren, jedoch kann dieses nicht gestartet werden, da die Auswahl der Prozessorarchitektur nicht richtig erfolgt.

Bei der installierten InfluxDB wird eine Datenbank und ein Nutzer `casa` angelegt. Der Nutzer hat das Passwort `corrently`. Mit diesen Anmeldedaten ist ein [Vorlagen Flow für Casa-Corrently](https://github.com/energychain/casa.corrently/blob/master/skeletonFlow.json) bereits konfiguriert.

Am Ende des Installers wird automatisch ein Reboot eingeleitet.

# Erster Start

[![VirtualBox_CasaCorrently_19_07_2020_15_33_46.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_33_46.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_33_46.png)

Mit der Weltkugel kann ein Browser geöffnet werden.

##### Node-Red Konfiguration testen/kennenlernen

Im Browser öffnen: [http://localhost:1880/](http://localhost:1880/)

[![VirtualBox_CasaCorrently_19_07_2020_15_36_08.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_36_08.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_36_08.png)

Überprüfung der InfluxDB Anbindung

- In Ebene 0 wechseln
- Dort den Knoten `e0generation` auswählen mit Doppelklick

[![VirtualBox_CasaCorrently_19_07_2020_15_38_55.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_38_55.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_38_55.png)

In den Einstellungen sollte der Server hinterlegt sein

[![VirtualBox_CasaCorrently_19_07_2020_15_39_38.png](https://casa.corrently.de/uploads/images/gallery/2020-07/scaled-1680-/VirtualBox_CasaCorrently_19_07_2020_15_39_38.png)](https://casa.corrently.de/uploads/images/gallery/2020-07/VirtualBox_CasaCorrently_19_07_2020_15_39_38.png)

-