Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ updates:
interval: daily
time: "09:00"
timezone: "Asia/Taipei"
groups:
minor-and-patch:
applies-to: version-updates
update-types:
- "minor"
- "patch"
sec-minor-and-patch:
applies-to: security-updates
update-types:
- "minor"
- "patch"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- package-ecosystem: gomod
directory: /
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -37,6 +37,6 @@ jobs:
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
with:
sarif_file: results.sarif
58 changes: 14 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,32 @@
<!-- PROJECT LOGO -->
<br/>
<div align="left">
<img src="assets/images/bigstack.png" alt="Logo" width="" height="">
<img src="assets/images/panel/api.png" alt="Logo" width="" height="">
</p>
</div>

[![License][License-Image]][License-Url] [![made-with-Go][Go-Made-Image]][Go-Made-Url] [![Go][Go-Report-Image]][Go-Report-Url] [![GitHub issues][Github-Issue-Image]][Github-Issue-Url] [![GitHub last commit (branch)][GitHub-Last-Commit-Image]][GitHub-Last-Commit-Url]

<br/><br/>

<h3 style="color: gray;">▎To Start Developing</h3>

<br/>

0). Get the build environment ready

We would need an `x86_64` / `amd64` based machine to build the rpm package.

We would need to have `golang` ready on the machine.

We would need rpm build tools.

For Fedora Linux based OS:
🚀 [API] | ⛩️ [Architecture] | 👷‍♂️ [Developing] | 🔬 [Troubleshooting]

```bash
sudo dnf install -y rpmdevtools rpmlint
```
<br/><br/>

<br/>
## ▎Overview

1). Build rpm
The cube-cos api is a central communication mechanism in the CubeCOS written in [Go]. Each node has its own cube-cos api and discover peer nodes by [MDNS] for cross-node communication.

```bash
task rpm:build
```
Additionally, there’re 14+ apis in the CubeCOS, the cube-cos api is just one of apis which responsible for the partial native features of cube-cos currently, but it will cover more and more features in the incoming milestones.

<br/>

2). Send the built rpm to a running CubeCOS

```
scp <path of rpm> <user>@<cubecos>:<path to place rpm>
```
<img src="assets/images/architecture/base.png" alt="Logo" width="" height="">

<br/>

3). Install the rpm and start the service

```bash
systemctl stop cube-cos-api
dnf -y remove cube-cos-api
dnf -y install "<path to cube-cos-api rpm>"
hex_config bootstrap api
```

<br/>

---

<br/>


<h3 style="color: gray;">▎License</h3>

## ▎License

Copyright (c) 2025 [Bigstack co., ltd](https://bigstack.co/)

Expand All @@ -79,6 +43,12 @@ See the License for the specific language governing permissions and
limitations under the License.


[API]: https://github.com/bigstack-oss/cube-cos-api/tree/develop/docs/api
[Architecture]: https://github.com/bigstack-oss/cube-cos-api/tree/develop/docs/architecture
[Developing]: https://github.com/bigstack-oss/cube-cos-api/tree/develop/docs/developing
[Troubleshooting]: https://github.com/bigstack-oss/cube-cos-api/tree/develop/docs/troubleshooting
[Go]: https://go.dev/
[MDNS]: https://en.wikipedia.org/wiki/Multicast_DNS
[License-Url]: https://www.apache.org/licenses/LICENSE-2.0
[License-Image]: https://img.shields.io/badge/License-Apache2-blue.svg
[Go-Report-Url]: https://goreportcard.com/report/github.com/bigstack-oss/cube-cos-api
Expand Down
Binary file added assets/images/architecture/base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/data-request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/mdns-broadcast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/mdns-query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/mdns-receive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/mdns-response.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/node-components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/architecture/node-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added assets/videos/api/interfaces.mov
Binary file not shown.
3 changes: 2 additions & 1 deletion configs/cube-cos-api.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ spec:
database: cube-cos
replicaSet: cube-cos-rs
auth:
enabled: true
enable: true
source: admin
username: admin
password: admin
influxdb:
Expand Down
39 changes: 39 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## ▎Overiew

The following guide is for anyone who want to see the comperhensive list for API usage.

Genearlly, there're two ways to find it out

- Access on CubeCOS

- Copy JSON to Swagger online editor

You should be able to see the doc like the video below via either way

https://github.com/bigstack-oss/cube-cos-api/blob/develop/assets/videos/api/interfaces.mov

<br/>

## ▎Access on CubeCOS

1). Log in your CubeCOS by UI

<br/>

2). Paste the URL below in the browser

- conention: https://{CubeCOS's Virtual IP}/api/v1/datacenters/{data center name}/apidocs/index.html

- for example: https://10.32.45.10/api/v1/datacenters/demo-site/apidocs/index.html

<br/>

## ▎Swagger Online Editor

1). Copy the JSON content from https://github.com/bigstack-oss/cube-cos-api/blob/develop/api/docs.json

<br/>

2). Paste it to the Swagger's online editor

https://editor.swagger.io/
Loading
Loading