{"id":18875280,"url":"https://github.com/opencomputeproject/hwmgmt-devicemgr-devicemanager","last_synced_at":"2025-04-14T17:31:30.691Z","repository":{"id":42371970,"uuid":"321406784","full_name":"opencomputeproject/HWMgmt-DeviceMgr-DeviceManager","owner":"opencomputeproject","description":"Device Manager collects device data and notifications from each device, and make the data available on a predetermined output bus for consumers. ","archived":false,"fork":false,"pushed_at":"2024-07-09T15:11:52.000Z","size":18455,"stargazers_count":23,"open_issues_count":10,"forks_count":12,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-07-09T19:25:11.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencomputeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-14T16:26:53.000Z","updated_at":"2024-07-09T15:11:56.000Z","dependencies_parsed_at":"2024-01-24T11:41:41.348Z","dependency_job_id":"e245a416-dfa2-4188-919a-6fbe758c2798","html_url":"https://github.com/opencomputeproject/HWMgmt-DeviceMgr-DeviceManager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FHWMgmt-DeviceMgr-DeviceManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FHWMgmt-DeviceMgr-DeviceManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FHWMgmt-DeviceMgr-DeviceManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FHWMgmt-DeviceMgr-DeviceManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomputeproject","download_url":"https://codeload.github.com/opencomputeproject/HWMgmt-DeviceMgr-DeviceManager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639402,"owners_count":17177816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:06:49.072Z","updated_at":"2024-11-08T06:06:49.674Z","avatar_url":"https://github.com/opencomputeproject.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nEdgecore DeviceManager\nCopyright 2020-2021 Edgecore Networks, Inc.\n\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n\n--\u003e\n\n# Device Manager functionality\nDevice Manager retrieves and collects information from devices (Redfish compliant) by using **Redfish** API.\nIt uses ODIM's services to present data on northbound API.\n\n# Hardware requirements\nThe Device Manager supports running the *Ubuntu Desktop 18.04 version*. For a single node deployment minimum requirement are\n- CPU 8 cores,\n- RAM 8GB,\n- Storage of at least 40GB.\n\n# Prerequisites\nBefore building Device Manager, the following steps are required:\n- Go 1.17.10 installed,\n  - To install Go and to download necessary packages together with libraries for building Device Manager, run:\n  ```shell\n  $ make go-install\n  $ make prereq\n  $ source ~/.bashrc\n  ```\n- Docker 20.10.18 (minimum version) installed,\n- Certificates delivered or generated and placed into (project root)/build/certs (create this folder if necessary) (scripts for generation can be found [here](https://github.com/ODIM-Project/ODIM/tree/main/build/cert_generator)),\n- Config changes to fit your needs(insert your own passwords in configs below (passwords can be different between configs) - use SHA3-512 hash and encode it with base64):\n  - **Device Manager**\n    - (project root)/svc-device-manager/config/config.yml\n      - Basic Authentication -\u003e Password\n  - **ODIM services**\n    - (project root)/lib-utilities/config/odimra_config.json\n  - **Redis**\n    - (project root)/build/redis/redis.conf\n    - (project root)/build/redis/createSchema.sh\n      - Line 4 -\u003e \"Password\":\"your_password_here\"\n  - **Etcd**\n    - (project root)/build/etcd/etcd.yml\n\n## Install Device Manager using single command\nUse this command to install and run Device Manager together with ODIM services, Redis and Etcd as Docker containers.\n\n```shell\n$ make all\n```\n\nOnce that make is complete, the Redfish interface will be available at 127.0.0.1:45000. The port number is specified by the **odimra_config.json** file, property **APIGatewayConf.Port**. The Redfish interface is used to create a connection to Device Manager.\n\n## Register Device Manager\nAfter installation, you have to register Device Manager to ODIM. This is done by using Aggregation Sources.\nFirst, we need to know ID of Connection Method, which is of variant DM_v1.0.0. To do so, perform HTTP `GET`\non the following URI `https://{device-manager_host}:{port}/redfish/v1/AggregationService/ConnectionMethods`, \nproviding `{user}:{password}` (your chosen username and password).\nCheck each record, to find the proper Connection Method.\n\n```shell\ncurl  -k -u  '{user}:{password}' https://127.0.0.1:45000/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3 | jq\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\nDload  Upload   Total   Spent    Left  Speed\n100   642    0   642    0     0   6356      0 --:--:-- --:--:-- --:--:--  6356\n{\n\"@odata.type\": \"#ConnectionMethod.v1_0_0.ConnectionMethod\",\n\"@odata.id\": \"/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3\",\n\"@odata.context\": \"/redfish/v1/$metadata#ConnectionMethod.v1_0_0.ConnectionMethod\",\n\"Id\": \"3326bd25-c230-4083-95d7-a51b7af5bec3\",\n\"Name\": \"Connection Method\",\n\"ConnectionMethodType\": \"Redfish\",\n\"ConnectionMethodVariant\": \"Compute:BasicAuth:DM_v1.0.0\",\n\"Links\": {\n\"AggregationSources\": []\n}\n}\n```\n\nNext, perform HTTP `POST` on the URI: `https://{device-manager_host}:{port}/redfish/v1/AggregationService/AggregationSources`\nwith the following body (remember to replace ConnectionMethod with one that was found in previous request):\n\n```shell\ncurl --location -X POST -k -u '{user}:{password}' 'https://127.0.0.1:45000/redfish/v1/AggregationService/AggregationSources' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"HostName\": \"device-manager:45003\",\n\"UserName\": \"admin\",\n\"Password\": \"your_password\",\n\"Links\": {\n\"ConnectionMethod\": {\n\"@odata.id\": \"/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3\"\n}\n}\n}' |jq\n```\nAfter sending the request, Redfish task is created and a link to the task monitor associated with it is returned.\n\nTo add a BMC as an Aggregation source, firstly certificates must be imported in BMC server. Then, you can send another HTTP `POST` on the\nURI: `https://{device-manager_host}:{port}/redfish/v1/AggregationService/AggregationSources` with the following body:\n```shell\ncurl --location -X POST -k -u '{user}:{password}' 'https://127.0.0.1:45000/redfish/v1/AggregationService/AggregationSources' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"HostName\": \"{BMC_address}\",\n\"UserName\": \"{BMC_UserName}\",\n\"Password\": \"{BMC_Password}\",\n\"Links\": {\n\"ConnectionMethod\": {\n\"@odata.id\": \"/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3\"\n}\n}\n}' |jq\n```\nAfter sending the request, Redfish task is created and a link to the task monitor associated with it is returned.\n\nWhen tasks are finished, the following `GET` send on `https://{device-manager_host}:{port}/redfish/v1/AggregationService/ConnectionMethods/{ConnectionMethodID}` will show two previously added Aggregation sources.\n\n```shell\ncurl  -k -u  '{user}:{password}' https://127.0.0.1:45000/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3 | jq\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\nDload  Upload   Total   Spent    Left  Speed\n100   642    0   642    0     0   6356      0 --:--:-- --:--:-- --:--:--  6356\n{\n\"@odata.type\": \"#ConnectionMethod.v1_0_0.ConnectionMethod\",\n\"@odata.id\": \"/redfish/v1/AggregationService/ConnectionMethods/3326bd25-c230-4083-95d7-a51b7af5bec3\",\n\"@odata.context\": \"/redfish/v1/$metadata#ConnectionMethod.v1_0_0.ConnectionMethod\",\n\"Id\": \"3326bd25-c230-4083-95d7-a51b7af5bec3\",\n\"Name\": \"Connection Method\",\n\"ConnectionMethodType\": \"Redfish\",\n\"ConnectionMethodVariant\": \"Compute:BasicAuth:DM_v1.0.0\",\n\"Links\": {\n\"AggregationSources\": [\n{\n\"@odata.id\": \"/redfish/v1/AggregationService/AggregationSources/99999999-9999-9999-9999-999999999999\"\n},\n{\n\"@odata.id\": \"/redfish/v1/AggregationService/AggregationSources/207c0230-ed7b-412c-968a-d604c03aea16.1\"\n}\n]\n}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Fhwmgmt-devicemgr-devicemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomputeproject%2Fhwmgmt-devicemgr-devicemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Fhwmgmt-devicemgr-devicemanager/lists"}