Skip to content

Releases: creative-connections/Bodylight-VirtualMachine

v2.1.38

23 Sep 09:30
36f16ef
Compare
Choose a tag to compare

This repository contains scripts and configuration to create development environment for Bodylight tool chain. Base box is minimal CENTOS 9 stream (RHEL derivative) and Vagrant scripts prepare the rest of virtual machine with recent Bodylight.js, OpenModelica (nightly 1.20 build), Python 3.x, Jupyter, Anaconda, http server. See web apps after installation at http://localhost:8080/.
to update:

vagrant destroy
vagrant box update
git pull
rm -rf /cache
# if you made some local changes to Vagrantfile - git pull may fail, 
# try: git stash;git pull;git stash apply
vagrant up

to install - follow instruction in README.md
Full Changelog: v2.0.40...v2.1.38

v2.0.40

05 Nov 09:23
Compare
Choose a tag to compare

Full Changelog: 21.09...v2.0.40

21.09

02 Sep 09:07
9984e17
Compare
Choose a tag to compare

Virtual machine for Bodylight.js

This repository contains Vagrant scripts to prepare virtual machine in VirtualBox from scratch or from preinstalled binary image. After installation Scientific Linux (clone of Redhat Enterprise Linux) and OpenModelica, Bodylight.js, Python 3.x, Julia, Jupyter, Anaconda is available. See web apps after installation at http://localhost:8080.

Motivation

Vagrant tool automates configuration (port forwarding, secure ssh keys, shared folders) and provisioning of virtual machine. Thus preventing claims works on my machine or doesn't work on my machine. Virtual machine is a reference installation to compare with different environments.

Requirements

Requirement:

  • HW: minimum 1 CPU, 4 GB RAM, min 5GB disk space.
  • OS: Any OS supported by VirtualBox and Vagrant tool (succesfully tested on Windows 7,Windows 10, Ubuntu 16.04, ...)
  • SW: Install VirtualBox, succesfully tested with version Virtualbox 6.0.14 and 6.1.8 (( Note we experienced issue VERR_NEM_VM_CREATE_FAILED - need to disable Windows features (V-Host) and see howto setup Windows 10 at https://forums.virtualbox.org/viewtopic.php?f=6&t=93712))
  • SW: Install Vagrant tested version 2.2.6 and 2.2.9
  • SW: (optional, but recommended, but you may download master.zip instead directly - see notes after git clone ... bellow) Install GIT any version.

Some OS has their own distribution of vagrant, virtualbox and git, so you may try to use it: yum install vagrant virtualbox git OR apt install vagrant virtualbox git.

Pre installation steps

(Optional) This is not required, but recommended step to clone repository of demo Jupyter notebooks and/or Physiolibrary-models next to the Bodylight-VirtualMachine on host machine,
it will appear as /vagrant_data in virtual machine and will be available for jupyter notebook after installation.
In command-line (Linux xterm, bash etc. for Windows Start-> type 'cmd' -> choos 'Command Prompt') do:

git clone https://github.com/creative-connections/Bodylight-notebooks.git
git clone https://github.com/creative-connections/Physiolibrary-models.git

If you do not have git, download and unzip master.ZIP from https://github.com/creative-connections/Bodylight-notebooks/archive/master.zip
and https://github.com/creative-connections/Physiolibrary-models/archive/master.zip

Installation

Choose either installation from sources or binary VM installation

From sources - default

Clone repository with Virtual machine scripts and run vagrant up (In command-line (Linux xterm, bash etc. for Windows Start-> type 'cmd' -> choos 'Command Prompt') do)

git clone https://github.com/creative-connections/Bodylight-VirtualMachine.git
cd Bodylight-VirtualMachine
vagrant up

If you do not have git then you may download and unzip manually the https://github.com/creative-connections/Bodylight-VirtualMachine/archive/master.zip and do vagrant up in the unzipped directory.

The first vagrant up takes 15-45 mins (or more depending on network speed) and The bootstrap scripts downloads, installs and configures all required software, ~500 MB of Anaconda (distribution of Python and Jupyter), ~700 MB OpenModelica, ~100 MB Julia and other packages. You may disable some bootstrap script by commenting them in Vagrantfile. You should see success:

    ...
    default:     [yLpj] (webpack)/buildin/global.js 472 bytes {0} [built]
    default: + exit 0

1.5 GB of depended packages (OpenModelica, Anaconda, Julia) are downloaded and persisted in host /cache subdirectory during installation.

From binary image

briefly: replace Vagrantfile with Vagrantfile.preinstalled where scripts are modified to download prepared image and configure the machine only.
In linux BASH:

git clone https://github.com/creative-connections/Bodylight-VirtualMachine.git
cd Bodylight-VirtualMachine
cp Vagrantfile.preinstalled Vagrantfile
vagrant up

or in windows command

git clone https://github.com/creative-connections/Bodylight-VirtualMachine.git
cd Bodylight-VirtualMachine
copy /Y Vagrantfile.preinstalled Vagrantfile
vagrant up

This will download and instantiate complete image (4.6 GB). There will be no further installation,compilation etc.

Update

If you have previously installed VM and would like to update or reinstall from scratch, do:

  1. Save any documents/data from VM to shared folder /vagrant folder. Other files and data will be erased.
  2. Then do following:
vagrant destroy
git pull
# if you made some local changes to Vagrantfile - git pull may fail, 
# try: git stash;git pull;git stash apply
vagrant up

This will clean VM and install the software again - if /cache is present from previous installation it will use most packages from it rather to download again from Internet repositories.

After installation

After several minutes the VM is installed and configured.
Port forwarding is done from guest VM 80 to host 8080 by default, refer Vagrantfile for exact port number. Refer default page at http://localhost:8080

The default installation contains these applications, some available from web interface:

You may access virtual desktop using VirtualBox capabilities or you may access using vagrant ssh.

If you don't need VM, you can halt it using Virtualbox UI or using

vagrant halt

If you need VM, you can boot it again using:

vagrant up

To restart VM

vagrant reload

The second and other vagrant upis rapid and should take couple of seconds, because time consuming provisioning (bootstrap scripts) is already done.

Bootstrap scripts

Installation scripts are preserved in /scripts directory, they are launched only when vagrant upis made first or when provisioning is explicitly requested by vagrant up --provision.

Halt VM

To stop VM.

vagrant halt

To start VM again - it wil start quickly as bootstrap is not needed

vagrant up

To restart VM

vagrant reload

Clean, Uninstall

To destroy VM and remove all VM files do the following. The files stored in shared folders /vagrant and /vagrant_data are preserved.

vagrant destroy

There are preserved OpenModelica and Python (Anaconda) installation binaries in /cache directory. Delete cache if you don't need it anymore

rm -rf cache

References:

Release of VM based on minimal Scientific Linux 7

24 Apr 06:56
b597085
Compare
Choose a tag to compare

Added Bodylight.js-Components and updated Bodylight.js-Composer v 2.0alpha

git clone https://github.com/creative-connections/Bodylight-VirtualMachine
vagrant up

You may use applications installed in virtual machine via command prompt (ssh, virtual desktop) or web (http://localhost:8080). VM contains these applications:

To use Bodylight.js-Composer v1.0 - use previous release of VM 20.01.

Release of VM based on minimal Scientific Linux 7

14 Jan 15:25
ccbe307
Compare
Choose a tag to compare

After

git clone https://github.com/creative-connections/Bodylight-VirtualMachine
vagrant up

You may use applications installed in virtual machine via command prompt (ssh, virtual desktop) or web (http://localhost:8080). VM contains these applications:

Release of VM based on minimal Scientific Linux 7

05 Dec 14:52
Compare
Choose a tag to compare

Additional to previous release contains

  • Julia language
  • Python kernel for Julia
  • SOS workflow - multiple kernels in one Jupyter notebook
  • PyFMI
  • jupyter as systemd service

19.08

29 Aug 15:00
Compare
Choose a tag to compare

First release of VM based on minial Scientific Linux 7 desktop with

  • jupyter notebook
  • openmodelica
  • Bodylight.js
  • Bodylight-Scenarios