Skip to content

Instantly share code, notes, and snippets.

@dmc5179
dmc5179 / install_omnisci.sh
Created August 18, 2019 02:08
Script to configure and setup OmniSci on OCP with GPU support
#!/bin/bash
#Copyright (C) 2019 Red Hat, Inc.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@dmc5179
dmc5179 / hosts
Created August 19, 2019 20:51
Sample ansible inventory for deploying a OCP 3.11 cluster on a single KVM host
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
glusterfs
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
debug_level=4
@dmc5179
dmc5179 / mask-r-cnn-ship-detection-minimum-viable-model-1.ipynb
Last active September 4, 2019 01:36
Jupyter Nodebook and Python script for the Mask R-CNN Ship Detection Minimum Viable Model (Python 3.6)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmc5179
dmc5179 / mask-r-cnn-serving.py
Last active September 20, 2019 15:16
Mask-r-cnn model serving
"""
Mask R-CNN
Copyright (c) 2019
Licensed under the MIT License (see LICENSE for details)
------------------------------------------------------------
Usage: import the module (see Jupyter notebooks for examples), or run from
the command line as such:
@dmc5179
dmc5179 / README.md
Last active December 8, 2019 16:30
OpenShift Local Storage Class

OpenShift 3.11 Local Storage Class

ConfigMap and Storage Class YAML to create a local SSD Storage Class

Getting Started

These instructions will configure and enable a local storage class in OpenShift 3.11. This allows for an SSD EBS volume to be attached to the node and mounted directly by pods on that node

Prerequisites

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rstudio-pv-claim
labels:
app: rstudio
spec:
accessModes:
- ReadWriteOnce
@dmc5179
dmc5179 / openshift4-mirror.sh
Created December 27, 2019 16:48
Mirror an OpenShift 4 GA Repository
export OCP_RELEASE=4.2.12
export LOCAL_REGISTRY='openshift4-registry.redhatgovsa.io:5000'
export LOCAL_REPOSITORY='ocp4/openshift4'
export PRODUCT_REPO='openshift-release-dev'
export LOCAL_SECRET_JSON='/home/ec2-user/pull-secret.txt'
export RELEASE_NAME="ocp-release"
oc adm -a ${LOCAL_SECRET_JSON} release mirror \
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
@dmc5179
dmc5179 / openshift4-nightly-mirror.sh
Created December 27, 2019 16:51
Mirror OpenShift 4 Nightly Release
export OCP_RELEASE='4.3.0-0.nightly-2019-12-24-120035'
export LOCAL_REGISTRY='openshift4-registry.redhatgovsa.io:5000'
export LOCAL_REPOSITORY='ocp4/openshift4'
export PRODUCT_REPO='openshift-release-dev'
export LOCAL_SECRET_JSON='/home/ec2-user/pull-secret.txt'
export RELEASE_NAME="ocp-release-nightly"
oc adm -a ${LOCAL_SECRET_JSON} release mirror \
--from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} \
#!/bin/bash
# DMC: Create Ignition files for each node based on the base ignition file and the fake root for each host
# This script is a work in progress
# Things that we have learned so far....
# the bootstrap node I can set the network with the fake root ifcfg-ens3
# that has failed every time for the masters even though m4.2xlarge is ens3
# I've had to use the VPC DHCP option set
@dmc5179
dmc5179 / route53_dns_update.sh
Last active January 13, 2020 14:12
AWS Update Route53 DNS Record
#!/bin/bash
#
# Script to change the Route53 public DNS entry associated to this host
# with the new EIP assigned to this host when booted.
#
# Need to get EIP using the CLI since that IP is not actually assigned to the host
set -xe
INSTANCE_ID=""
HOSTED_ZONE=""