As a cluster-admin
user, with a correctly running Minishift, perform the following steps:
#!/usr/bin/env bash
# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
'use strict'; | |
const gmap = require('@google/maps'); | |
function location(params) { | |
const latlng = JSON.parse(JSON.stringify(params.coords)) | |
const gmapClient = gmap.createClient({ | |
key: process.env.GOOGLE_MAPS_API_KEY, |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Collaby by Code :: Demo Code for Photo and Filter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- the javascript library used for build the Photo with Frames --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/2.3.6/fabric.min.js"></script> |
#!/bin/bash | |
set -e | |
# Create a profile called "servicemesh" | |
minishift profile set servicemesh | |
# give the profile 8GB of memory | |
minishift config set memory 8GB | |
# give the profile 4 CPU | |
minishift config set cpus 4 | |
# adding container image caching to allow faster profile setup |
#!/bin/bash | |
set -e | |
git clone https://github.com/minishift/minishift-addons | |
minishift addon install ./minishift-addons/add-ons/istio |
#!/bin/bash | |
set -e | |
minishift addon enable istio | |
minishift addon apply istio |
cd $PROJECT_HOME/service | |
kubectl create namespace demos | |
kubectl label namespace demos istio-injection=enabled | |
eval $(minikube docker-env) | |
docker build -t dev.local/rhdevelopers/node-greeter:0.0.1 . | |
kubectl apply -f service.yaml -n demos |
INGRESSGATEWAY=istio-ingressgateway | |
IP_ADDRESS="$(minishift ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')" | |
curl -H "Host: greeter.demos.example.com" $IP_ADDRESS |
Instead of creating a new gist, you can update an existing one by passing its ID | |
or URL with "-u". For this to work, you must be logged in, and have created the | |
original gist with the same GitHub account. | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: customer | |
version: v1 | |
name: customer | |
spec: | |
replicas: 1 | |
selector: |