This repository contains a forked version of the Red Hat Hybrid Console Chroming app, adapted for use in a community Fedora Services Platform using Fedora SSO. The primary goal of this fork is to maintain compatibility with the Chrome API while enabling additional integrations for creating a new community environment.
- Overview
- Directory Structure
- Prerequisites
- Setup Guide
- Accessing the Application
- Credentials
- Chrome Backend - Optional
- Notes
The community-chrome
and chrome-service-backend
repositories handle the application layout, navigation, module registry, SSO integration, feature flag management, etc. Together, these repositories function as the base block for the Open Services Platform UI.
Below is the expected directory structure for local development under a folder named open-services
:
open-services/
├── community-chrome # Frontend service from Chrome
└── image-builder-frontend # Frontend service for Image Builder
In order to access the https://console.stg.foo.fedorainfracloud.org/ in your browser, you have to add entries to your /etc/hosts
file. This is a one-time setup that has to be done only once (unless you modify hosts) on each machine.
127.0.0.1 console.stg.foo.fedorainfracloud.org
::1 console.stg.foo.fedorainfracloud.org
Clone the required repositories into a parent directory:
git clone [email protected]:FedoraConsole/community-chrome.git
git clone [email protected]:FedoraConsole/chrome-service-backend.git
git clone [email protected]:osbuild/image-builder-frontend.git
(optional) git clone [email protected]:osbuild/image-builder.git
-
Navigate to the
image-builder-frontend
folder:cd ../image-builder-frontend
-
Start the frontend as a static federated module:
npm run start:federated
The frontend service should now be running on port 8003.
-
Navigate back to the
community-chrome
directory:cd ../community-chrome
-
Run the development command with environment variables pointing to the ports of the backend services:
IB_FRONTEND=8003 npm run dev:standalone
This command:
- Sets the Image Builder frontend to port 8003 (
IB_FRONTEND=8003
) - Optional: Sets the Image Builder backend to port 8086 (
IB_SERVICE=8086
), if not set, requests proxied to stage.
The development environment should now be active.
After all services are running, open your browser and navigate to:
https://console.stg.foo.fedorainfracloud.org:1337
Create an account in fedora staging https://accounts.stg.fedoraproject.org Log in with your credentials
The chrome-backend service scales the platform to support onboarding of microfrontends applications. It adds these features:
- Last visited: last visited frontend applications.
- Favorites: The favorites applications.
- Dashboard: Dashboard management for the landing page including a widgets layout/
- Static data: For navigation, search and fed-modules registration for apps.
This service is not needed when serving just a few services, but can be used in the future for a better scale.
To simplified the deployment, all the static data is serving within the frontend under Chrome
folder.
-
Navigate to the
standalone
folder insidecommunity-chrome
:cd community-chrome/standalone
-
Use Docker Compose (or Podman Compose) to start the required supporting services. Some used images are from private quay.io repositories so make sure to login via:
docker login quay.io # OR if using Podman: podman login quay.io
And then run:
docker-compose up # OR if using Podman: podman-compose up
This will launch:
- An Unleash web server for feature flag management.
- Containers for PostgreSQL
- Kafka is optional with a kafka profile
-
Navigate to the
chrome-service-backend
folder:cd ../../chrome-service-backend
-
In the first run, create a basic environment file:
make env
-
Wait until the containers started in Step 2 are healthy, then start the backend service:
make dev
The backend service should now be running on port 8000.
-
Navigate back to the
community-chrome
directory:cd ../community-chrome
-
Run the development command with environment variables pointing to the ports of the backend services:
CHROME_SERVICE=8000 IB_FRONTEND=8003 npm run dev
This command:
- Sets the Chrome backend to port 8000 (
CHROME_SERVICE=8000
) - Sets the Image Builder frontend to port 8003 (
IB_FRONTEND=8003
) - Optional: Sets the Image Builder backend to port 8086 (
IB_SERVICE=8086
), if not set, requests proxied to stage.
- Timing: Ensure that all containers (Unleash, DB, etc.) have fully started before starting dependent services.
- Port Conflicts: If any default ports conflict with other local services, adjust them accordingly.
- Production Considerations: This setup is meant for local development only. Additional configuration steps are required for any production environment and deployment.