From 1f44731975d5a90d546bf5f4008f26920910ab8c Mon Sep 17 00:00:00 2001 From: Michael O'Brien Date: Sun, 28 Jan 2018 22:40:06 -0500 Subject: log RI kubernetes and docker devops initial demo docker and kubernetes infra Change-Id: I5daf744ee8f4ab9b824576209fd61dec0f41a5c2 Issue-ID: LOG-137 Signed-off-by: Michael O'Brien --- reference/.classpath | 5 +-- reference/logging-demo/pom.xml | 21 ++--------- reference/logging-docker-root/.project | 17 +++++++++ .../logging-docker-demo/DockerFile | 2 + .../logging-docker-demo/build.sh | 8 ++++ reference/logging-docker-root/pom.xml | 12 ++++++ reference/logging-kubernetes/.project | 17 +++++++++ .../logging-kubernetes/log-mock-demo/Chart.yaml | 4 ++ .../log-mock-demo/templates/all-services.yaml | 14 +++++++ .../templates/log-mock-demo-deployment.yaml | 43 ++++++++++++++++++++++ .../logging-kubernetes/log-mock-demo/values.yaml | 7 ++++ reference/logging-kubernetes/logdemo/Chart.yaml | 4 ++ .../logdemo/templates/all-services.yaml | 14 +++++++ .../templates/log-mock-demo-deployment.yaml | 43 ++++++++++++++++++++++ reference/logging-kubernetes/logdemo/values.yaml | 7 ++++ reference/logging-kubernetes/pom.xml | 12 ++++++ reference/logging-library/pom.xml | 4 +- reference/logging-mock-service/pom.xml | 9 ++--- reference/pom.xml | 17 +++------ 19 files changed, 219 insertions(+), 41 deletions(-) create mode 100644 reference/logging-docker-root/.project create mode 100644 reference/logging-docker-root/logging-docker-demo/DockerFile create mode 100755 reference/logging-docker-root/logging-docker-demo/build.sh create mode 100644 reference/logging-docker-root/pom.xml create mode 100644 reference/logging-kubernetes/.project create mode 100644 reference/logging-kubernetes/log-mock-demo/Chart.yaml create mode 100644 reference/logging-kubernetes/log-mock-demo/templates/all-services.yaml create mode 100644 reference/logging-kubernetes/log-mock-demo/templates/log-mock-demo-deployment.yaml create mode 100644 reference/logging-kubernetes/log-mock-demo/values.yaml create mode 100644 reference/logging-kubernetes/logdemo/Chart.yaml create mode 100644 reference/logging-kubernetes/logdemo/templates/all-services.yaml create mode 100644 reference/logging-kubernetes/logdemo/templates/log-mock-demo-deployment.yaml create mode 100644 reference/logging-kubernetes/logdemo/values.yaml create mode 100644 reference/logging-kubernetes/pom.xml (limited to 'reference') diff --git a/reference/.classpath b/reference/.classpath index e6312a8..1767a9d 100644 --- a/reference/.classpath +++ b/reference/.classpath @@ -1,9 +1,6 @@ - - - - + diff --git a/reference/logging-demo/pom.xml b/reference/logging-demo/pom.xml index da22ff8..a695970 100644 --- a/reference/logging-demo/pom.xml +++ b/reference/logging-demo/pom.xml @@ -1,16 +1,13 @@ 4.0.0 - org.onap.logging + org.onap.logging-analytics logging-reference 1.2.0-SNAPSHOT - logging-demo war - logging-demo - 2.5.1 4.3.6.RELEASE @@ -72,12 +69,12 @@ - org.onap.logging + org.onap.logging-analytics logging-library 1.2.0-SNAPSHOT - org.onap.logging + org.onap.logging-analytics logging-mock-service 1.2.0-SNAPSHOT @@ -255,16 +252,6 @@ org.springframework spring-webmvc ${spring.version} - - - + diff --git a/reference/logging-docker-root/.project b/reference/logging-docker-root/.project new file mode 100644 index 0000000..f1679d2 --- /dev/null +++ b/reference/logging-docker-root/.project @@ -0,0 +1,17 @@ + + + logging-docker-root + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/reference/logging-docker-root/logging-docker-demo/DockerFile b/reference/logging-docker-root/logging-docker-demo/DockerFile new file mode 100644 index 0000000..b3d68f0 --- /dev/null +++ b/reference/logging-docker-root/logging-docker-demo/DockerFile @@ -0,0 +1,2 @@ +FROM tomcat:8.0.48-jre8 +COPY target/logging-demo-1.2.0-SNAPSHOT.war /usr/local/tomcat/webapps/logging-demo.war diff --git a/reference/logging-docker-root/logging-docker-demo/build.sh b/reference/logging-docker-root/logging-docker-demo/build.sh new file mode 100755 index 0000000..d2e0ea2 --- /dev/null +++ b/reference/logging-docker-root/logging-docker-demo/build.sh @@ -0,0 +1,8 @@ +mkdir target +cp ../../logging-demo/target/*.war target +docker build -t oomk8s/logging-demo-nbi -f DockerFile . +docker images | grep logging-demo-nbi +docker tag oomk8s/logging-demo-nbi oomk8s/logging-demo-nbi:0.0.1 +docker login +docker push oomk8s/logging-demo-nbi:0.0.1 +#docker run -d -it --rm -p 8888:8080 oomk8s/logging-demo-nbi:latest diff --git a/reference/logging-docker-root/pom.xml b/reference/logging-docker-root/pom.xml new file mode 100644 index 0000000..771856e --- /dev/null +++ b/reference/logging-docker-root/pom.xml @@ -0,0 +1,12 @@ + + 4.0.0 + + org.onap.logging-analytics + logging-reference + 1.2.0-SNAPSHOT + + logging-docker-root + pom + logging-docker-root + diff --git a/reference/logging-kubernetes/.project b/reference/logging-kubernetes/.project new file mode 100644 index 0000000..a7ec855 --- /dev/null +++ b/reference/logging-kubernetes/.project @@ -0,0 +1,17 @@ + + + logging-kubernetes + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/reference/logging-kubernetes/log-mock-demo/Chart.yaml b/reference/logging-kubernetes/log-mock-demo/Chart.yaml new file mode 100644 index 0000000..9c45fce --- /dev/null +++ b/reference/logging-kubernetes/log-mock-demo/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: logdemo +version: 0.1.0 diff --git a/reference/logging-kubernetes/log-mock-demo/templates/all-services.yaml b/reference/logging-kubernetes/log-mock-demo/templates/all-services.yaml new file mode 100644 index 0000000..9e4f694 --- /dev/null +++ b/reference/logging-kubernetes/log-mock-demo/templates/all-services.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: logdemo + name: logdemo + namespace: "{{ .Values.nsPrefix }}-logdemo" +spec: + ports: + - port: 8080 + nodePort: {{ .Values.nodePortPrefix }}99 + selector: + app: logdemo + type: NodePort diff --git a/reference/logging-kubernetes/log-mock-demo/templates/log-mock-demo-deployment.yaml b/reference/logging-kubernetes/log-mock-demo/templates/log-mock-demo-deployment.yaml new file mode 100644 index 0000000..afd513e --- /dev/null +++ b/reference/logging-kubernetes/log-mock-demo/templates/log-mock-demo-deployment.yaml @@ -0,0 +1,43 @@ +#{{ if not .Values.disableLogdemoLogdemo }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: logdemo + namespace: "{{ .Values.nsPrefix }}-logdemo" +spec: + selector: + matchLabels: + app: logdemo + template: + metadata: + labels: + app: logdemo + name: logdemo + spec: + containers: + - image: {{ .Values.image.logdemo }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: logdemo + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: logdemo-eteshare + mountPath: /share + ports: + - containerPort: 8080 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: logdemo-eteshare + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logdemo/eteshare + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/reference/logging-kubernetes/log-mock-demo/values.yaml b/reference/logging-kubernetes/log-mock-demo/values.yaml new file mode 100644 index 0000000..6d1adf7 --- /dev/null +++ b/reference/logging-kubernetes/log-mock-demo/values.yaml @@ -0,0 +1,7 @@ +nsPrefix: onap +pullPolicy: Always +nodePortPrefix: 302 +image: + readiness: oomk8s/readiness-check:1.0.0 + logdemo: obrienlabs/logging-demo-nbi:0.0.1 + filebeat: docker.elastic.co/beats/filebeat:5.5.0 diff --git a/reference/logging-kubernetes/logdemo/Chart.yaml b/reference/logging-kubernetes/logdemo/Chart.yaml new file mode 100644 index 0000000..9c45fce --- /dev/null +++ b/reference/logging-kubernetes/logdemo/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: logdemo +version: 0.1.0 diff --git a/reference/logging-kubernetes/logdemo/templates/all-services.yaml b/reference/logging-kubernetes/logdemo/templates/all-services.yaml new file mode 100644 index 0000000..9e4f694 --- /dev/null +++ b/reference/logging-kubernetes/logdemo/templates/all-services.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: logdemo + name: logdemo + namespace: "{{ .Values.nsPrefix }}-logdemo" +spec: + ports: + - port: 8080 + nodePort: {{ .Values.nodePortPrefix }}99 + selector: + app: logdemo + type: NodePort diff --git a/reference/logging-kubernetes/logdemo/templates/log-mock-demo-deployment.yaml b/reference/logging-kubernetes/logdemo/templates/log-mock-demo-deployment.yaml new file mode 100644 index 0000000..afd513e --- /dev/null +++ b/reference/logging-kubernetes/logdemo/templates/log-mock-demo-deployment.yaml @@ -0,0 +1,43 @@ +#{{ if not .Values.disableLogdemoLogdemo }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: logdemo + namespace: "{{ .Values.nsPrefix }}-logdemo" +spec: + selector: + matchLabels: + app: logdemo + template: + metadata: + labels: + app: logdemo + name: logdemo + spec: + containers: + - image: {{ .Values.image.logdemo }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: logdemo + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: logdemo-eteshare + mountPath: /share + ports: + - containerPort: 8080 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: logdemo-eteshare + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logdemo/eteshare + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/reference/logging-kubernetes/logdemo/values.yaml b/reference/logging-kubernetes/logdemo/values.yaml new file mode 100644 index 0000000..53e3fc6 --- /dev/null +++ b/reference/logging-kubernetes/logdemo/values.yaml @@ -0,0 +1,7 @@ +nsPrefix: onap +pullPolicy: Always +nodePortPrefix: 302 +image: + readiness: oomk8s/readiness-check:1.0.0 + logdemo: oomk8s/logging-demo-nbi:0.0.1 + filebeat: docker.elastic.co/beats/filebeat:5.5.0 diff --git a/reference/logging-kubernetes/pom.xml b/reference/logging-kubernetes/pom.xml new file mode 100644 index 0000000..6f32c54 --- /dev/null +++ b/reference/logging-kubernetes/pom.xml @@ -0,0 +1,12 @@ + + 4.0.0 + + org.onap.logging-analytics + logging-reference + 1.2.0-SNAPSHOT + + logging-kubernetes + pom + logging-kubernetes + diff --git a/reference/logging-library/pom.xml b/reference/logging-library/pom.xml index 2bd9f6d..74e3a7c 100644 --- a/reference/logging-library/pom.xml +++ b/reference/logging-library/pom.xml @@ -1,16 +1,14 @@ 4.0.0 - org.onap.logging + org.onap.logging-analytics logging-reference 1.2.0-SNAPSHOT logging-library jar - 1.2.0-SNAPSHOT logging-library - diff --git a/reference/logging-mock-service/pom.xml b/reference/logging-mock-service/pom.xml index 79f68af..7777b5a 100644 --- a/reference/logging-mock-service/pom.xml +++ b/reference/logging-mock-service/pom.xml @@ -1,16 +1,13 @@ 4.0.0 - org.onap.logging + org.onap.logging-analytics logging-reference 1.2.0-SNAPSHOT - logging-mock-service jar - 1.2.0-SNAPSHOT - logging-mock-service - + logging-mock-service @@ -63,7 +60,7 @@ - org.onap.logging + org.onap.logging-analytics logging-library 1.2.0-SNAPSHOT diff --git a/reference/pom.xml b/reference/pom.xml index a52ff5f..b3f99ba 100644 --- a/reference/pom.xml +++ b/reference/pom.xml @@ -2,25 +2,20 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.onap.oparent - oparent - 1.1.0-SNAPSHOT + org.onap.logging-analytics + logging-analytics + 1.2.0-SNAPSHOT - - org.onap.logging logging-reference pom - 1.2.0-SNAPSHOT logging-reference - - http://maven.apache.org - + http://maven.apache.org logging-demo logging-library logging-mock-service - + logging-docker-root + logging-kubernetes -- cgit 1.2.3-korg