Skip to content

Instantly share code, notes, and snippets.

View jcpowermac's full-sized avatar

Joseph Callen jcpowermac

  • Red Hat
  • Paw Paw, Michigan
View GitHub Profile
@jcpowermac
jcpowermac / README.md
Last active January 8, 2021 22:18
openshift serverless with VMware event broker
@jcpowermac
jcpowermac / ServiceMonitoring.yaml
Created December 18, 2020 19:34
vsphere exporter in openshift (will submit pr)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: vmware-exporter
name: vmware-exporter-monitor
namespace: openshift-vsphere-infra
spec:
endpoints:
- interval: 30s
@jcpowermac
jcpowermac / README.md
Created December 8, 2020 18:23
vCenter: role, privileges, permissions - mitmproxy

There is a proxy already running on vCenter - assuming this proxies the various services running on vCenter via the single port (TCP 443 - https):

Modify /sdk changing the port to 28085.

root@ip-172-31-250-99 [ /etc/vmware-rhttpproxy/endpoints.conf.d ]# cat vpxd-rhttpproxy-endpoint.conf 
/sdk local 28085 redirect allow
@jcpowermac
jcpowermac / main.go
Last active November 12, 2020 15:41
vsphere permissions
package main
import (
"context"
"fmt"
"net/url"
"strings"
"time"
"github.com/davecgh/go-spew/spew"
#!/bin/bash
export KUBECONFIG=/projects/installer-testing/vsphere-ipi/auth/kubeconfig
SECRET_PATH=/tmp
oc extract secret/vsphere-creds -n kube-system --to=${SECRET_PATH}
WORKSPACE="$(oc get cm cloud-provider-config -n openshift-config -o jsonpath='{.data.config}' | head -n 10 | tomljson | jq '.Workspace')"
@jcpowermac
jcpowermac / devfile.yaml
Created August 18, 2020 18:18
openshift installer devfile
metadata:
name: installer
projects:
- name: openshift-installer
source:
location: 'https://github.com/openshift/installer.git'
type: git
branch: release-4.5
clonePath: src/github.com/openshift/installer
components:
@jcpowermac
jcpowermac / slow.patch
Created July 31, 2020 01:59
storage policy with openshift-installer
diff --git a/data/data/vsphere/bootstrap/main.tf b/data/data/vsphere/bootstrap/main.tf
index d223f6a8e..980678388 100644
--- a/data/data/vsphere/bootstrap/main.tf
+++ b/data/data/vsphere/bootstrap/main.tf
@@ -1,3 +1,7 @@
+data "vsphere_storage_policy" "slow" {
+ name = "slow"
+}
+
resource "vsphere_virtual_machine" "vm" {
@jcpowermac
jcpowermac / ign-snip.ign
Created March 26, 2020 20:20
systemd unit ignition to run open-vm-tools
systemd:
units:
- name: open-vm-tools.service
enabled: true
contents: |
[Unit]
Description=open-vm-tools
After=network-online.target
Wants=network-online.target
@jcpowermac
jcpowermac / demo.md
Last active April 22, 2020 16:16
vsphere-ipi-demo

OCP 4.5 vSphere IPI demo

create cluster with TUI

destroy cluster

  • For each vCenter object tagged and within the created folder

create cluster

@jcpowermac
jcpowermac / main.go
Created January 23, 2020 17:59
import
package main
import (
"context"
"net/url"
"time"
"github.com/davecgh/go-spew/spew"
_ "github.com/pkg/errors"