Skip to content

Instantly share code, notes, and snippets.

FROM php:7.3-apache
COPY html /usr/src/app/html
WORKDIR /usr/src/app/html
EXPOSE 8080
CMD php -S 0.0.0.0:8080
@vamsijakkula
vamsijakkula / knative.yml
Created June 19, 2020 16:03
knative.yml
cat <<-EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
 name: knative-serving
 - -
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
 name: knative-serving
@vamsijakkula
vamsijakkula / serverless.yml
Created June 13, 2020 15:08
serverless.yml
service: helloworld
app: helloworld-app
org: krishnavamsi
provider:
name: aws
runtime: python3.8
profile: serverless-admin
region: us-east-1
@vamsijakkula
vamsijakkula / handler.py
Created June 13, 2020 15:06
handler.py
import json
def hello(event, context):
print("Go Serverless Your function executed successfully!")
return "Hello World !"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-blue-whale
spec:
replicas: 3
selector:
matchLabels:
app: hello-whale-app
@vamsijakkula
vamsijakkula / hellowhale.yml
Created June 11, 2020 08:54
hellowhale.yml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-blue-whale
spec:
replicas: 3
selector:
matchLabels:
app: hello-whale-app
pipeline {
agent any
stages {
stage('Checkout Source') {
steps {
git url:'https://github.com/vamsijakkula/hellowhale.git', branch:'master'
}
apiVersion: v1
kind: Service
metadata:
name: hello-blue-whale-svc
labels:
app: hello-blue-whale-app
spec:
selector:
app: hello-blue-whale-app
type: LoadBalancer
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-blue-whale
spec:
replicas: 1
selector:
matchLabels:
app: hello-blue-whale-app
template:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/canary: "true"
nginx.ingress.kubernetes.io/canary-weight: "20"
name: green-ingress
spec:
rules:
- host: hello.whale