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

Adam and EVE-OS initial deploy issue #4078

Open
rightkick opened this issue Jul 10, 2024 · 3 comments
Open

Adam and EVE-OS initial deploy issue #4078

rightkick opened this issue Jul 10, 2024 · 3 comments
Labels
question Further information is requested

Comments

@rightkick
Copy link

Hi, I am trying to run a PoC with EVE-OS + Adam controller.
EVE-OS runs in a qemu VM while adam within a docker container.

First, I generated certs for Adam controller:

mkdir adam && cd adam
docker run -v $PWD:/adam/run -p 8080:8080 lfedge/adam generate server --cn adam-controller.lab.local --hosts adam-controller.lab.local

Then ran the controller using the following docker-compose:

version: '3.8'

services:
  adam:
    image: lfedge/adam
    container_name: adam
    command: server --conf-dir /adam/run/config --db-url /adam/run/adam --server-cert /adam/run/private/adam-controller.lab.local.pem --server-key /adam/run/private/adam-controller.lab.local-key.pem
    ports:
      - "8080:8080"
    volumes:
      - .:/adam/run
    extra_hosts:
      - "adam-controller.lab.local:192.168.1.41"
    restart: unless-stopped

It seems the controller runs normally but when trying to reach the web UI at https://adam-controller.lab.local:8080 it gives just a blank page.

I placed the generated adam certs under the conf directory of the repository and copied root-certificate.pem to v2tlsbaseroot-certificates.pem (understand these should be identical?). Then built EVE-OS by using installer-raw build target as below:

sudo make ROOTFS_VERSION=snapshot ZARCH=amd64 HV=kvm installer-raw

The installation is done successfully and I can confirm also that the Adam controller sees registration attempts from the edge device. Below are the logs from the Adam controller:

2024/07/10 11:50:47 404 returned for /api/v2/edgedevice/certs
2024/07/10 11:50:48 404 returned for /api/v2/edgedevice/ping
2024/07/10 11:50:53 404 returned for /api/v2/edgedevice/ping
2024/07/10 11:50:54 404 returned for /api/v2/edgedevice/ping
2024/07/10 11:50:55 404 returned for /api/v2/edgedevice/ping
2024/07/10 11:50:55 404 returned for /api/v2/edgedevice/certs

I generated the device onboarding key-pair with:

./pkg/pillar/scripts/generate-onboard.sh -c edge1516 -o LAB

Then went to the adam controller with docker exec and ran the following:

adam admin --server https://adam-controller.lab.local:8080 --server-ca run/config/root-certificate.pem device add --path run/config/onboard.cert.pem
adam admin --server https://adam-controller.lab.local:8080 --server-ca run/config/root-certificate.pem onboard add --path run/config/onboard.cert.pem

Then listing the device I see the following:

adam admin --server https://adam-controller.lab.local:8080 --server-ca run/config/root-certificate.pem device list
f8815e88-622f-496d-9b24-f4292661ebd3

adam admin --server https://adam-controller.lab.local:8080 --server-ca run/config/root-certificate.pem onboard list
edge1516

So I have two issues:

  1. The adam controller is giving me no web content (blank page)
  2. The EVE-OS VM seems to be contacting the adam controller but registration seems to fail.

AM I missing sth? I would appreciate your assistance to overcome this and complete the onboarding. Will eventually check to request a demo account at the commercial controller.

Thank you.

@rightkick rightkick added the question Further information is requested label Jul 10, 2024
@europaul
Copy link
Contributor

have you looked at https://github.com/lf-edge/eden ? it's a harness that we use for testing EVE and it's basic functionality is running an EVE instance in QEMU with Adam in a container, which looks like what you are trying to achieve. maybe try following these steps and you should get a running EVE and Adam instances around the eden start step. And then you can compare this approach with the one you are following or if you are unsure about the certificates for example, you can copy those from the instances inside Eden to yours.

let me know if this was helpful or we should investigate further!

@rightkick
Copy link
Author

Thanks I will try this approach. I will eventually need to run it manually using separate instances so as to understand the requirements better.

@shjala
Copy link
Member

shjala commented Nov 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants