This file contains hidden or 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
1) create a file squid.conf | |
``` | |
acl denydomain dstdomain .bbc.com | |
http_access deny denydomain | |
acl allowdomain dstdomain .yahoo.com | |
http_access allow allowdomain | |
http_access deny all |
This file contains hidden or 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 node:8.9.1 AS build-env-node | |
ADD . /user_code | |
WORKDIR /user_code | |
RUN npm install --save local_modules/execer | |
FROM microsoft/dotnet:2.0.0-sdk AS build-env-dotnet | |
ADD . /user_code | |
WORKDIR /user_code | |
RUN mkdir -p /user_code/lib && \ | |
for i in `dpkg -L libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu57 liblttng-ust0 libssl1.0.2 libstdc++6 libunwind8 libuuid1 zlib1g | egrep "^/usr/lib/x86_64-linux-gnu/.*\.so\."`; do cp $i /user_code/lib; done | |
FROM gcr.io/distroless/dotnet |
This file contains hidden or 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
.UseKestrel(options => | |
{ | |
try | |
{ | |
for (int i = 0; i < args.Length; i++) | |
{ | |
string value = args[i]; | |
if (value == "--fds") | |
{ | |
var fds = args[i+1].Split(",")[0]; |
This file contains hidden or 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
const char bin[] = "./bin/mainapp"; | |
char *envp[] = | |
{ | |
"LD_LIBRARY_PATH=/user_code/lib:$LD_LIBRARY_PATH", | |
NULL | |
}; | |
execve(bin, const_cast<char* const*>(&args[0]), envp); |
This file contains hidden or 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
gcloud container clusters create cluster-1 \ | |
--zone us-central1-a --enable-kubernetes-alpha \ | |
--num-nodes 3 --scopes \ | |
"https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/trace.append","https://www.googleapis.com/auth/userinfo.email" \ | |
--enable-cloud-logging --enable-cloud-monitoring |
This file contains hidden or 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
wget https://github.com/istio/istio/releases/download/0.3.0/istio-0.3.0-linux.tar.gz | |
cd istio-0.3.0/ | |
kubectl create -f install/kubernetes/istio.yaml | |
kubectl create -f install/kubernetes/istio-initializer.yaml | |
kubectl create -f install/kubernetes/addons/prometheus.yaml | |
kubectl create -f install/kubernetes/addons/grafana.yaml | |
kubectl create -f install/kubernetes/addons/servicegraph.yaml | |
kubectl create -f install/kubernetes/addons/zipkin.yaml |
This file contains hidden or 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
$ kubectl get no,po,deployments,svc -n istio-system | |
NAME STATUS ROLES AGE VERSION | |
no/gke-cluster-1-default-pool-94718a04-6w2f Ready <none> 1h v1.7.11-gke.1 | |
no/gke-cluster-1-default-pool-94718a04-cphx Ready <none> 1h v1.7.11-gke.1 | |
no/gke-cluster-1-default-pool-94718a04-lrb5 Ready <none> 1h v1.7.11-gke.1 | |
NAME READY STATUS RESTARTS AGE | |
po/grafana-2369932619-dkwbc 1/1 Running 0 2m | |
po/istio-ca-191975193-dstl3 1/1 Running 0 2m | |
po/istio-ingress-3924138486-hfkx4 1/1 Running 0 2m | |
po/istio-initializer-2169589188-zj6mx 1/1 Running 0 2m |
This file contains hidden or 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
kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 | |
kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=servicegraph -o jsonpath='{.items[0].metadata.name}') 8088:8088 | |
kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=zipkin -o jsonpath='{.items[0].metadata.name}') 9411:9411 |
This file contains hidden or 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
$ kubectl create -f all-istio.yaml | |
$ kubectl get po,deployments,svc,ing | |
NAME READY STATUS RESTARTS AGE | |
po/be-v1-16151855-56kcg 2/2 Running 0 1m | |
po/myapp-v1-2518991625-g66kn 2/2 Running 0 1m | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
deploy/be-v1 1 1 1 1 1m | |
deploy/be-v2 0 0 0 0 1m | |
deploy/myapp-v1 1 1 1 1 1m |
This file contains hidden or 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
- containerPort: 8080 | |
livenessProbe: | |
httpGet: | |
path: /_ah/health | |
port: 8080 | |
initialDelaySeconds: 30 | |
timeoutSeconds: 1 |