Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
whs committed Jan 12, 2019
0 parents commit 754b3cb
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
jobs:
build:
machine: true
steps:
- checkout
- run: docker build -t whshk/nifi-frontend .
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: docker push whshk/nifi-frontend

4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nifi.yaml
nifi-service.yaml

frontend.yaml
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM gcr.io/google-samples/hello-frontend:1.0

COPY frontend.conf /etc/nginx/conf.d/frontend.conf
11 changes: 11 additions & 0 deletions frontend.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
upstream nifi {
server nifi;
}

server {
listen 8080;

location / {
proxy_pass http://nifi:8080;
}
}
38 changes: 38 additions & 0 deletions frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: v1
kind: Service
metadata:
name: nifi-frontend
spec:
selector:
app: nifi
tier: frontend
ports:
- protocol: "TCP"
port: 8080
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nifi-frontend
spec:
selector:
matchLabels:
app: nifi
tier: frontend
track: stable
replicas: 1
template:
metadata:
labels:
app: nifi
tier: frontend
track: stable
spec:
containers:
- name: nginx
image: "whshk/nifi-frontend:latest"
lifecycle:
preStop:
exec:
command: ["/usr/sbin/nginx","-s","quit"]
12 changes: 12 additions & 0 deletions nifi-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: Service
apiVersion: v1
metadata:
name: nifi
spec:
selector:
app: nifi
tier: backend
ports:
- protocol: TCP
port: 8080
targetPort: http
25 changes: 25 additions & 0 deletions nifi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nifi
spec:
selector:
matchLabels:
app: nifi
tier: backend
track: stable
replicas: 1
template:
metadata:
labels:
app: nifi
tier: backend
track: stable
spec:
containers:
- name: nifi
image: apache/nifi:latest
ports:
- name: http
containerPort: 8080

0 comments on commit 754b3cb

Please sign in to comment.