Introduction
Welcome to OpenCI Documentation
Prerequisites
To self-host OpenCI, you need to meet the following prerequisites:
- Mac with M1 chip or higher
- macOS 14.0 or higher
Initial Setup
To self-host OpenCI, you need to install several tools.
Tart
Tart is a tool for managing macOS VMs.
Firebase CLI
OpenCI uses Firebase, so Firebase CLI installation is required.
OpenCI Runner
OpenCI Runner is a CLI to run OpenCI. Dart is required for installation.
Download Base Image
OpenCI uses macOS 15.0 as the base image. This process takes considerable time.
Firebase Configuration
OpenCI uses Firebase for backend services. Therefore, Firebase configuration is necessary.
Create Firebase Project
Access the Firebase Console with any Google account and create a project.
Firestore Setup
Firestore is used for build job registration. Please access Firestore and complete the provisioning.
Firebase Functions Setup
OpenCI uses Firebase Functions. Firebase Functions requires Blaze plan (paid) registration. The cost is around a few dollars per month.
Deploy Firebase Functions
Clone the OpenCI CLI repository.
Then, navigate to the firebase_functions directory and run the following command to deploy Firebase Functions.
GitHub App Configuration
OpenCI uses GitHub App to fetch build jobs.
Create GitHub App
Access Create GitHub App and create a GitHub App.
Then, specify the gitHubAppFunction of Firebase Functions as the webhook URL for the GitHub App.
Secret Configuration
Register the secrets used in Firebase Functions.
APP_ID
GITHUB_WEBHOOK_SECRET
PRIVATE_KEY
Create Firebase Service Account
Create a Firebase service account and place it as apps/openci_runner/firebase_service_account.json.
Now the self-hosting setup for OpenCI is complete. Great job!