Skip to content

Instantly share code, notes, and snippets.

View frippe75's full-sized avatar

frippe75

  • HPE
  • Sweden
View GitHub Profile
@frippe75
frippe75 / btrfs_backup.service
Last active May 4, 2022 14:10 — forked from MolarFox/btrfs_backup.service
btrfs snapshot automation script
# systemd main unit file for btrfs incremental snapshotting
[Unit]
Description=Execute btrfs snapshot routine for given volumes
[Service]
Type=oneshot
ExecStart=/usr/local/bin/btrfs_backup /home 60 # Choose partition mount point and num backups to keep here
---
openshift_openstack_use_nsupdate: False
openshift_openstack_clusterid: "openshift"
openshift_openstack_public_dns_domain: "lab.net"
openshift_openstack_dns_nameservers: []
openshift_openstack_keypair_name: "openshift"
openshift_openstack_external_network_name: "external_network"
openshift_openstack_default_image_name: "CentOS-7-proxy"
openshift_openstack_num_masters: 1
openshift_openstack_num_infra: 1
@frippe75
frippe75 / gist:bf2b72b578d97757ac238cdc1d7a6b14
Created December 14, 2018 21:24
openstack stack template show openshift-cluster
conditions:
no_floating: false
description: OpenShift cluster
heat_template_version: pike
outputs:
etcd_floating_ips:
description: Floating IPs of the etcds
value:
get_attr:
- etcd
@frippe75
frippe75 / gist:125d967d798eefa840b37857c9b51af0
Created December 14, 2018 15:42
Openshift-Ansible generated Openstack Heat templates
[centos@deploy openshift-ansibleu2sHxF]$ cat *
heat_template_version: pike
description: Simple template to generate the needed vlan ids
parameters:
number_of_vlan_ids:
type: number
description: Number of vlan segmentation IDs
default: 1
@frippe75
frippe75 / oneview-js-inject.js
Created October 10, 2018 13:31
oneview-js-inject
window.alert("Got injected!!!");
@frippe75
frippe75 / OpenStack_consumer_GPU_passthrough.md
Created March 3, 2018 06:12 — forked from claudiok/OpenStack_consumer_GPU_passthrough.md
Consumer-grade GPU passthrough in an OpenStack system (NVIDIA GPUs)

Consumer-grade GPUs in an OpenStack system (NVIDIA GPUs)

Assumptions

This assumes you have GTX980 cards in your system (PCI id 10de:13c0 & 10de:0fbb per card). Just add more IDs for other cards in order to make this more generic. This also assumes nova uses qemu-kvm as the virtualization hypervisor (qemu-system-x86_64). This seems to be the default on OpenStack Newton when installed using openstack-ansible.

We assume OpenStack Newton is pre-installed and that we are working on a Nova compute node. This has been tested on an Ubuntu 16.04 system where I installed OpenStack AIO version 14.0.0 (different from the git tag used in the instructions!): http://docs.openstack.org/developer/openstack-ansible/developer-docs/quickstart-aio.html

Prepare the system for GPU passthrough (set up IOMMU/vfio/...)

Note: This is heavily based on information from https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Enabling_IOMMU adapted for Ubuntu 16.04

@frippe75
frippe75 / gist:a88fa59c5a383c8237ae621018125faf
Created May 2, 2017 21:01
Mal-formed JSON ?? from line 488 ....
{"type":"LogicalInterconnectGroupCollectionV300","members":[{"type":"logical-interconnect-groupV300","enclosureType":"SY12000","uplinkSets":[{"networkType":"Ethernet","ethernetNetworkType":"Tunnel","lacpTimer":"Short","logicalPortConfigInfos":[{"logicalLocation":{"locationEntries":[{"relativeValue":3,"type":"Bay"},{"relativeValue":62,"type":"Port"},{"relativeValue":1,"type":"Enclosure"}]},"desiredSpeed":"Auto"},{"logicalLocation":{"locationEntries":[{"relativeValue":6,"type":"Bay"},{"relativeValue":67,"type":"Port"},{"relativeValue":1,"type":"Enclosure"}]},"desiredSpeed":"Auto"}],"networkUris":["/rest/ethernet-networks/19b7a0a8-3dd4-4aaf-bfb4-ae6b3e85f8f7"],"reachability":null,"primaryPort":null,"nativeNetworkUri":null,"mode":"Auto","name":"test_upset"}],"stackingHealth":null,"snmpConfiguration":{"type":"snmp-configuration","trapDestinations":[],"readCommunity":"public","systemContact":"","snmpAccess":[],"enabled":true,"description":null,"status":null,"name":null,"state":null,"created":"2017-05-02T20:45:56.45
oneview_enclosure_group{'Enclosure Group Create':
ensure => 'present',
data => {
name => 'CS-Cloud Enclosure Group',
stackingMode => 'Enclosure',
#interconnectBayMappingCount => '6',
type => 'EnclosureGroupV300',
interconnectBayMappings =>
[
{
oneview_logical_interconnect_group{'Puppet LIG Synergy-with-uplinks':
ensure => 'present',
data => {
name => 'PUPPET_TEST_LIG',
type => 'logical-interconnect-groupV300',
redundancyType => 'Redundant',
enclosureType => 'S12000',
state => 'Active',
uplinkSets => [
{
@frippe75
frippe75 / gist:b011b38aa744e2cf61d7e39a0e539d2b
Created April 11, 2017 14:47
FC LIG in HPE Oneview Puppet Module
# The Interconnects and Uplink Sets can also be declared as follows:
oneview_logical_interconnect_group{'FC LIG':
ensure => 'present',
data => {
name => 'FC LIG',
redundancyType => 'Redundant',
enclosureIndexes => [-1],
interconnectBaySet => 2,
interconnects =>
[