From 06aece38f54866c3a9b463b2b4a8d71986b32883 Mon Sep 17 00:00:00 2001 From: Maaike Date: Wed, 4 Sep 2024 14:32:19 +0200 Subject: [PATCH] updates --- .../accessing-your-student-vm.en.md | 6 ++- .../automating-data-ingestion.en.md | 2 +- .../connecting-to-wis2-over-mqtt.en.md | 2 +- environment/setup_student_vm.sh | 41 +++++++------------ 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/documentation/docs/practical-sessions/accessing-your-student-vm.en.md b/documentation/docs/practical-sessions/accessing-your-student-vm.en.md index c96797a7..e4c2d88a 100644 --- a/documentation/docs/practical-sessions/accessing-your-student-vm.en.md +++ b/documentation/docs/practical-sessions/accessing-your-student-vm.en.md @@ -145,7 +145,11 @@ returns: exercise-materials wis2box-1.0b8 ``` -You can use WinSCP to connect to your instance and inspect the contents of your home directory and download or upload files between your VM and your local PC. +If you have WinSCP installed on your local PC, you can use it to connect to your student VM and inspect the contents of your home directory and download or upload files between your VM and your local PC. + +WinSCP is not required for the training, but it can be useful if you want to edit files on your VM using a text editor on your local PC. + +Here is how you can connect to your student VM using WinSCP: Open WinSCP and click on the "New Site". You can create a new SCP connection to your VM as follows: diff --git a/documentation/docs/practical-sessions/automating-data-ingestion.en.md b/documentation/docs/practical-sessions/automating-data-ingestion.en.md index 37e4c737..a07f3744 100644 --- a/documentation/docs/practical-sessions/automating-data-ingestion.en.md +++ b/documentation/docs/practical-sessions/automating-data-ingestion.en.md @@ -181,7 +181,7 @@ The synop2bufr plugin relies on a file-pattern to extract the date from the file The filename was used to determine the year and month of the data sample. -## Exercise 5: ingesting data using the wis2box-ftp service +## Exercise 4: ingesting data using the wis2box-ftp service You can add an additional service that adds an ftp-endpoint on your wis2box-instance. This service will forward data uploaded via ftp to the MinIO storage service, preserving the directory structure of the uploaded data. diff --git a/documentation/docs/practical-sessions/connecting-to-wis2-over-mqtt.en.md b/documentation/docs/practical-sessions/connecting-to-wis2-over-mqtt.en.md index a5fd8bc1..96e1d3b2 100644 --- a/documentation/docs/practical-sessions/connecting-to-wis2-over-mqtt.en.md +++ b/documentation/docs/practical-sessions/connecting-to-wis2-over-mqtt.en.md @@ -68,7 +68,7 @@ Note that MQTT is primarily used for "machine-to-machine" communication; meaning To view messages published by a WIS2 Global Broker you can "MQTT Explorer" which can be downloaded from the [MQTT Explorer website](https://mqtt-explorer.com). -Open MQTT Explorer and add a new connection to the Global Broker hosted by China Meteorological Administration using the following details: +Open MQTT Explorer and add a new connection to the Global Broker hosted by MeteoFrance using the following details: - host: globalbroker.meteo.fr - port: 8883 diff --git a/environment/setup_student_vm.sh b/environment/setup_student_vm.sh index ce186ebb..96853f62 100644 --- a/environment/setup_student_vm.sh +++ b/environment/setup_student_vm.sh @@ -23,37 +23,24 @@ read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][e # execute commands over ssh # create the user, if not already existing -ssh wmo_admin@`echo $HOST_IP` "sudo useradd "$USERNAME" -m -G docker --shell /bin/bash" +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "sudo useradd "$USERNAME" -m -G docker --shell /bin/bash" # set the initial password to "wis2training" -ssh wmo_admin@`echo $HOST_IP` "echo "$USERNAME":wis2training | sudo chpasswd" +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "echo "$USERNAME":wis2training | sudo chpasswd" # rename the hostname to student-vm- -ssh wmo_admin@`echo $HOST_IP` "sudo hostnamectl set-hostname student-vm-`echo $USERNAME`" +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "sudo hostnamectl set-hostname student-vm-`echo $USERNAME`" -# copy the latest wis2box-setup-1.0b5.zip to the student-vm -ssh wmo_admin@`echo $HOST_IP` "wget https://github.com/wmo-im/wis2box/releases/download/1.0b5/wis2box-setup-1.0b5.zip -O /tmp/wis2box-setup-1.0b5.zip" -# unzip the wis2box-setup-1.0b5.zip -ssh wmo_admin@`echo $HOST_IP` "sudo unzip -o /tmp/wis2box-setup-1.0b5.zip -d /home/`echo $USERNAME`/" -# remove the wis2box-setup-1.0b5.zip -ssh wmo_admin@`echo $HOST_IP` "rm -rf /tmp/wis2box-setup-1.0b5.zip" +# copy the latest wis2box-setup-1.0b8.zip to the student-vm +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "wget https://github.com/wmo-im/wis2box/releases/download/1.0b8/wis2box-setup-1.0b8.zip -O /tmp/wis2box-setup-1.0b8.zip" +# unzip the wis2box-setup-1.0b8.zip +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "sudo unzip -o /tmp/wis2box-setup-1.0b8.zip -d /home/`echo $USERNAME`/" +# remove the wis2box-setup-1.0b8.zip +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "rm -rf /tmp/wis2box-setup-1.0b8.zip" # copy the latest exercise materials to the student-vm -ssh wmo_admin@`echo $HOST_IP` "wget https://training.wis2box.wis.wmo.int/exercise-materials.zip -O /tmp/exercise-materials.zip" +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "wget https://training.wis2box.wis2dev.io/exercise-materials.zip -O /tmp/exercise-materials.zip" # unzip the exercise-materials.zip -ssh wmo_admin@`echo $HOST_IP` "sudo unzip -o /tmp/exercise-materials.zip -d /home/`echo $USERNAME`/" +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "sudo unzip -o /tmp/exercise-materials.zip -d /home/`echo $USERNAME`/" # remove the exercise-materials.zip -ssh wmo_admin@`echo $HOST_IP` "rm -rf /tmp/exercise-materials.zip" - -# create ftp.env -ssh wmo_admin@`echo $HOST_IP` "echo MYHOSTNAME=`echo $USERNAME`.wis2.training > /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo FTP_USER=wis2box >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo FTP_PASS=wis2box >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo FTP_HOST=`echo $USERNAME`.wis2.training >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo "WIS2BOX_STORAGE_ENDPOINT=http://`echo $USERNAME`.wis2.training:9000" >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo WIS2BOX_STORAGE_USERNAME=minio >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo WIS2BOX_STORAGE_PASSWORD=minio123 >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "echo LOGGING_LEVEL=WARNING >> /tmp/ftp.env" -ssh wmo_admin@`echo $HOST_IP` "sudo cp /tmp/ftp.env /home/`echo $USERNAME`/wis2box-1.0b8/" -# remove /tmp/ftp.env -ssh wmo_admin@`echo $HOST_IP` "rm -rf /tmp/ftp.env" - -ssh wmo_admin@`echo $HOST_IP` "sudo chown -R `echo $USERNAME`:`echo $USERNAME` /home/`echo $USERNAME`" \ No newline at end of file +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "rm -rf /tmp/exercise-materials.zip" + +ssh -o StrictHostKeyChecking=no wmo_admin@`echo $HOST_IP` "sudo chown -R `echo $USERNAME`:`echo $USERNAME` /home/`echo $USERNAME`" \ No newline at end of file