Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates install scripts #150

Conversation

prasadtalasila
Copy link
Contributor

@prasadtalasila prasadtalasila commented Oct 4, 2023

This PR addresses issue #119 . The progress so far:

Status

  • Update deploy/single-script-install.sh
  • Update script/env.sh and script/docker.sh
  • Cleans up deploy/vagrant/make_boxes/dtaas to separate user and developer environments

Pushed to next PR:

  • Update deploy/install.sh
  • Pull out secrets of shell scripts (esp deploy/vagrant/two-machine/services.sh) into .secrets file

curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | \
gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

curl -fsSL "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" | \
gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

* nodejs and yarn
* jupyter
* microk8s
* Provide cross-platform installation of the DTaaS application. Any operating
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists should be surrounded by blank lines

* influxdb v2.7
* grafana v10.1
* rabbitmq v3-management
* eclipse-mosquitto (mqtt) v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

* Provide cross-platform installation of the DTaaS application. Any operating
system supporting use of vagrant software utility can support installation of
the DTaaS software.
* Create a ready to use development environment for code contributors.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists should be surrounded by blank lines

@prasadtalasila
Copy link
Contributor Author

prasadtalasila commented Oct 4, 2023

@nichlaes These scripts will be part of the new release and are ones need to be checked. I will complete most of them by next Monday. These will be ready by the time you start checking on Tuesday next week.

script/env.sh Outdated
sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
fi
NODE_MAJOR=18
printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
fi
NODE_MAJOR=18
printf "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use variables in the printf format string. Use printf "..%s.." "$foo".

Currently No. **We are looking for users needing this capability.**
**If you have concrete requirements and an example, we can discuss a way**
**of realizing it in DTaaS**.
Currently No. **We are looking for users needing this capability.**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

caters to your needs. You can skip the next step and continue with the
creation of vagrant box.

If you are a developer and would like additional software installed, you need
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

* influxdb v2.7
* grafana v10.1
* rabbitmq v3-management
* eclipse-mosquitto (mqtt) v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2023

Codecov Report

Merging #150 (cc6530b) into feature/distributed-demo (cf516fa) will decrease coverage by 27.10%.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@                      Coverage Diff                      @@
##           feature/distributed-demo     #150       +/-   ##
=============================================================
- Coverage                     93.02%   65.93%   -27.10%     
=============================================================
  Files                             4       42       +38     
  Lines                            43      543      +500     
  Branches                          3       31       +28     
=============================================================
+ Hits                             40      358      +318     
- Misses                            0      166      +166     
- Partials                          3       19       +16     

see 38 files with indirect coverage changes

Components Coverage Δ
Website 62.72% <ø> (∅)
Lib Microservice 66.38% <ø> (∅)

| `developer.sh` | developer installation | :x: |

If you are installing the DTaaS for developers, the default installation
caters to your needs. You can skip the next step and continue with the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

caters to your needs. You can skip the next step and continue with the
creation of vagrant box.

If you are a developer and would like additional software installed, you need
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

| `developer.sh` | developer installation | :x: |

If you are installing the DTaaS for developers, the default installation
caters to your needs. You can skip the next step and continue with the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces


## Installed Software
* Provide cross-platform installation of the DTaaS application. Any operating
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists should be surrounded by blank lines

* Provide cross-platform installation of the DTaaS application. Any operating
system supporting use of vagrant software utility can support installation of
the DTaaS software.
* Create a ready to use development environment for code contributors.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists should be surrounded by blank lines

* nodejs and yarn
* jupyter
* microk8s
* Provide cross-platform installation of the DTaaS application. Any operating system supporting use of vagrant software utility can support installation of the DTaaS software.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@astitva1905 If the line is broken into two lines, then another error comes:

Lists should be surrounded by blank lines

do you know of a good way to resolve this problem?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Prasad
Simply shift some part to the next line and then add enough spaces at the beginning of the line so that the indentation matches the indentation of “Provide”. It should work then.


## Installed Software
* Provide cross-platform installation of the DTaaS application. Any operating system supporting use of vagrant software utility can support installation of the DTaaS software.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

DTaaS is software platform on which you can create and run digital twins.
Please see the [features](user/features.md) page
to get a sense of the things you can do in DaaS.
DTaaS is software platform on which you can create and run digital twins.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

| Availability | It is a matter of human resources. If you have human
resources to maintain DTaaS round the clock,
upwards 95% is easily possible. |
| Key Performance Indicator | Value |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

on Linux-based xfce Desktop environment.
Users can install software in their workspaces. The licensed software
installed by one user is not available to another user.
The licensed software are not available on the software platform.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

@astitva1905
Copy link
Collaborator

astitva1905 commented Oct 7, 2023 via email

Linux desktop / terminal tools inside the DTaaS. So you can create
models inside DTaaS and run them using tools that can run in Linux.
The Windows only tools can not run in DTaaS.
DTaaS is not a model creation tool. You can put model creation tool
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

these kinds of tools, you need to bring them onto the platform.
For example, if you need Matlab for your work, you need to bring
he licensed Matlab software.
Well, DTaaS by itself does not produce any models. DTaaS only provides
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


??? Question "Commercial DT platforms in market provide modelling and simulation alongside integration and UI. DTaas is not able to do any modelling or simulation on its own like other commercial platforms. Is this a correct understanding?"

Yes, you are right
Yes, you are right
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

DTaaS does not provide dedicated solvers. But if you can install
a solver in your workspace, then you don't need the platform
to provide one.
The DTaaS as such is agnostic to the kind of models you use. DTaaS can
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

services for digital twin communication.
Having said that, DTaaS allows you to utilize other communication
technologies and services hosted elsewhere on the Internet.
The real measurements are done at physical twin which are then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

support execution of digital twins. If a tool can be executed on
a Linux desktop / commandline, the tool can be supported within DTaaS.
The tool (ex. Matlab) itself can take care of the metadata requirements.
DTaaS can not understand the static or dynamic nature of data.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

communication with relative ease.
You can use InfluxDB, RabbitMQ and Mosquitto services hosted on DTaaS for
two communication between digital and physical entities.
At a very abstract level, there is a communication from physical entity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

broker services. There is a user interface for InfluxDB which can be
used to analyze the data collected.
Users can also manually upload their data files into DTaaS.
The DTaaS provids InfluxDB, RabbitMQ, MQTT services. Both the physical twin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


??? Question "Which transmission protocol does DTaaS allow?"

InfluxDB, RabbitMQ, MQTT and anything else that can be used from
Cloud service providers.
InfluxDB, RabbitMQ, MQTT and anything else that can be used from
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

You can store information from multiple sources. The existing InfluxDB
services hosted on DTaaS already has a dedicated Influx / Flux query
language for doing sensor fusion, analysis and inferences.
You can store information from multiple sources. The existing InfluxDB
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

@prasadtalasila prasadtalasila force-pushed the update-install-scripts branch from cb1e8fd to 1bfa2b5 Compare October 8, 2023 14:22
Graphical, geometric and images. If you need specific licensed software
for the visualization, you will have to bring the license for it.
DTaaS does not support AR/VR.
Graphical, geometric and images. If you need specific licensed software
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


??? Question "Can DTaaS collect data directly from sensors?"

Yes
Yes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


??? Question "Is DTaaS able to transmit data to cloud in real time?"

Yes
Yes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


## Platform Native Services on DTaaS Platform

??? Question "Is DTaaS able to detect the anomalies about-to-fail components and prescribe solutions?"

This is the job of a digital twin. If you have a ready to use digital twin
that does the job, DTaaS allows others to use your solution.
This is the job of a digital twin. If you have a ready to use digital twin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

... & Gomes, C. (2023). Digital twin of electric vehicle battery systems:
Comprehensive review of the use cases, requirements, and platforms.
Renewable and Sustainable Energy Reviews, 179, 113280.
Here is a qualitative comparison of different DT integration platforms:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

docs/thanks.md Outdated
@@ -12,8 +12,8 @@ Henrik Ejersbo, Tanusree Roy, Farshid Naseri

1. Talasila, P., Gomes, C., Mikkelsen, P. H., Arboleda, S. G., Kamburjan,
E., & Larsen, P. G. (2023).
[Digital Twin as a Service (DTaaS): A Platform for Digital Twin Developers and Users](https://arxiv.org/abs/2305.07244).
arXiv preprint arXiv:2305.07244.
Digital Twin as a Service (DTaaS): A Platform for Digital Twin Developers and Users
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

Content-Type: application/json; charset=utf-8
Date: Tue, 26 Sep 2023 20:26:49 GMT
X-Powered-By: Express
{"data":{"listDirectory":{"repository":{"tree":{"blobs":{"edges":[]},"trees":{"edges":[{"node":{"name":"data","type":"tree"}},{"node":{"name":"digital twins","type":"tree"}},{"node":{"name":"functions","type":"tree"}},{"node":{"name":"models","type":"tree"}},{"node":{"name":"tools","type":"tree"}}]}}}}}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

Content-Type: application/json
Content-Length: 217
{
"query":"query {\n readFile(path: \"user2/data/welcome.txt\") {\n repository {\n blobs {\n nodes {\n name\n rawBlob\n rawTextBlob\n }\n }\n }\n }\n}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

Content-Type: application/json; charset=utf-8
Date: Wed, 27 Sep 2023 09:17:18 GMT
X-Powered-By: Express
{"data":{"readFile":{"repository":{"blobs":{"nodes":[{"name":"welcome.txt","rawBlob":"hello world","rawTextBlob":"hello world"}]}}}}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line length

X-Powered-By: Express
{"data":{"listDirectory":{"repository":{"tree":{"blobs":{"edges":[]},"trees":{"edges":[{"node":{"name":"data","type":"tree"}},{"node":{"name":"digital twins","type":"tree"}},{"node":{"name":"functions","type":"tree"}},{"node":{"name":"models","type":"tree"}},{"node":{"name":"tools","type":"tree"}}]}}}}}}
```
``` http-response
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

name
rawBlob
rawTextBlob
```graphql-request
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

X-Powered-By: Express
{"data":{"readFile":{"repository":{"blobs":{"nodes":[{"name":"welcome.txt","rawBlob":"hello world","rawTextBlob":"hello world"}]}}}}}
```
```http-response
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style

Azure services or third-party services to get the kind of capabilities
that GE Predix natively provides in one interface.
The takeaway is that we pick horses for the courses.
The fundamental confusion comes from the fact that different DT platforms
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block style


### Gitlab OAuth application

The DTaaS react website requires Gitlab OAuth provider.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

@codeclimate
Copy link

codeclimate bot commented Oct 9, 2023

Code Climate has analyzed commit cc6530b and detected 23 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 23

View more on Code Climate.

@prasadtalasila prasadtalasila merged commit 10b4924 into INTO-CPS-Association:feature/distributed-demo Oct 9, 2023
@prasadtalasila prasadtalasila deleted the update-install-scripts branch October 9, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants