Go to file
Colin 98df5665e2
ci/woodpecker/push/woodpecker Pipeline was successful Details
Docs and polish
2024-06-12 14:23:16 -04:00
dist fixing dist output and trying an install.sh 2024-06-12 14:20:03 -04:00
docker/oculus Fixup 2024-06-11 11:03:16 -04:00
.gitignore fixing dist output and trying an install.sh 2024-06-12 14:20:03 -04:00
.woodpecker.yml First attempt for Oculus 2024-06-11 10:24:40 -04:00
README.md Docs and polish 2024-06-12 14:23:16 -04:00
api.go Stable and functional filter.go it manages to match a number of lines I need matched. 2024-06-12 13:15:13 -04:00
build.sh fixing dist output and trying an install.sh 2024-06-12 14:20:03 -04:00
docker-compose.production.yml First attempt for Oculus 2024-06-11 10:24:40 -04:00
docker-compose.staging.yml First attempt for Oculus 2024-06-11 10:24:40 -04:00
filter.go Stable and functional filter.go it manages to match a number of lines I need matched. 2024-06-12 13:15:13 -04:00
go.mod okay it at least compiles dunno if it does anything yet. 2024-06-11 17:21:21 -04:00
go.sum okay it at least compiles dunno if it does anything yet. 2024-06-11 17:21:21 -04:00
install.sh fixing dist output and trying an install.sh 2024-06-12 14:20:03 -04:00
main.go This seems to work now. 2024-06-12 13:53:24 -04:00
second_container.diff Stable and functional filter.go it manages to match a number of lines I need matched. 2024-06-12 13:15:13 -04:00
stack.production.yml Fixup 2024-06-11 10:42:18 -04:00
stack.staging.yml Fixup 2024-06-11 10:42:18 -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

Contributing

We welcome contributions! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.