Skip to content

Commit 43afe71

Browse files
committed
chore(compose): add support for deploying redfish using sushy tool
This commit adds support for deploying sushy-tool using dev compose. Sushy-tool provides a static redfish responder that uses mockups enabling redfish API for testing and development. The kepler-dev service now connects to redfish API endpoint to provide platform metrics. *NOTE: The mockups contain static Power data and are not real data. This is for testing purposes only and not recommended for production.* Signed-off-by: vprashar2929 <[email protected]>
1 parent 3626252 commit 43afe71

File tree

83 files changed

+3366
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3366
-2
lines changed

compose/dev/compose.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ services:
4444
command:
4545
- --config.file=/etc/kepler/config.yaml
4646

47+
depends_on:
48+
- sushy-static
49+
4750
networks:
4851
- kepler-dev
52+
- sushy-network
4953
# - kind # NOTE: uncomment to use kind
5054

5155
scaphandre:
@@ -100,10 +104,30 @@ services:
100104
networks:
101105
- node-exporter-network
102106

107+
sushy-static:
108+
image: quay.io/metal3-io/sushy-tools:latest
109+
ports:
110+
- 28001:8001
111+
volumes:
112+
- type: bind
113+
source: ./mockups
114+
target: /mockups
115+
command:
116+
- sushy-static
117+
- -m
118+
- /mockups/public-rackmount
119+
- -i
120+
- 0.0.0.0
121+
- -p
122+
- "8001"
123+
networks:
124+
- sushy-network
125+
103126
networks:
104127
kepler-dev:
105128
scaph-network:
106129
node-exporter-network:
130+
sushy-network:
107131
# NOTE: uncomment to use kind
108132
# kind:
109133
# external: true

compose/dev/kepler-dev/etc/kepler/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ dev:
7676
experimental:
7777
platform:
7878
redfish:
79-
enabled: false # Enable experimental Redfish BMC power monitoring
79+
enabled: true # Enable experimental Redfish BMC power monitoring
8080
configFile: /etc/kepler/redfish.yaml # Path to Redfish BMC configuration file
81-
nodeName: "" # Node name to use (overrides Kubernetes node name and hostname fallback)
81+
nodeName: kepler-dev # Node name to use (overrides Kubernetes node name and hostname fallback)
8282
httpTimeout: 5s # HTTP client timeout for BMC requests (default: 5s)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Redfish BMC Configuration for Development Environment
2+
# This configuration connects to the sushy-static service running in Docker Compose
3+
4+
nodes:
5+
kepler-dev: sushy-static
6+
7+
bmcs:
8+
sushy-static:
9+
endpoint: http://sushy-static:8001
10+
username: ""
11+
password: ""
12+
insecure: true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@odata.type": "#ManagerAccount.v1_0_2.ManagerAccount",
3+
"Id": "1",
4+
"Name": "User Account",
5+
"Description": "User Account",
6+
"Enabled": true,
7+
"Password": null,
8+
"UserName": "Administrator",
9+
"RoleId": "Admin",
10+
"Locked": false,
11+
"Links": {
12+
"Role": {
13+
"@odata.id": "/redfish/v1/AccountService/Roles/Admin"
14+
}
15+
},
16+
"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount",
17+
"@odata.id": "/redfish/v1/AccountService/Accounts/1",
18+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@odata.type": "#ManagerAccountCollection.ManagerAccountCollection",
3+
"Name": "Accounts Collection",
4+
5+
"Members": [
6+
{
7+
"@odata.id": "/redfish/v1/AccountService/Accounts/1"
8+
}
9+
],
10+
"@odata.context": "/redfish/v1/$metadata#ManagerAccountCollection.ManagerAccountCollection",
11+
"@odata.id": "/redfish/v1/AccountService/Accounts",
12+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
13+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"@odata.type": "#Role.v1_0_2.Role",
3+
"Id": "Admin",
4+
"Name": "User Role",
5+
"Description": "Admin User Role",
6+
"IsPredefined": true,
7+
"AssignedPrivileges": [
8+
"Login",
9+
"ConfigureManager",
10+
"ConfigureUsers",
11+
"ConfigureSelf",
12+
"ConfigureComponents"
13+
],
14+
"OEMPrivileges": [
15+
"OemClearLog",
16+
"OemPowerControl"
17+
],
18+
"@odata.context": "/redfish/v1/$metadata#Role.Role",
19+
"@odata.id": "/redfish/v1/AccountService/Roles/Admin",
20+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
21+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@odata.type": "#Role.v1_0_2.Role",
3+
"Id": "Operator",
4+
"Name": "User Role",
5+
"Description": "Operator User Role",
6+
"IsPredefined": true,
7+
"AssignedPrivileges": [
8+
"Login",
9+
"ConfigureSelf",
10+
"ConfigureComponents"
11+
],
12+
"OEMPrivileges": [],
13+
"@odata.context": "/redfish/v1/$metadata#Role.Role",
14+
"@odata.id": "/redfish/v1/AccountService/Roles/Operator",
15+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
16+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"@odata.type": "#Role.v1_0_2.Role",
3+
"Id": "ReadOnlyUser",
4+
"Name": "User Role",
5+
"Description": "ReadOnlyUser User Role",
6+
"IsPredefined": true,
7+
"AssignedPrivileges": [
8+
"Login"
9+
],
10+
"OEMPrivileges": [],
11+
"@odata.context": "/redfish/v1/$metadata#Role.Role",
12+
"@odata.id": "/redfish/v1/AccountService/Roles/ReadOnlyUser",
13+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@odata.type": "#RoleCollection.RoleCollection",
3+
"Name": "Roles Collection",
4+
5+
"Members": [
6+
{
7+
"@odata.id": "/redfish/v1/AccountService/Roles/Admin"
8+
},
9+
{
10+
"@odata.id": "/redfish/v1/AccountService/Roles/Operator"
11+
},
12+
{
13+
"@odata.id": "/redfish/v1/AccountService/Roles/ReadOnlyUser"
14+
}
15+
],
16+
"@odata.context": "/redfish/v1/$metadata#Role.Role",
17+
"@odata.id": "/redfish/v1/AccountService/Roles",
18+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"@odata.type": "#AccountService.v1_0_2.AccountService",
3+
"Id": "AccountService",
4+
"Name": "Account Service",
5+
"Description": "Account Service",
6+
"Status": {
7+
"State": "Enabled",
8+
"Health": "OK"
9+
},
10+
"ServiceEnabled": true,
11+
"AuthFailureLoggingThreshold": 3,
12+
"MinPasswordLength": 8,
13+
"AccountLockoutThreshold": 5,
14+
"AccountLockoutDuration": 30,
15+
"AccountLockoutCounterResetAfter": 30,
16+
"Accounts": {
17+
"@odata.id": "/redfish/v1/AccountService/Accounts"
18+
},
19+
"Roles": {
20+
"@odata.id": "/redfish/v1/AccountService/Roles"
21+
},
22+
"@odata.context": "/redfish/v1/$metadata#AccountService",
23+
"@odata.id": "/redfish/v1/AccountService",
24+
"@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
25+
}

0 commit comments

Comments
 (0)