Skip to content

Instantly share code, notes, and snippets.

View v1k0d3n's full-sized avatar
🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it

Brandon B. Jozsa v1k0d3n

🎧
Give me a soft subtle mix, and if ain't broke then don't try to fix it
View GitHub Profile
##Dockerfile
FROM centos:7
RUN yum update -y && yum install -y wget perl openssl-devel dmidecode
RUN wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
RUN yum install -y srvadmin-idracadm7
RUN cp /opt/dell/srvadmin/bin/idracadm7 /usr/local/bin/racadm
##Build via... (run inside somedir/Dockerfile)
@v1k0d3n
v1k0d3n / README.md
Last active May 29, 2021 17:00
Online OpenShift Assisted Installer w/Calico as Default CNI

OpenShift Assisted Installer w/Calico as Default CNI

Red Hat quietly released a new method for installing bare metal OpenShift clusters via a tool called Assisted-Installer (or Assisted-Service). What makes this service really unique is that it reduces the infrastructure requirements for deploying bare metal clusters (i.e. PXE/UEFI, web servers, etc). Reduction of these legacy bare metal requirements opens up some interesting opportunities for carrier-based deployments such as RAN, MEC, uCPE, Content Delivery, and many other Edge or FE types of solutions.

Of course, there's a straightforward user-interface which can be leveraged, but I think what is most interesting about the Assisted-Service centers around customizations through it's REST API. This is in fact what I'm going to cover in this blog.

So how does this all work for bare metal without UEFI, DHCP and other traditional bootstrapping methods, you might ask? The Assisted-Installer is used to produce a LiveISO which includes a call-back URL for the

  • Combine the pull secrents from Quay and the one from the local registry
jq -s '.[0] * .[1]' pull-secret.json local-auth.json  > pull-secret-2.json
  • Mirror relrease
export AIRGAP_SECRET_JSON='pull-secret-2.json'
#!/bin/sh
# profile patches are cumulative: http://blogs.vmware.com/vsphere/2013/10/are-esxi-patches-cumulative.html
# favour update over install: http://www.v-front.de/2013/05/quickest-way-to-update-your-standalone.html
esxcli network firewall ruleset list | grep httpClient
# Enable http:
esxcli network firewall ruleset set -e true -r httpClient
# List updates:
esxcli software sources profile list --depot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
# Only relevant updates:
esxcli software sources profile list --depot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | sort | grep -w standard | grep "ESXi-5.1.0-20"
@v1k0d3n
v1k0d3n / synology.startup
Created February 15, 2021 21:17 — forked from SanCoder-Q/synology.startup
Synology NAS - How to make a program run at startup
Synology NAS - How to make a program run at startup
The other day I created a little node.js project to keep track of some finances. Synology has a node.js package but that just installs the tools - it has no 'container' or any other support to drop files and have it run automagically. Maybe one day.
In the meantime, you can start your project when you SSH into the NAS. My project has a 'www' script which bootstraps my project, so to start I simply type 'node bin/www' from the project directory. But, it only runs while I'm logged in, and if I log out for any reason, the process dies. That's hardly useful when I'm away from home, or on a different PC. So I decided to have a look at starting my project as a Linux service.
After doing a lot of research into how Synology does services, and a few failed attempts at init scripts, I found that Synology DSM (since version 5 perhaps) bundles Upstart, which is a neat little tool to deal with services on Linux. It's most prevalent on Debian and derivatives (notably Ub
@v1k0d3n
v1k0d3n / README.md
Created April 22, 2020 16:28 — forked from dcode/README.md
How to use CoreDNS w/ etcd backend

Setup CoreDNS w/ etcd backend

Why CoreDNS

[CoreDNS][coredns] was designed from the ground up to provide robust, plugin-based DNS server for use in cloud environments. Namely, it serves as the default primary service discovery mechanism for Kubernetes.

Using CoreDNS allows us to have a lightweight DNS server on RockNSM (11 Mb binary is all that's needed!) to facilitate multi-node service discovery. Alternatively, if another existing DNS service is available, this can be used instead. Aligning with the way the Kubernetes manages service discovery also allows us to build new RockNSM features in parallel with the coming Kubernetes support.

RockNSM Application

@v1k0d3n
v1k0d3n / coredns-testing.md
Created September 8, 2019 15:59
Local CoreDNS setup. For production we used CoreDNS extensions for proxy/forwarding to Route53, but this was used to test a local CoreDNS instance + etcd SRV auto-discovery for local platform development.

CoreDNS Proposal

Proof of Concept

#!/bin/bash
## Prepare any variables used for this script:
export network_endpoints_dns_coredir="$(pwd)/scripts/deployments/coredns"
export network_endpoints_dns_fqdn="jinkit.com"
@v1k0d3n
v1k0d3n / calico-os-v3-7-2.yaml
Created July 13, 2019 00:01
Calico Manifests for Kata Installations
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# You must set a non-zero value for Typha replicas below.
@v1k0d3n
v1k0d3n / README.md
Last active July 10, 2019 16:06
A list of helpful parsing commands that include: kubernetes, aws, jq, yq and other fine tools. Comment to add your favorite useful commands. Please be kind and source any commands found elsewhere when possible.

Data Crunching

The following is a guide for many useful commands that can be used when parsing, replacing, patching various platforms, etc.

Cloud Providers

AWS

Management

@v1k0d3n
v1k0d3n / README.md
Created April 27, 2019 21:31 — forked from ralfr/README.md
Applescript to launch iTerm2 Version 3+ from OS X Finder via keyboard shortcut or Toolbar

Description

Based on info from http://peterdowns.com/posts/open-iterm-finder-service.html but with modified behavior and fixed to work with iTerm2 version 3 or later. It will not work with older versions of iTerm. The modified behavior is to open a new terminal window for each invocation instead of reusing an already open window. Update - The original author released a build script for the newer iTerm2 versions at https://github.com/peterldowns/iterm2-finder-tools that keeps the original behavior of reusing an open iTerm2 window.

To open iTerm2 at selected folder with keyboard shortcut

  1. Run Automator, select a new Service
  2. Select Utilities -> Run AppleScript
  3. Service receives selected 'folders' in 'finder.app'
  4. Paste script: