Skip to content

Instantly share code, notes, and snippets.

View xphyr's full-sized avatar

Mark D xphyr

View GitHub Profile
@xphyr
xphyr / README.md
Last active May 6, 2024 13:12
Running GPU Accelerated Games with OpenShift Virtualization

Running GPU Accelerated Games with OpenShift Virtualization

Introduction

The following document describes at a high level how one can use OpenShift Virtualization, an NVIDIA GPU, and VirtualGL to run hardware accelerated remote games.

Requirements

  • OpenShift 4.8 or Higher
  • OpenShift Virtualization 4.8 or higher
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
MENU TITLE PXE Menu
LABEL Assisted-Installer
KERNEL aidiscovery/vmlinuz
APPEND ip=dhcp rd.neednet=1 initrd=aidiscovery/initrd.img,aidiscovery/ignition.img random.trust_cpu=on rd.luks.options=discard coreos.live.rootfs_url=http://192.168.5.31:9999/airootfs.img ignition.firstboot ignition.platform.id=metal
@xphyr
xphyr / main.go
Created May 1, 2020 13:36
Go route test app
package main
import (
"fmt"
"log"
"net/http"
"os"
)
var (
@xphyr
xphyr / Dockerfile
Created May 1, 2020 13:05
Golang Docker build
FROM docker.io/golang as john_builder
WORKDIR /opt/app-root
ADD . /opt/app-root
RUN CGO_ENABLED=0 GOOS=linux go build -o bin/4john
FROM docker.io/alpine:latest
COPY --from=john_builder /opt/app-root/bin/4john /usr/bin/4john
ENTRYPOINT [ "4john" ]
---
- name: Prep OS
hosts: all
tasks:
- name: Update OS
yum:
update_cache: yes
name: "*"
state: latest
register: yum_update
@xphyr
xphyr / Dockerfile
Created April 5, 2019 23:14
Dockerfile
FROM centos:7
RUN yum -y install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
sed -i -e "s/^enabled=1/enabled=0/" /etc/yum.repos.d/epel.repo && \
yum -y --enablerepo=epel install wget git ansible python-pip pyOpenSSL && yum clean all
RUN pip install 'ansible[azure]'
RUN mkdir -p /okdinstall/setup_scripts
RUN cd /okdinstall && git clone https://github.com/openshift/openshift-ansible && \
cd openshift-ansible && \
git checkout release-3.11

Keybase proof

I hereby claim:

  • I am xphyr on github.
  • I am xphyr (https://keybase.io/xphyr) on keybase.
  • I have a public key ASBgD-M9426MOm7HkK_dZjQxRYkOSu1ypakoFyun43Kr7wo

To claim this, I am signing this object:

@xphyr
xphyr / playbook.yml
Last active October 14, 2016 18:29
Editing a yaml file with cpu
# This file will handle all the paychex specific edits to openshift config files
# # This file updates the following information
# # turns on emptydir quotas on compute nodes
- hosts: nodes
tasks:
- name: Update Compute Node EmptyDir quota settings
lineinfile: dest=/etc/origin/node/node-config.yaml
backup="yes"
regexp='^ perFSGroup:'
@xphyr
xphyr / index.js
Created July 14, 2013 13:49
Simple Plugin for "Uptime" that send alerts via Pushover. I am not a Node hacker ... I barely understand why this code works .... but it does. I have not tried it with multiple users yet, so dont know if it will work to do multiple notifications. Let me know if you try it.
/**
* Pushover plugin for the uptime project - https://github.com/fzaninotto/uptime
* Thanks to DMathieu for the Campfire plugin which I basically hacked up to make this
* work: https://gist.github.com/dmathieu/5592418
*
* This index.js files goes to a directory `plugins/pushover` in your installation of uptime.
*
* Notifies all events (up, down, paused, restarted) to pushover
*
* This plugin has a dependency on `pushover-notifications`.