Go to file
Colin e83dafc8bf
ci/woodpecker/push/woodpecker Pipeline was successful Details
Containerizing things.
2024-06-12 16:22:41 -04:00
dist oculus stable 2024-06-12 14:33:22 -04:00
docker Containerizing things. 2024-06-12 16:22:41 -04:00
.gitignore oculus stable 2024-06-12 14:33:22 -04:00
.woodpecker.yml oculus stable 2024-06-12 14:33:22 -04:00
README.md oculus stable 2024-06-12 14:33:22 -04:00
api.go oculus stable 2024-06-12 14:33:22 -04:00
build.sh oculus stable 2024-06-12 14:33:22 -04:00
docker-compose.production.yml Containerizing things. 2024-06-12 15:48:49 -04:00
docker-compose.staging.yml Containerizing things. 2024-06-12 15:48:49 -04:00
filter.go oculus stable 2024-06-12 14:33:22 -04:00
go.mod oculus stable 2024-06-12 14:33:22 -04:00
go.sum oculus stable 2024-06-12 14:33:22 -04:00
install.sh Fixing install.sh 2024-06-12 14:51:33 -04:00
main.go oculus stable 2024-06-12 14:33:22 -04:00
second_container.diff oculus stable 2024-06-12 14:33:22 -04:00
stack.production.yml Containerizing things. 2024-06-12 16:11:59 -04:00
stack.staging.yml Containerizing things. 2024-06-12 16:11:59 -04:00

README.md

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

  1. Download the Install Script:

    curl -sSL https://git.nixc.us/colin/Oculus/raw/branch/main/install.sh -o install.sh
    
  2. Make the Script Executable:

    chmod +x install.sh
    
  3. 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