This file contains 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/sh | |
# Adapted from https://gist.github.com/westurner/3196564 | |
# Package versions as of 9/14/2013, assumes that you've installed a virtualenv | |
setup_brew () { | |
if [ ! -f "/usr/local/bin/brew" ]; then | |
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
fi |
This file contains 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
PS C:\Users\jyee> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
Getting latest version of the Chocolatey package for download. | |
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.15. | |
Downloading 7-Zip commandline tool prior to extraction. | |
Extracting C:\Users\jyee\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\jyee\AppData\Local\Temp\chocolatey\chocInstall... | |
Installing chocolatey on this machine | |
Creating ChocolateyInstall as an environment variable (targeting 'Machine') | |
Setting ChocolateyInstall to 'C:\ProgramData\chocolatey' | |
WARNING: It's very likely you will need to close and reopen your shell | |
before you can use choco. |
This file contains 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
PS C:\Users\jyee> minikube start --cpus 4 --memory 4096 | |
* minikube v1.6.2 on Microsoft Windows 10 Pro 10.0.18362 Build 18362 | |
* Selecting 'hyperv' driver from existing profile (alternates: [virtualbox]) | |
* Creating hyperv VM (CPUs=4, Memory=4096MB, Disk=20000MB) ... | |
* Preparing Kubernetes v1.17.0 on Docker '19.03.5' ... | |
* Downloading kubeadm v1.17.0 | |
* Downloading kubelet v1.17.0 | |
* Pulling images ... | |
* Launching Kubernetes ... | |
* Waiting for cluster to come online ... |
This file contains 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
PS C:\Users\jyee> choco install kubernetes-helm | |
>> | |
Chocolatey v0.10.15 | |
Installing the following packages: | |
kubernetes-helm | |
By installing you accept licenses for the packages. | |
Progress: Downloading kubernetes-helm 3.0.2... 100% | |
kubernetes-helm v3.0.2 [Approved] | |
kubernetes-helm package files install completed. Performing other installation steps. |
This file contains 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
PS C:\Users\jyee> kubectl create namespace cert-manager | |
namespace/cert-manager created | |
PS C:\Users\jyee> kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.12/deploy/manifests/00-crds.yaml | |
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created | |
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created | |
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created | |
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created | |
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created | |
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created |
This file contains 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
PS C:\Users\jyee> helm repo add rancher-stable https://releases.rancher.com/server-charts/stable | |
"rancher-stable" has been added to your repositories | |
PS C:\Users\jyee> helm repo update | |
Hang tight while we grab the latest from your chart repositories... | |
...Successfully got an update from the "rancher-stable" chart repository | |
...Successfully got an update from the "jetstack" chart repository | |
Update Complete. ⎈ Happy Helming!⎈ | |
PS C:\Users\jyee> kubectl create namespace cattle-system | |
namespace/cattle-system created | |
PS C:\Users\jyee> helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.localdev |
This file contains 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
Machine({ | |
id: 'SWAPI', | |
initial: 'idle', | |
context: { | |
user: null | |
}, | |
states: { | |
idle: { | |
on: { | |
FETCH: 'loading' |
This file contains 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 -x | |
### 1. Create a cluster with k3d that connects port 443 to the loadbalancer provided by k3d | |
k3d cluster create k3d-rancher --api-port 6550 --servers 1 --agents 3 --port 443:443@loadbalancer --wait | |
k3d cluster list | |
### 2. Set up a kubeconfig so you can use kubectl in your current session | |
KUBECONFIG_FILE=~/.kube/k3d-rancher | |
k3d kubeconfig get k3d-rancher > $KUBECONFIG_FILE | |
export KUBECONFIG=$KUBECONFIG_FILE |
This file contains 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 ubuntu | |
LABEL maintainer="Matthew Schwartz @schwartz1375" | |
USER root | |
ENV DEBIAN_FRONTEND=noninteractive | |
#RUN DEBIAN_FRONTEND=noninteractive \ | |
RUN apt-get -y update && apt-get -y \ |
This file contains 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
# Default env vars | |
$env:CLUSTER_NAME="k3d-rancher" | |
$env:RANCHER_SERVER_HOSTNAME="rancher.localhost" | |
$env:KUBECONFIG_FILE="${env:CLUSTER_NAME}.yaml" | |
date | |
# Get kubectl and helm | |
choco list --local-only | |
choco install kubernetes-cli -y | |
choco install kubernetes-helm -y |
OlderNewer