https://github.com/emma-community/emma-backstage-plugins
https://github.com/emma-community/emma-backstage-plugins
aws azure cloud gcp multicloud
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/emma-community/emma-backstage-plugins
- Owner: emma-community
- License: apache-2.0
- Created: 2024-08-26T13:56:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T04:27:55.000Z (over 1 year ago)
- Last Synced: 2025-02-05T16:39:45.518Z (over 1 year ago)
- Topics: aws, azure, cloud, gcp, multicloud
- Language: TypeScript
- Homepage: https://emma.ms/
- Size: 1.36 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# emma plugins for [Backstage](https://backstage.io)
## Overview
The `emma-backstage-plugins` repository contains three main plugins: `emma`, `emma-backend`, and `emma-common`. These plugins work together to provide a comprehensive solution for managing and displaying data through a frontend interface and backend services.
## Plugins
### `emma` plugin
The `emma` plugin provides the frontend components and logic for the emma application. It includes UI components for displaying data, routing, and API interactions.
**Key features:**
- Main entry points for the plugin.
- Initialization logic.
- Routing definitions.
- API client for backend interactions.
- UI components for heat maps.
### `emma-backend` plugin
The `emma-backend` plugin provides the backend services for the emma application. It includes API implementations, routing, and testing logic.
**Key features:**
- Main entry point for the backend plugin.
- Initialization logic.
- Backend API implementations.
- Routing logic for backend services.
- Tests for routing logic.
### `emma-common` plugin
The `emma-common` plugin provides shared resources such as constants, types, and API methods that are used by both the frontend and backend plugins.
**Key features:**
- Shared constants and types.
- Permission management logic.
- API interaction methods and factory functions.
- Setup logic for tests.
## Getting started
### Clone the repository
```sh
git clone https://github.com/emma-community/emma-backstage-plugins.git
cd emma-backstage-plugins
```
### Set environment variables
Ensure that the environment variables `EMMA_CLIENT_ID` and `EMMA_CLIENT_SECRET` are set in your environment. You can set them in your terminal session or in a `.env` file.
```sh
export EMMA_CLIENT_ID=your_client_id
export EMMA_CLIENT_SECRET=your_client_secret
```
### Install plugin dependencies
```sh
yarn install
```
## Running the code
To start the application stay in the root directory. To start the development server for each plugin, navigate to the respective plugin directories. Then run:
```sh
yarn dev
```
## Testing the code
To run all tests stay in the root directory. To run the tests for each plugin, navigate to the respective plugin directories. Then run:
```sh
yarn test
```
## Building and running with Docker
This section provides instructions on how to build and run the Backstage application using Docker Compose. The setup includes two main services: a PostgreSQL database (`backstage_db`) and the Backstage backend (`backend`).
### Prerequisites
- Docker and Docker Compose installed on your machine.
- Environment variables `EMMA_CLIENT_ID` and `EMMA_CLIENT_SECRET` set in your environment.
### Docker Compose configuration
The `docker-compose.yaml` file defines the services and their configurations.
### Steps to build and run
1. **Build and run the services**:
Use Docker Compose to build and run the services defined in the `docker-compose.yaml` file.
```sh
docker-compose up --build
```
This command will:
- Pull the latest PostgreSQL image and start the `backstage_db` service.
- Build the Backstage backend image from the Dockerfile located at `packages/backend/Dockerfile`.
- Start the `backstage-backend` service, which depends on the `backstage_db` service.
2. **Access the application**:
Once the services are up and running, you can access the Backstage application at `http://localhost:7007`.
### Stopping the services
To stop the running services, use the following command:
```sh
docker-compose down
```
This command will stop and remove the containers, networks, and volumes created by Docker Compose.
### Additional notes
- The PostgreSQL database data is persisted in a Docker volume named `db`.
- The `backend` service uses environment variables for database connection and emma API credentials.
By following these steps, you can easily build and run the Backstage application using Docker Compose.
## License
This project is licensed under the Apache 2.0 License.