(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
Presentazione resin.io
1. RESIN.IO
Gianluca Leo
Sapienza university of rome
Department of computer, control and management engineering (DIAG)
Pervasive system
GitHub:
Linkedin:
Email: gianluca.leo.19@gmail.com
https://github.com/GLeo93/Resin.io-Project/blob/master/README.md
https://www.linkedin.com/in/gianluca-leo-724032116?trk=hp-identity-photo
2. Resin.io makes it simple to:
deploy
update
mantein code running on remote devices.
What’s Resin.io?
3. Connected Home
Anything else you can think of...
Marketing & Retail
Manufacturing & Logistics
What’s Resin.io for?
4. Push your project in
Resin.io cloud
..and it compiles for
device’s architecture
Compilation in the cloud
5. 1 2 3
Insert your email Create your profile
Insert a SSH Key to
transfer safely
Signing up
6. ..So let’s start, what you need
A supported device
from the list
A 4GB or larger SD card
Ethernet cable or
Wifi adapter
Micro usb cable
Some awesome
ideas
7. Click on Download
device OS
Specify how your
device connects to
the internet
Format your SD
card in FAT32
Copy the device
OS into the SD
card
To add a device you have to:
Push the card
into the devices
Getting started with add a device
8. You can also add more devices if you need
Devices
connect
At most 5 for free
9. What’s install on the device?
Operating system: Yocto Linux
Application Environment: RCE
(Resin Container Engine)
There is also a Resin.io Supervisor runs on your device. It has the purpose
of:
Manage your applications
Communicate with the
Resin’s servers
Download new application
and update
Send log to your
dashboard
Update itself
automatically
10. GIT CLONE APT-GET WGET
DEPENDENCIES
BUILDER
GIT
SERVER DOCKER
REGISTRY
container storage
cross-compiler/
containerizer
RESIN.IO CLOUD
device Management &
monitoring
…more about resin
Resin.io API
11. How work Git and Docker?
It’s free
Open Source
Version control
Fast performance
Git is used by the
most important
companies.
It’s free
Open Source
Deployment the application
into software container
Provide an abstract
virtualization of the
application
Docker is used by the
most important
companies too.
12. Building containers
Dockerfile Node.js project
The method they used to build depends:
Include the OS you define
Install packeges
Pull git repositories
Run any command
Use the package.json
Package.json
To build the project use
npm install
It’s used from Java, C#,
Python ..
13. Code into devices
There is a Resin.io agent in our devices that:
Download the changed layers of our application
container image
Stop the old version, and start the new one
There are the Resin.io API that allow us to see what
happen when our code is running in every devices
14. Create an application..
Hit create
or install a project built on Resin.io
Choose the project
Run it to your application
15. Running code on your device
Text2Speech example
Clone the project
Add resin git endpoint
Resis makes it simple to deploy, update, and maintain code running on remote devices. They are bringing the web development and deployment workflow to hardware. Using tools like git and docker, that we will see more in detail later, allow us to update all our linux devices that we connect to our environment.
Let’s see now how can we use Resin.
It’s possible to use in different ways. We can use it for marketing & retails, for example to manage devices that are hard to reach phisically , or use it for the home, for example Smart Locks, local gateway to manage many sensors. But is possible to use Resin also for other bigger project, like in Manufacturing & Logistic where there is the need to keep track of expensive equipment. And finally we can use Resin for everythings we want. By drone fleets to health care, wereable accessories, anything of internet of things.
Resin offers the possibility to compile in the cloud, so we only have to push our project in Resin cloud and it will compile code and dependencies for our device's architecture and send the result to our device(s).
SSH keys use the power of public-key cryptography to make secure our connection when sending our code to Resin. It is possible to import this key from Github.
Let's see now what we need
To create a first application, and then a first project we need to satisty some requirments.
We need a device, that is supported from Resin. We have here the list of devices that is possible to use.
In order to create an application we have to add our device/devices
We have to click the Download Device OS button to get the resin operating system image for our application. A window dialog will appear, and we have to specify how our device connects to the internet - either via an ethernet cable or wifi adapter, in any case we can specify the Wifi network's SSID and passphrase.
While the file is downloading we have to ensure our SD card is formatted in FAT32.
Once the download is finished we have to burn the downloaded .img file into the SD card.
To burn the OS image into sd card there is a guid for all the operating system (Mac and linux, windows)
If we want add more device at the same application, we can copy the download that we see before to multiple SD cards and Resin will associate all these devices with an unique ID.
It possible to connect at most 5 devices for free.
When we burned the .img file into the sd card, we have installed an operating system
Yocto Linux is an innovative distribution and allow us to build a custom Linux system.
RCE runs docker containers and give us the ability to control exactly what is installed and run on the device.
What happens after we write “git push resin master” in our command line?
The git server receives the latest commits of our code at the git endpoint that they have generated for our application.
Our code is then passed to the builder, which build our code into a Docker container.
But what are Git and Docker?
Git is a version control tool (or better allow us to have a multiple version of a software) that allow to push the code changes to a remote repository. Each resin application has a unique remote repository associated to it and all code changes will be built and deliver to our device(s). Git has fast performance and it’s used by the most important companies.
Instead Docker can build images automatically by reading the instructions from a Dockerfile.
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
The method they use to build your code depends on the project. If our project includes a Dockerfile, the builders will execute every command there, from including the base OS you define, to installing packages, pulling git repositories, and generally running any commands you specify. Otherwise, if your project includes a package.json (i.e. a node.js project), we have to use the command npm install to resolve the npm dependencies.
So there is now a Docker image with all the dependencies to successfully run your project.
The resin supervisor that is on our devices, is alerted when a new version of our app is ready, so stops the old version to start the new one.
While the process is running, you can see the progress of the download in our resin dashboard. we can click on any specific device to see more information about this, such as logs.
At every step of the process, each part of the resin back-end reports back to our API server which makes the information available to our user interface.
If we want to install a project we have to setup our application ready to receive code and with this 3 command line we can run the project.
We see more (dettagliatamente) in the next slide.
Let's see more how to do it.
Here we have an example, that converts text to speech and plays it out of the speaker.
After the repository is cloned, even with terminal we have to go in the newly directory (text2speech in this case) and add the resin git endpoint by running git remote add resin command.
Now you can simply run git push resin master. We will know our code has been compiled when this image appear. We can see from this 3 line that our code is on Resin’s servers and will be dowload and execute by all the devices we have connected to our application.
Resin.io offers some tools or SDK that allow us to use different language. Infact Resin has incorporate the node.js SDK and the Python SDK.
There are a list of method that we can use with node.js SDK and for each one there is a detailed explication as we can see in this picture.