Skip to content

Latest commit

 

History

History
102 lines (94 loc) · 2.58 KB

minikube.md

File metadata and controls

102 lines (94 loc) · 2.58 KB

Minikube (Linux):

Prerequisites

  • Install minikube
  • Create a pulumi account
  • Install the pulumi CLI:
    curl -fsSL https://get.pulumi.com | sh
  • Log into your pulumi account:
    pulumi login
  • Start minikube and mount the unchained directory to provide hot reloading (run in root unchained directory for $PWD, otherwise, substitute $PWD with the absolute path to root unchained directory):
    minikube start --mount-string="$PWD:$PWD --mount"
  • Install helm
  • Add mongo helm chart:
    helm repo add bitnami https://charts.bitnami.com/bitnami

Deploy Common Dependencies Stack

  • Copy sample pulumi configuration:
    cp pulumi/Pulumi.sample.yaml pulumi/Pulumi.minikube.yaml
  • Update cluster to minikube in pulumi/Pulumi.minikube.yaml
  • In the pulumi/
    • Initialize your pulumi stack:
      pulumi stack init minikube
    • Deploy common dependencies:
      pulumi up

Deploy Coinstack Stack

  • Copy sample env file:
    cp coinstacks/ethereum/sample.env coinstacks/ethereum/.env
  • Fill out any missing environment variables
  • Copy sample pulumi configuration:
    cp coinstacks/ethereum/pulumi/Pulumi.sample.yaml coinstacks/ethereum/pulumi/Pulumi.minikube.yaml
  • Update stack to the output value of echo ${pulumi whoami}/common/minikube
  • In the coinstacks/ethereum/pulumi/ directory:
    • Initialize your pulumi stack:
      pulumi stack init minikube
    • Deploy coinstack:
      pulumi up

Useful Commands

  • Show list of available pulumi stacks (currently selected stack will have an asterisk next to the name):
    pulumi stack ls
  • Select your desired pulumi stack:
    pulumi stack select docker-desktop
  • Completely tear down the kubernetes resources and pulumi stack state:
    pulumi destroy
  • View service ports created by minikube:
    minikube service list
  • Metrics can be turned on with:
    minikube addons enable metrics-server
  • You can stop minikube when you are not using it:
    minikube stop
  • If you ever need/want a fresh cluster:
    • Destroy common dependencies stack state in pulumi/:
      pulumi destroy
    • Destroy coinstack pulumi stack state in coinstacks/ethereum/pulumi/:
      pulumi destroy
    • Delete minikube cluster cluster:
      minikube delete