smartobjectoriented / emiso

Embedded MIcro-Service Orchestration
GNU General Public License v2.0
0 stars 0 forks source link

Initial EMISO Engine #4

Closed jmi-reds closed 8 months ago

jmi-reds commented 10 months ago

This issue follows activities on the creation on an initial version of the EMISO Engine.

The target is to be able to create an environment from Portainer server (connect with the Smart Object).

Task list:

Rootfs

Webserver

Milestone - At this point Portainer Server can connect with a dummy environment

Daemon

Milestone - In Portainer Server get the real information from the environment

Here is the list of the commands sent by Portainer during an environment connection:

jmi-reds commented 10 months ago

Here is an example on how to use curl and python to interact with Docker daemon and EMISO webserver.

Get the list of containers

HTTP

curl --unix-socket /var/run/docker.sock http://localhost/containers/json

Python

import docker
client = docker.from_env()
for container in client.containers.list():
  print(container.id)
jmi-reds commented 10 months ago

An initial version of a webserver has been integrated. It works in HTTPS/TLS. Currently it only prints the GET / POST received.

Command example: curl -X GET -k "https://192.168.53.154:8080/images/json"

The code also provides an version based on sockets. It is made for testing.

jmi-reds commented 9 months ago

Just a note about TLS configuration in Portainer: currently, it is not possible to enable TLS with Skip Certification Verification option enabled.