Skip to content

Instantly share code, notes, and snippets.

View amcginlay's full-sized avatar

Alan McGinlay amcginlay

View GitHub Profile
@amcginlay
amcginlay / arm64-macos-parallels-vagrant-kubernetes.md
Last active March 5, 2024 01:23
arm64-macos-parallels-vagrant-kubernetes.md

Building Kubernetes on arm64 MacOS with Parallels and Vagrant

With help from: https://devopscube.com/setup-kubernetes-cluster-kubeadm/

Vagrantfile for Building Kubernetes Control Plane VM

Vagrant.configure("2") do |config|
  config.vm.provision "shell", inline: <<-SHELL
    VERSION="1.29"
    KUBERNETES_VERSION="$VERSION.2-1.1"
@amcginlay
amcginlay / wordpress.sh
Last active February 27, 2024 12:07
AWS EC2 Wordpress
#!/bin/bash
yum update -y
yum install httpd php php-mysql -y
cd /var/www/html
echo "healthy" > healthy.html
wget https://wordpress.org/wordpress-5.1.1.tar.gz
tar -xzf wordpress-5.1.1.tar.gz
cp -r wordpress/* /var/www/html/
rm -rf wordpress
rm -rf wordpress-5.1.1.tar.gz
@amcginlay
amcginlay / tlspk-sko-demo.md
Last active December 14, 2023 13:24
TLSPK demo for SKO (container-gulch)
STACK_BASE_NAME=sko-demo
VCPRegion=US                 # EU does not fully support K8s cluster ... yet!
VCPAPIKey=???                # value from https://container-gulch.venafi.cloud/platform-settings/user-preferences?key=api-keys

export AWS_PROFILE=venafi-se # assuming aws credentials have been set up for this account

aws cloudformation create-stack \
  --stack-name ${STACK_BASE_NAME}-$(date +"%y%m%d%H%M%s") \
 --template-url https://venafi-ecosystem.s3.amazonaws.com/tlspk/v2/cfn-tlspk-cluster-bootstrapper.yaml \
@amcginlay
amcginlay / vcert-playbooks.md
Last active December 6, 2023 11:19
Using VCert Playbooks

Using VCert Playbooks

An example based upon documentation here

This code has been tested on x86 Ubuntu

Prerequisites

@amcginlay
amcginlay / cilium-cni.md
Last active December 5, 2023 11:19
Cilium CNI

Cilium CNI

@amcginlay
amcginlay / cilium-service-mesh.md
Last active December 5, 2023 11:18
Cilium Service Mesh

Cilium Service Mesh

@amcginlay
amcginlay / kind-ec2-remote-access.md
Last active November 17, 2023 10:54
KinD cluster on EC2 with Remote Access

KinD cluster on AWS EC2 with Remote Access

Solution tested with MacOS client.

Build Ubuntu VM on AWS EC2

Note: The EC2 instance created by this CloudFormation template is pre-configured to provide the following:

  • 64bit (x86) Ubuntu 22.04 in us-west-2 region
  • Docker Engine
  • EC2 Instance Connect support
  • AWS Systems Manager (SSM) support

Firefly Quick Start

These instructions aim to simplify those already laid out here.

The following assumes your AWS CLI has been pre-authenticated with an AWS account.

Create an Ubuntu EC2 Instance with Docker installed

stack_id=$( \
  aws cloudformation create-stack \
    --stack-name ubuntu-docker-firefly \
@amcginlay
amcginlay / issuer.yaml
Last active October 5, 2023 16:30
issuer.yaml
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: self-signed
spec:
selfSigned: {}

Adventures in OpenShift (OKD on AWS)

Cloud9 Jumpbox

Create a Cloud9 jumpbox using Step 01-03 here. This box will sufficient AWS privileges, for example, EC2 and Route53.

Inspired by Installing a cluster quickly on AWS

Set base directory