Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New branch #1

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
af1aa01
Merge remote-tracking branch 'kenzanmedia/master'
Nov 13, 2015
386bff9
Merge remote-tracking branch 'kenzanlabs/master'
Nov 16, 2015
d71ce5e
Merge remote-tracking branch 'kenzanlabs/master'
Nov 16, 2015
cfe1d82
Merge remote-tracking branch 'kenzanlabs/master'
Nov 16, 2015
f378bb9
- Changing build to be java 7 compatible
Nov 17, 2015
05b2e17
Merge pull request #6 from dstengle/java-7-build
skorten Nov 17, 2015
c62578a
Merge remote-tracking branch 'kenzanlabs/master'
Nov 25, 2015
39fc02c
update gradle to 2.9
Nov 25, 2015
829596a
Merge pull request #8 from rohitagarwal01/update_gradle_version
dpeterka Nov 25, 2015
ee561a7
refactor app to add index route with instance id and styling
moondev Dec 28, 2015
acc5a30
Merge pull request #10 from moondev/cdm-refactor
skorten Dec 28, 2015
8aea195
add gce meta-data endpoint
moondev Jan 12, 2016
aefc370
Merge pull request #11 from moondev/gce-id
skorten Jan 12, 2016
fc7c4d4
print value of $USERDATA on index route
Apr 8, 2016
6a14d05
Merge pull request #12 from moondev/userdata
skorten Apr 11, 2016
c9b782d
add a dockerfile
nparks-kenzan Jul 26, 2017
f976c9d
add new line
nparks-kenzan Jul 26, 2017
f96ef24
Merge pull request #16 from kenzanlabs/feature/docker
skorten Jul 26, 2017
e210419
step this container up from alpine to have the process run as a user
nparks-kenzan Aug 1, 2017
6725525
first stab of cloud build yaml file
nparks-kenzan Aug 1, 2017
0127627
wrong format for images list
nparks-kenzan Aug 1, 2017
3ec6cbd
keep fork up to branch
nparks-kenzan Aug 1, 2017
212d5cb
double down on newline
nparks-kenzan Aug 1, 2017
6206fcb
Merge pull request #17 from nparks-kenzan/feature/gcp_container_builder
skorten Aug 2, 2017
d40c1f8
Add Helm Chart for training Lesson Purposes (#19)
nparks-kenzan Feb 20, 2019
a9c155f
Update README.md
agunukula Jul 29, 2019
2af09e4
Update README.md
agunukula Jul 29, 2019
5a42b1e
testing the changes
Jul 29, 2019
5293329
adding a new file
Jul 29, 2019
e49545b
adding new changes
agunukula Jul 30, 2019
40751c4
removing the file
agunukula Jul 30, 2019
718be69
adding a new file in the branch
agunukula Jul 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.settings/
bin/
build/
*.tgz
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM openjdk:8-jre
RUN useradd --home-dir /home/hkr --create-home -U hkr
USER hkr
RUN cd /home/hkr/; mkdir -p .hkr
ADD build/libs/hello-karyon-rxnetty-all-0.1.0.jar /home/hkr/h-k-rx-all.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/home/hkr/h-k-rx-all.jar"]

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
./gradlew clean fatJar
java -jar build/libs/hello-karyon-rxnetty-all-0.1.0.jar
```
# Modified today
July-31-2019
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ apply plugin: 'eclipse'
apply plugin: "com.github.hierynomus.license"
apply plugin: 'nebula.ospackage-base'

sourceCompatibility = 1.8
sourceCompatibility = 1.7

task wrapper(type: Wrapper) {
gradleVersion = '2.8'
gradleVersion = '2.9'
}

repositories {
Expand Down
9 changes: 9 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

steps:
- name: 'gcr.io/cloud-builders/java/gradle'
args: ['fatJar']
- name: 'gcr.io/cloud-builders/docker'
args: ["build", "-t", "gcr.io/$PROJECT_ID/hello-karyon-rxnetty:$REVISION_ID", "-t", "gcr.io/$PROJECT_ID/hello-karyon-rxnetty:latest", "-f", "Dockerfile", "."]
images:
- 'gcr.io/$PROJECT_ID/hello-karyon-rxnetty:$REVISION_ID'
- 'gcr.io/$PROJECT_ID/hello-karyon-rxnetty:latest'
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
21 changes: 21 additions & 0 deletions hellokenzan/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
5 changes: 5 additions & 0 deletions hellokenzan/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: Hello Kenzan
name: hellokenzan
version: 0.1.0
19 changes: 19 additions & 0 deletions hellokenzan/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "chart.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "chart.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "chart.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "chart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
32 changes: 32 additions & 0 deletions hellokenzan/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "chart.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "chart.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "chart.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
12 changes: 12 additions & 0 deletions hellokenzan/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "chart.fullname" . }}
namespace: {{ .Release.Namespace}}
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
helm.sh/chart: {{ include "chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
USERDATA: "{{ .Values.configmapdata.userdata }}"
55 changes: 55 additions & 0 deletions hellokenzan/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apps/v1beta2
kind: ReplicaSet
metadata:
name: {{ include "chart.fullname" . }}
namespace: {{ .Release.Namespace}}
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
helm.sh/chart: {{ include "chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "chart.fullname" . }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
39 changes: 39 additions & 0 deletions hellokenzan/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "chart.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace}}
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
helm.sh/chart: {{ include "chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}
20 changes: 20 additions & 0 deletions hellokenzan/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "chart.fullname" . }}
namespace: {{ .Release.Namespace}}
labels:
app.kubernetes.io/name: {{ include "chart.name" . }}
helm.sh/chart: {{ include "chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: {{ include "chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
52 changes: 52 additions & 0 deletions hellokenzan/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Default values for chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: nparkskenzan/hellokenzan
tag: mstr
pullPolicy: IfNotPresent

nameOverride: ""
fullnameOverride: ""


configmapdata:
userdata: "Some random value"

service:
type: NodePort
port: 80

ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}
1 change: 1 addition & 0 deletions new_file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is a new file in the branch
2 changes: 2 additions & 0 deletions src/main/java/com/kenzan/karyon/rxnetty/ExampleRouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import com.kenzan.karyon.rxnetty.health.HealthCheck;
import com.kenzan.karyon.rxnetty.resource.HelloResource;
import com.kenzan.karyon.rxnetty.resource.IndexResource;


public class ExampleRouter implements RequestHandler<ByteBuf, ByteBuf>{
Expand All @@ -36,6 +37,7 @@ public ExampleRouter() {
HealthCheck healthCheckHandler = new HealthCheck();

delegate
.addUri("", new IndexResource())
.addUri("/hello/*", new HelloResource())
.addUri("/healthcheck", new HealthCheckEndpoint(healthCheckHandler));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public HelloResource() {
.addUri("/hello", new RequestHandler<ByteBuf, ByteBuf>() {
@Override
public Observable<Void> handle(HttpServerRequest<ByteBuf> request,
HttpServerResponse<ByteBuf> response) {
final HttpServerResponse<ByteBuf> response) {

return endpoint.getHello()
.flatMap(new Func1<String, Observable<Void>>() {
Expand All @@ -53,7 +53,7 @@ public Observable<Void> call(String body) {
.addUriRegex("/hello/(.*)", new RequestHandler<ByteBuf, ByteBuf>() {
@Override
public Observable<Void> handle(HttpServerRequest<ByteBuf> request,
HttpServerResponse<ByteBuf> response) {
final HttpServerResponse<ByteBuf> response) {

return endpoint.getHelloName(request)
.flatMap(new Func1<String, Observable<Void>>() {
Expand Down
Loading