https://github.com/opennebula/appmarket-simple
https://github.com/opennebula/appmarket-simple
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/opennebula/appmarket-simple
- Owner: OpenNebula
- Created: 2016-11-30T19:59:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-26T20:41:24.000Z (over 2 years ago)
- Last Synced: 2024-03-27T14:07:51.025Z (about 2 years ago)
- Language: JavaScript
- Size: 5.8 MB
- Stars: 1
- Watchers: 2
- Forks: 6
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple OpenNebula Marketplace
This project provides a lightweight implementation of a Marketplace service for OpenNebula. Appliance information is sourced from a collection of metadata YAML files located in the src/data/ directory. For reference, the metadata format follows the structure used in the [official OpenNebula Marketplace repository](https://github.com/OpenNebula/marketplace).
The service launches a Ruby-based API that serves both the appliance metadata and the static assets for the Single Page Application (SPA) frontend.
## Marketplace architecture

The marketplace is basically a Ruby server that exposes an API with the following paths:
| Path | Description |
| -------------- | ------------------------------------------------------------ |
| / | Returns the index.html entrypoint for the React app. |
| /appliance | Returns a list of JSON with all the information of the appliances defined in src/data. |
| /appliance/:id | Returns a JSON with details of a specific appliance defined in src/data. |
## React Development
Marketplace has a React app in order to expose a GUI to interact with the appliances. This app is stored in /src/public/react folder.
### Local
In order to develop in a local environment, install node version 20 and perform the following steps:
- Change to the path /src/public/react
- Execute `npm install`
- Execute `npm run dev:opennebula`
Frontend uses the Ruby API to get the data of the appliances. Change the variable pathAPIDevelopmentMode in vite.config.ts in order to use a different address for the API.
### Build Production Code
- Change to the path /src/public/react
- Execute `npm install`
- Execute `npm run build:opennebula`
The API requests will be done against the same address where the React code is served.
### Run
The React App always will be served through the Ruby API.