Skip to content

Instantly share code, notes, and snippets.

View cwilhit's full-sized avatar

Craig D Wilhite cwilhit

View GitHub Profile
apiVersion: infrastructure.example.org/v1alpha1
kind: Blob
metadata:
name: myblob
namespace: default
spec:
id: myblob53068859320
parameters:
resourcegroup: my-blob-rg
@cwilhit
cwilhit / blob-composition.yaml
Last active April 4, 2023 21:10
A Crossplane composition for an Azure Blob storage resource
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: xblobs.infrastructure.example.org
labels:
provider: azure
spec:
compositeTypeRef:
apiVersion: infrastructure.example.org/v1alpha1
kind: XBlob
@cwilhit
cwilhit / blob-definition.yaml
Last active April 4, 2023 21:09
An XRD for an Azure Blob Storage resource
apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
name: xblobs.infrastructure.example.org
spec:
group: infrastructure.example.org
names:
kind: XBlob
plural: xblobs
claimNames:
@cwilhit
cwilhit / crossplane.yaml
Created April 4, 2023 17:59
A sample crossplane.yaml defining a configuration for Azure in Upbound
apiVersion: meta.pkg.crossplane.io/v1alpha1
kind: Configuration
metadata:
name: configuration-azure-platform
annotations:
meta.crossplane.io/maintainer: <replacewithyouremail>
meta.crossplane.io/source: github.com/<replacewithyourgiturl>
meta.crossplane.io/license: Apache-2.0
meta.crossplane.io/description: |
This configuration defines a set of Crossplane APIs for Azure resources
@cwilhit
cwilhit / BionicBeaver.json
Last active March 26, 2018 19:22
JSON definition for custom Bionic Beaver image for Hyper-V Quick Create VM Gallery
{
"images": [
{
"name": "Ubuntu Bionic Beaver",
"version": "18.04",
"locale": "en-US",
"publisher": "Canonical Ltd.",
"lastUpdated": "2018-03-25T07:56:00Z",
"description": [
"Start a fresh Ubuntu environment.",
// Create a client AF_UNIX socket
#define SERVER_ADDRESS “/mnt/c/unix/server.sock”
SOCKADDR_UN ServerAddress = {0};
Client = socket(AF_UNIX, SOCK_STREAM, 0);
// Bind the socket to a path.
ServerAddress.sun_family = AF_UNIX;
strcpy(ServerAddress.sun_path, SERVER_ADDRESS);
connect(Client, &ServerAddress, sizeof(ServerAddress));
// Create a server AF_UNIX socket
#define SERVER_ADDRESS “c:\unix\server.sock”
SOCKADDR_UN ServerAddress = {0};
Server = socket(AF_UNIX, SOCK_STREAM, 0);
// Bind the socket to a path.
ServerAddress.sun_family = AF_UNIX;
strcpy(ServerAddress.sun_path, SERVER_ADDRESS);
bind(Server, &ServerAddress, sizeof(ServerAddress));
#Let’s enable extra metadata options by default
[automount]
enabled = true
root = /windir/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
#Let’s enable DNS – even though these are turned on by default, we’ll specify here just to be explicit.
[network]
generateHosts = true
:#!/bin/bash
#Generate CA private key
openssl genrsa -aes256 -out ca-key.pem 4096
#Generate CA public key
openssl req -subj "/C=US/ST=Washington/L=Redmond/O=./OU=." -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem
#Generate server key
openssl genrsa -out server-key.pem 4096
#Generate server signing request
#update apt
sudo apt-get update
#install packages to use repo over HTTPS
sudo apt-get install apt-transport-https \
ca-certificates curl software-properties-common
#Add Docker GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –