This file contains hidden or 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 | |
oc login --token=sha256~randomstuff --server=https://apiserver.openshift-kube-apiserver.svc.cluster.local |
This file contains hidden or 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
profiles: | |
- apiGroup: compliance.openshift.io/v1alpha1 | |
kind: Profile | |
name: ocp4-stig-v2r2 | |
- apiGroup: compliance.openshift.io/v1alpha1 | |
kind: Profile | |
name: rhcos4-stig-v2r2 | |
- apiGroup: compliance.openshift.io/v1alpha1 | |
kind: Profile | |
name: ocp4-stig-node-v2r2 |
This file contains hidden or 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
kind: ImageSetConfiguration | |
apiVersion: mirror.openshift.io/v2alpha1 | |
mirror: | |
platform: | |
# Uncommenting the following two lines and updating to reflect your specific architecture, will help decrease the size of the mirrored content. | |
# architectures: | |
# - amd64 | |
channels: | |
- type: ocp |
This file contains hidden or 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: argoproj.io/v1alpha1 | |
kind: ApplicationSet | |
metadata: | |
name: guestbook | |
spec: | |
generators: | |
- list: | |
# Parameters are generated based on this cluster list, to be | |
# substituted into the template below. | |
elements: |
This file contains hidden or 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: siteconfig.open-cluster-management.io/v1alpha1 | |
kind: ClusterInstance | |
metadata: | |
name: "sno3" | |
namespace: "sno3" | |
spec: | |
additionalNTPSources: | |
- "2600:52:7:59::11" | |
baseDomain: "inbound.bos2.lab" | |
clusterImageSetNameRef: "openshift-4.18.0-ec.4" |
This file contains hidden or 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
from typing import List, Optional | |
from sqlalchemy import String, ForeignKey, create_engine | |
from sqlalchemy.orm import Mapped, Session, mapped_column, relationship, DeclarativeBase | |
class Base(DeclarativeBase): | |
pass | |
class User(Base): | |
__tablename__ = "user_account" | |
id: Mapped[int] = mapped_column(primary_key=True) |
This file contains hidden or 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 | |
# setup env | |
python3.11 -m venv --upgrade-deps venv | |
source ./venv/bin/activate | |
pip install --upgrade pip | |
# remove llama_cpp_python | |
pip uninstall llama-cpp-python -y | |
pip cache remove llama_cpp_python |
This file contains hidden or 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
from urllib.request import urlopen | |
from re import sub | |
def read(version:str) -> None: | |
with urlopen(f"https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{version}/release.txt") as f: | |
contents = f.read().decode('utf-8').split('\n') | |
for content in contents: | |
if 'quay.io' in content: | |
line = sub(r"^\s*[\w-]+\s*", "", content) | |
print(f" - name: {line}") |
This file contains hidden or 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 | |
# This script tries to gracefully shutdown a 3-node / "compact" OCP cluster | |
# There seems to be some coordination required when shutting down | |
# when ODF, Logging, and Virtualization are deployed. | |
CLUSTER_NAME="your-cluster-name-here" | |
OC_BIN=/usr/local/bin/oc | |
KUBECONFIG=~/.kube/config | |
OC_CMD="$OC_BIN --kubeconfig=$KUBECONFIG" |
This file contains hidden or 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
[Unit] | |
Description=Pi-Hole Podman Container | |
After=firewalld.service | |
[Service] | |
ExecStart=/usr/bin/podman run --name pihole -p 7053:53/tcp -p 7053:53/udp -p 7067:67/udp -p 7080:80/tcp -v /home/jkeam/dev/projects/pi-hole/podman/dnsmasq:/etc/pihole -v /home/jkeam/dev/projects/pi-hole/podman/pihole:/etc/dnsmasq.d -e TZ="America/New_York" -e WEBPASSWORD="awesomepassword" -e FTLCONF_LOCAL_IPV4="192.168.1.201" -e DHCP_ACTIVE=true -e DHCP_START="192.168.1.202" -e DHCP_END="192.168.1.254" -e DHCP_ROUTER="192.168.1.1" -e DHCP_rapid_commit=true --hostname pi -e VIRTUAL_HOST="pi" -e PROXY_LOCATION="pi" -e INTERFACE="tap0" --security-opt label=disable --cap-add=NET_ADMIN --cap-add=NET_RAW --cap-add=CAP_AUDIT_WRITE --net=slirp4netns:port_handler=slirp4netns --dns=127.0.0.1 --dns=1.1.1.1 --restart=always docker.io/pihole/pihole:latest | |
ExecStop=/usr/bin/podman stop -t 2 pihole | |
ExecStopPost=/usr/bin/podman rm pihole | |
[Install] |
NewerOlder