2.7 KiB
Oculus Toolchain
Oculus is a toolchain for monitoring and handling Docker container diffs. It includes three main components:
- filter: Filters the diff outputs based on ignore patterns.
- api: Provides an API to fetch container details and diffs.
- main: The main monitoring application that uses the API and filter components to manage container diffs.
Installation
To install the Oculus toolchain, you can use the provided install.sh
script. This script will download and install the appropriate binaries for your system.
Prerequisites
- curl: Make sure
curl
is installed on your system. - sudo: Required if you do not have write permission to
/usr/local/bin
.
Installation Steps
-
Download the Install Script:
curl -sSL https://git.nixc.us/colin/Oculus/raw/branch/main/install.sh -o install.sh
-
Make the Script Executable:
chmod +x install.sh
-
Run the Install Script:
./install.sh
This will download and install the following components to /usr/local/bin
:
oculus_filter
oculus_api
oculus_main
Usage
After installation, you can start using the Oculus toolchain. Below are the basic usage instructions for each component:
Starting the API Server
To start the API server, run:
oculus_api
This will start the API server on port 8080.
Running the Main Monitoring Application
Before running the main monitoring application, ensure that the API server is running and the environment variables are set:
export API_ADDRESS="http://localhost:8080"
export GLITCHTIP_DSN="your-glitchtip-dsn"
oculus_main
Filtering Diff Outputs
To manually filter a diff output file, you can use the filter
component:
oculus_filter /path/to/diff/file "ignore_pattern1" "ignore_pattern2"
Docker Integration
You can integrate Oculus into your Docker setup by including the installation script in your Dockerfile. Below is an example Dockerfile:
FROM ubuntu:latest
# Install dependencies
RUN apt-get update && apt-get install -y curl
# Download and run the Oculus install script
RUN curl -sSL https://git.nixc.us/colin/Oculus/raw/branch/main/install.sh -o install.sh && \
chmod +x install.sh && \
./install.sh
# Set environment variables
ENV API_ADDRESS="http://localhost:8080"
ENV GLITCHTIP_DSN="your-glitchtip-dsn"
# Start the API server and the main application
CMD ["sh", "-c", "oculus_api & oculus_main"]
Building the Docker Image
To build the Docker image, run:
docker build -t oculus-toolchain .
Running the Docker Container
To run the Docker container, use:
docker run -d --name oculus-toolchain oculus-toolchain