This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# rh-download-blob | |
# Downloads a blob path from a Red Hat Container Registry location, using a username/password combo | |
# Input your username or service account and password/token. | |
USERNAME="username" | |
PASSWORD="password" | |
# Change this to the required blob location (SHA256 path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: podman-api-host | |
labels: | |
app: podman-api-host | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Verify if a user can run `systemctl` commands as a non-root user | |
hosts: localhost | |
vars: | |
rootless_user: "rmanes" | |
rootless_uid: "1000" | |
become_method: machinectl | |
tasks: | |
- name: Check if DBUS socket exists for session user | |
stat: | |
path: "/run/user/{{ rootless_uid }}/bus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
import sys | |
RCON_URL='http://mycoolrcon.example' | |
RCON_USERNAME='admin' | |
RCON_PASSWORD='password' | |
CSV_FILE='vips.csv' | |
def main(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/opencontainers/selinux/go-selinux/label" | |
) | |
// Mirroring the behavior found here: | |
// https://github.com/containers/podman/blob/8432ed7488e9c62738f9308fcc03f2ae9c2cd615/libpod/util_linux.go#L110-L129 | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Builds infiniband support into the base RHEL support-tools image. | |
# Must be run from a subscribed RHEL host. | |
IMAGE_NAME="quay.io/robbmanes/support-tools-ib:latest" | |
function main() { | |
echo "Pulling latest support-tools container image..." | |
CONTAINER=$(buildah from registry.redhat.io/rhel8/support-tools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <syscall.h> | |
#include <sys/user.h> | |
#include <sys/types.h> | |
#include <sys/ptrace.h> | |
#include <errno.h> | |
#define SYSCALL_EXIT 60 | |
#define SYSCALL_EXIT_GROUP 231 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# rh-container-registry.sh | |
# Test functionality of Red Hat Container Registries using pure HTTP/S. | |
# Useful for determining issues when/if behind proxies, load balancers, | |
# or other in-the-middle network devices. | |
# For more information on using Red Hat Container Registries, please see | |
# the following: | |
# https://access.redhat.com/RegistryAuthentication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unmount-watcher.stp | |
# Watches for filesystem unmounts and prints additional information about them. | |
# Authored by Robb Manes <[email protected]> | |
# Execute by running: | |
# stap unmount-watcher.stp > unmount-watcher.out | |
# In containerized environments, the unmounting process may belong to a different process namespace, so it's useful to print the | |
# entire tree to determine where it came from. | |
# This is borrowed from https://sourceware.org/systemtap/examples/network/connect_stat.stp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
def usage(): | |
msg = ''' | |
shmem_test_tool.py | |
================== | |
Utility for testing Python multiprocessing shared memory segments. | |
Note this is NOT the same as IPCS SHMEM segments in Linux/Unix. |
NewerOlder