title | description |
---|---|
Introduction |
Welcome to OpenCI Documentation |
To self-host OpenCI, you need to meet the following prerequisites:
- Mac with M1 chip or higher
- macOS 14.0 or higher
To self-host OpenCI, you need to install several tools.
Tart is a tool for managing macOS VMs.
brew install tart
OpenCI uses Firebase, so Firebase CLI installation is required.
curl -sL https://firebase.tools | bash
OpenCI Runner is a CLI to run OpenCI. Dart is required for installation.
dart pub global activate openci_runner
brew install dart-sdk
OpenCI uses macOS 15.0 as the base image. This process takes considerable time.
# Login to GitHub Container Registry
echo -n ${github_acceess_token} | \
tart login ghcr.io \
--username ${username} \
--password-stdin
# Pull base image
tart pull ghcr.io/open-ci-io/sequoia:0.0.2
OpenCI uses Firebase for backend services. Therefore, Firebase configuration is necessary.
Access the Firebase Console with any Google account and create a project.
Firestore is used for build job registration. Please access Firestore and complete the provisioning.
OpenCI uses Firebase Functions. Firebase Functions requires Blaze plan (paid) registration. The cost is around a few dollars per month.
Clone the OpenCI CLI repository.
gh repo clone open-ci-io/openci
Then, navigate to the firebase_functions directory and run the following command to deploy Firebase Functions.
cd apps/firebase_functions/functions
firebase deploy --only functions
OpenCI uses GitHub App to fetch build jobs.
Access Create GitHub App and create a GitHub App.
Then, specify the gitHubAppFunction of Firebase Functions as the webhook URL for the GitHub App.
Register the secrets used in Firebase Functions.
firebase functions:config:set APP_ID
firebase functions:config:set GITHUB_WEBHOOK_SECRET
firebase functions:config:set PRIVATE_KEY
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!