From abea03b2ab2852fdcbb72ad68a065ea4efd2d19d Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 24 Jul 2019 19:25:52 +0000 Subject: [PATCH 01/62] push bg image fix --- views/index.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.ejs b/views/index.ejs index 50e3811..86c2f9c 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -3,7 +3,7 @@ Arctiq Weather - + From 9d8af001f229dd775a2a3b5e4bf0d716554c5111 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 24 Jul 2019 15:37:15 -0400 Subject: [PATCH 02/62] revert css --- views/index.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.ejs b/views/index.ejs index 86c2f9c..50e3811 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -3,7 +3,7 @@ Arctiq Weather - + From 8e5da413d6408095647006d1bdf17344992e190d Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 3 Sep 2019 13:44:09 -0400 Subject: [PATCH 03/62] add openshift template --- openshift/weather-app-dc-template.yaml | 26 +++++++++++++++++++++++ openshift/weather-app-route-template.yaml | 12 +++++++++++ openshift/weather-app-svc-template.yaml | 16 ++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 openshift/weather-app-dc-template.yaml create mode 100644 openshift/weather-app-route-template.yaml create mode 100644 openshift/weather-app-svc-template.yaml diff --git a/openshift/weather-app-dc-template.yaml b/openshift/weather-app-dc-template.yaml new file mode 100644 index 0000000..bc211da --- /dev/null +++ b/openshift/weather-app-dc-template.yaml @@ -0,0 +1,26 @@ +apiVersion: apps.openshift.io/v1 +kind: DeploymentConfig +metadata: + annotations: + app: weather + name: weather +spec: + replicas: 1 + selector: + app: weather + deploymentconfig: weather + strategy: + type: Rolling + template: + metadata: + labels: + app: weather + deploymentconfig: weather + spec: + containers: + - image: docker.io/daniyalj/weather:latest + imagePullPolicy: Always + name: weather + ports: + - containerPort: 8080 + protocol: TCP diff --git a/openshift/weather-app-route-template.yaml b/openshift/weather-app-route-template.yaml new file mode 100644 index 0000000..fdc621d --- /dev/null +++ b/openshift/weather-app-route-template.yaml @@ -0,0 +1,12 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: weather + name: weather-app +spec: + port: + targetPort: 8080-tcp + to: + kind: Service + name: weather diff --git a/openshift/weather-app-svc-template.yaml b/openshift/weather-app-svc-template.yaml new file mode 100644 index 0000000..af98798 --- /dev/null +++ b/openshift/weather-app-svc-template.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + labels: + app: weather + name: weather +spec: + ports: + - name: 8080-tcp + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + deploymentconfig: weather + type: ClusterIP From 95b5d5faf0c7d7e95196c3ecdd51a3d07b3db50b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Tue, 12 Nov 2019 16:14:19 -0800 Subject: [PATCH 04/62] Create deployment.yaml --- kubernetes/deployment.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 kubernetes/deployment.yaml diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml new file mode 100644 index 0000000..0f42c9e --- /dev/null +++ b/kubernetes/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: weather +spec: + selector: + matchLabels: + app: weather + replicas: 1 + template: + metadata: + labels: + app: weather + spec: + containers: + - name: weather + image: docker.io/daniyalj/weather:latest + ports: + - containerPort: 8080 From c194b62b3dd3bf57fc1c6021186792447378a72f Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:31:20 -0800 Subject: [PATCH 05/62] Create build-task.yaml --- kubernetes/tekton/build-task.yaml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 kubernetes/tekton/build-task.yaml diff --git a/kubernetes/tekton/build-task.yaml b/kubernetes/tekton/build-task.yaml new file mode 100644 index 0000000..e889256 --- /dev/null +++ b/kubernetes/tekton/build-task.yaml @@ -0,0 +1,37 @@ +apiVersion: tekton.dev/v1alpha1 +kind: Task +metadata: + name: build-docker-image-from-git-source +spec: + inputs: + resources: + - name: docker-source + type: git + params: + - name: pathToDockerFile + type: string + description: The path to the dockerfile to build + default: /workspace/docker-source/Dockerfile + - name: pathToContext + type: string + description: + The build context used by Kaniko + (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts) + default: /workspace/docker-source + outputs: + resources: + - name: builtImage + type: image + steps: + - name: build-and-push + image: gcr.io/kaniko-project/executor:v0.13.0 + # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential + env: + - name: "DOCKER_CONFIG" + value: "/builder/home/.docker/" + command: + - /kaniko/executor + args: + - --dockerfile=$(inputs.params.pathToDockerFile) + - --destination=$(outputs.resources.builtImage.url) + - --context=$(inputs.params.pathToContext) From e886f71234dc1d60130ba77d0165621a9afc3c6b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:32:44 -0800 Subject: [PATCH 06/62] Create deploy-task.yaml --- kubernetes/tekton/deploy-task.yaml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 kubernetes/tekton/deploy-task.yaml diff --git a/kubernetes/tekton/deploy-task.yaml b/kubernetes/tekton/deploy-task.yaml new file mode 100644 index 0000000..19f2adc --- /dev/null +++ b/kubernetes/tekton/deploy-task.yaml @@ -0,0 +1,36 @@ +apiVersion: tekton.dev/v1alpha1 +kind: Task +metadata: + name: deploy-using-kubectl +spec: + inputs: + resources: + - name: source + type: git + - name: image + type: image + params: + - name: path + type: string + description: Path to the manifest to apply + - name: yamlPathToImage + type: string + description: + The path to the image to replace in the yaml manifest (arg to yq) + steps: + - name: replace-image + image: mikefarah/yq + command: ["yq"] + args: + - "w" + - "-i" + - "$(inputs.params.path)" + - "$(inputs.params.yamlPathToImage)" + - "$(inputs.resources.image.url)" + - name: run-kubectl + image: lachlanevenson/k8s-kubectl + command: ["kubectl"] + args: + - "apply" + - "-f" + - "$(inputs.params.path)" From 09ef99d5754fb32f5303bdead72b22672d8fac23 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:33:59 -0800 Subject: [PATCH 07/62] Create pipeline-run.yaml --- kubernetes/tekton/pipeline-run.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 kubernetes/tekton/pipeline-run.yaml diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml new file mode 100644 index 0000000..f6a09b1 --- /dev/null +++ b/kubernetes/tekton/pipeline-run.yaml @@ -0,0 +1,23 @@ +apiVersion: tekton.dev/v1alpha1 +kind: PipelineRun +metadata: + name: weather-pipeline-run +spec: + serviceAccountName: weather-svc + pipelineRef: + name: weather-pipeline + resources: + - name: source-repo + resourceSpec: + type: git + params: + - name: revision + value: static + - name: url + value: https://github.com/ArctiqTeam/weather-app.git + - name: weather-image + resourceSpec: + type: image + params: + - name: url + value: gcr.io/iceberg-234522/weather:mountain From 583926119a84e8fd6b95eaa5240218d780168ac6 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:42:21 -0800 Subject: [PATCH 08/62] Update style.css --- public/css/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/css/style.css b/public/css/style.css index b7f796e..d96c964 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -8,6 +8,7 @@ body { margin: 0 auto; font-family: 'Open Sans', sans-serif; background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_gold.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From d0d917e5276cffd18b7aefcd06f65f9cdd412fc7 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:51:10 -0800 Subject: [PATCH 09/62] Update pipeline-run.yaml --- kubernetes/tekton/pipeline-run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index f6a09b1..b01d4b5 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run + name: weather-pipeline-run-v1 spec: serviceAccountName: weather-svc pipelineRef: From e70c269fe92e13f4e32f0508115963c947e4ef5a Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:52:48 -0800 Subject: [PATCH 10/62] Create pipeline.yaml --- kubernetes/tekton/pipeline.yaml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 kubernetes/tekton/pipeline.yaml diff --git a/kubernetes/tekton/pipeline.yaml b/kubernetes/tekton/pipeline.yaml new file mode 100644 index 0000000..11efa17 --- /dev/null +++ b/kubernetes/tekton/pipeline.yaml @@ -0,0 +1,42 @@ +apiVersion: tekton.dev/v1alpha1 +kind: Pipeline +metadata: + name: weather-pipeline +spec: + resources: + - name: source-repo + type: git + - name: weather-image + type: image + tasks: + - name: build-weather-image + taskRef: + name: build-docker-image-from-git-source + params: + - name: pathToDockerFile + value: Dockerfile + - name: pathToContext + value: /workspace/docker-source/ + resources: + inputs: + - name: docker-source + resource: source-repo + outputs: + - name: builtImage + resource: weather-image + - name: deploy-weather + taskRef: + name: deploy-using-kubectl + resources: + inputs: + - name: source + resource: source-repo + - name: image + resource: weather-image + from: + - build-weather-image + params: + - name: path + value: /workspace/source/kubernetes/deployment.yaml #configure: may change according to your source + - name: yamlPathToImage + value: "spec.template.spec.containers[0].image" From 6b56478613acbce2fcec145030fb1c9f9040563a Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 16:53:30 -0800 Subject: [PATCH 11/62] Update pipeline.yaml From 735f30de590ca58002645cfc2ac0847833bf74f1 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 17:00:37 -0800 Subject: [PATCH 12/62] change image to washington --- kubernetes/tekton/pipeline-run.yaml | 2 +- public/css/style.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index b01d4b5..25778d0 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -20,4 +20,4 @@ spec: type: image params: - name: url - value: gcr.io/iceberg-234522/weather:mountain + value: gcr.io/iceberg-234522/weather:washington diff --git a/public/css/style.css b/public/css/style.css index d96c964..545bcd0 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_gold.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_gold.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 2101abe57739cabc662084ed8745a6c8d19c3552 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 17:01:15 -0800 Subject: [PATCH 13/62] change to v2 --- kubernetes/tekton/pipeline-run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 25778d0..5a4c6c1 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v1 + name: weather-pipeline-run-v2 spec: serviceAccountName: weather-svc pipelineRef: From 86fae2acd4b7c6e68ac0e13e05a8506649c8a69a Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 17:14:17 -0800 Subject: [PATCH 14/62] replace image to blue --- kubernetes/tekton/pipeline-run.yaml | 2 +- public/css/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 5a4c6c1..286f8d4 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v2 + name: weather-pipeline-run-v3 spec: serviceAccountName: weather-svc pipelineRef: diff --git a/public/css/style.css b/public/css/style.css index 545bcd0..5885c04 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -8,7 +8,7 @@ body { margin: 0 auto; font-family: 'Open Sans', sans-serif; /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_gold.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From a6a726987904157e9b96ab32a892809f5f6c192e Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 13 Nov 2019 17:18:09 -0800 Subject: [PATCH 15/62] Update pipeline-run.yaml --- kubernetes/tekton/pipeline-run.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 286f8d4..771671b 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v3 + name: weather-pipeline-run-v4 spec: serviceAccountName: weather-svc pipelineRef: @@ -20,4 +20,4 @@ spec: type: image params: - name: url - value: gcr.io/iceberg-234522/weather:washington + value: gcr.io/iceberg-234522/weather:washingtonv4 From f6a2caf5201f9d1385b35f7f22a1d3e43c39b757 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 20:58:32 -0800 Subject: [PATCH 16/62] change back to mountain --- kubernetes/tekton/pipeline-run.yaml | 4 ++-- public/css/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 771671b..145b588 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v4 + generateName: weather-pipeline-run- spec: serviceAccountName: weather-svc pipelineRef: @@ -20,4 +20,4 @@ spec: type: image params: - name: url - value: gcr.io/iceberg-234522/weather:washingtonv4 + value: gcr.io/iceberg-234522/weather:toronto diff --git a/public/css/style.css b/public/css/style.css index 5885c04..371a101 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From bf7f9701aad3b9c2841e7596d9dfffe5a0051ca8 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 21:00:08 -0800 Subject: [PATCH 17/62] change back to name --- kubernetes/tekton/pipeline-run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 145b588..e20973b 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - generateName: weather-pipeline-run- + name: weather-pipeline-run-v5 spec: serviceAccountName: weather-svc pipelineRef: From c0dc8f03466c1d3f063e1b293f5993688901c967 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Wed, 13 Nov 2019 21:02:46 -0800 Subject: [PATCH 18/62] change to washington --- kubernetes/tekton/pipeline-run.yaml | 4 ++-- public/css/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index e20973b..0f73fc0 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v5 + name: weather-pipeline-run-v6 spec: serviceAccountName: weather-svc pipelineRef: @@ -20,4 +20,4 @@ spec: type: image params: - name: url - value: gcr.io/iceberg-234522/weather:toronto + value: gcr.io/iceberg-234522/weather:washington diff --git a/public/css/style.css b/public/css/style.css index 371a101..5885c04 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 36c7cbdee19e4aa76c641d5a6d446c167c6c50d5 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Thu, 14 Nov 2019 12:06:08 -0800 Subject: [PATCH 19/62] Update pipeline-run.yaml --- kubernetes/tekton/pipeline-run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 0f73fc0..7fe2497 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - name: weather-pipeline-run-v6 + generateName: weather-pipeline-run- spec: serviceAccountName: weather-svc pipelineRef: From 7ff8bee165f0eaa65c3c7f3879d4b14b2798fc3a Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 19 Nov 2019 16:35:33 -0500 Subject: [PATCH 20/62] Draft create --- .dockerignore | 5 ++ .helmignore | 27 +++++++++++ OWNERS | 4 ++ OWNERS_ALIASES | 6 +++ charts/preview/Chart.yaml | 5 ++ charts/preview/Makefile | 18 +++++++ charts/preview/requirements.yaml | 16 ++++++ charts/preview/values.yaml | 22 +++++++++ charts/weather-app/.helmignore | 21 ++++++++ charts/weather-app/Chart.yaml | 5 ++ charts/weather-app/Makefile | 48 ++++++++++++++++++ charts/weather-app/README.md | 1 + charts/weather-app/templates/NOTES.txt | 4 ++ charts/weather-app/templates/_helpers.tpl | 16 ++++++ charts/weather-app/templates/deployment.yaml | 51 ++++++++++++++++++++ charts/weather-app/templates/ksvc.yaml | 41 ++++++++++++++++ charts/weather-app/templates/service.yaml | 26 ++++++++++ charts/weather-app/values.yaml | 41 ++++++++++++++++ jenkins-x.yml | 1 + skaffold.yaml | 28 +++++++++++ 20 files changed, 386 insertions(+) create mode 100644 .dockerignore create mode 100644 .helmignore create mode 100644 OWNERS create mode 100644 OWNERS_ALIASES create mode 100644 charts/preview/Chart.yaml create mode 100755 charts/preview/Makefile create mode 100755 charts/preview/requirements.yaml create mode 100755 charts/preview/values.yaml create mode 100755 charts/weather-app/.helmignore create mode 100644 charts/weather-app/Chart.yaml create mode 100755 charts/weather-app/Makefile create mode 100755 charts/weather-app/README.md create mode 100755 charts/weather-app/templates/NOTES.txt create mode 100755 charts/weather-app/templates/_helpers.tpl create mode 100755 charts/weather-app/templates/deployment.yaml create mode 100755 charts/weather-app/templates/ksvc.yaml create mode 100755 charts/weather-app/templates/service.yaml create mode 100755 charts/weather-app/values.yaml create mode 100755 jenkins-x.yml create mode 100644 skaffold.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..762752c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +draft.toml +charts/ +NOTICE +LICENSE +README.md \ No newline at end of file diff --git a/.helmignore b/.helmignore new file mode 100644 index 0000000..747e6e9 --- /dev/null +++ b/.helmignore @@ -0,0 +1,27 @@ +# 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 +*.png + +# known compile time folders +target/ +node_modules/ +vendor/ \ No newline at end of file diff --git a/OWNERS b/OWNERS new file mode 100644 index 0000000..4f1db2c --- /dev/null +++ b/OWNERS @@ -0,0 +1,4 @@ +approvers: +- daniyalj +reviewers: +- daniyalj diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES new file mode 100644 index 0000000..06556e1 --- /dev/null +++ b/OWNERS_ALIASES @@ -0,0 +1,6 @@ +aliases: +- daniyalj +best-approvers: +- daniyalj +best-reviewers: +- daniyalj diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml new file mode 100644 index 0000000..6b68431 --- /dev/null +++ b/charts/preview/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png +name: preview +version: 0.1.0-SNAPSHOT diff --git a/charts/preview/Makefile b/charts/preview/Makefile new file mode 100755 index 0000000..6e57da1 --- /dev/null +++ b/charts/preview/Makefile @@ -0,0 +1,18 @@ +OS := $(shell uname) + +preview: +ifeq ($(OS),Darwin) + sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml + sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml + sed -i "" -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml +else ifeq ($(OS),Linux) + sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml + sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml + sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/arctiqteam\/weather-app|" values.yaml + sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml +else + echo "platfrom $(OS) not supported to release from" + exit -1 +endif + echo " version: $(PREVIEW_VERSION)" >> requirements.yaml + jx step helm build diff --git a/charts/preview/requirements.yaml b/charts/preview/requirements.yaml new file mode 100755 index 0000000..ac2f352 --- /dev/null +++ b/charts/preview/requirements.yaml @@ -0,0 +1,16 @@ +# !! File must end with empty line !! +dependencies: +- alias: expose + name: exposecontroller + repository: http://chartmuseum.jenkins-x.io + version: 2.3.92 +- alias: cleanup + name: exposecontroller + repository: http://chartmuseum.jenkins-x.io + version: 2.3.92 + + # !! "alias: preview" must be last entry in dependencies array !! + # !! Place custom dependencies above !! +- alias: preview + name: weather-app + repository: file://../weather-app diff --git a/charts/preview/values.yaml b/charts/preview/values.yaml new file mode 100755 index 0000000..b53ceaa --- /dev/null +++ b/charts/preview/values.yaml @@ -0,0 +1,22 @@ + +expose: + Annotations: + helm.sh/hook: post-install,post-upgrade + helm.sh/hook-delete-policy: hook-succeeded + config: + exposer: Ingress + http: true + tlsacme: false + +cleanup: + Args: + - --cleanup + Annotations: + helm.sh/hook: pre-delete + helm.sh/hook-delete-policy: hook-succeeded + +preview: + image: + repository: + tag: + pullPolicy: IfNotPresent \ No newline at end of file diff --git a/charts/weather-app/.helmignore b/charts/weather-app/.helmignore new file mode 100755 index 0000000..f0c1319 --- /dev/null +++ b/charts/weather-app/.helmignore @@ -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 diff --git a/charts/weather-app/Chart.yaml b/charts/weather-app/Chart.yaml new file mode 100644 index 0000000..d9a980b --- /dev/null +++ b/charts/weather-app/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/d273e09/images/nodejs.png +name: weather-app +version: 0.1.0-SNAPSHOT diff --git a/charts/weather-app/Makefile b/charts/weather-app/Makefile new file mode 100755 index 0000000..889f145 --- /dev/null +++ b/charts/weather-app/Makefile @@ -0,0 +1,48 @@ +CHART_REPO := http://jenkins-x-chartmuseum:8080 +CURRENT=$(pwd) +NAME := weather-app +OS := $(shell uname) +RELEASE_VERSION := $(shell cat ../../VERSION) + +build: clean + rm -rf requirements.lock + helm dependency build + helm lint + +install: clean build + helm install . --name ${NAME} + +upgrade: clean build + helm upgrade ${NAME} . + +delete: + helm delete --purge ${NAME} + +clean: + rm -rf charts + rm -rf ${NAME}*.tgz + +release: clean + helm dependency build + helm lint + helm init --client-only + helm package . + curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(shell sed -n 's/^version: //p' Chart.yaml).tgz" $(CHART_REPO)/api/charts + rm -rf ${NAME}*.tgz% + +tag: +ifeq ($(OS),Darwin) + sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml + sed -i "" -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml +else ifeq ($(OS),Linux) + sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml + sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/arctiqteam\/weather-app|" values.yaml + sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml +else + echo "platfrom $(OS) not supported to release from" + exit -1 +endif + git add --all + git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed + git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)" + git push origin v$(RELEASE_VERSION) diff --git a/charts/weather-app/README.md b/charts/weather-app/README.md new file mode 100755 index 0000000..83de828 --- /dev/null +++ b/charts/weather-app/README.md @@ -0,0 +1 @@ +# Javascript application \ No newline at end of file diff --git a/charts/weather-app/templates/NOTES.txt b/charts/weather-app/templates/NOTES.txt new file mode 100755 index 0000000..97823be --- /dev/null +++ b/charts/weather-app/templates/NOTES.txt @@ -0,0 +1,4 @@ + +Get the application URL by running these commands: + +kubectl get ingress {{ template "fullname" . }} diff --git a/charts/weather-app/templates/_helpers.tpl b/charts/weather-app/templates/_helpers.tpl new file mode 100755 index 0000000..f0d83d2 --- /dev/null +++ b/charts/weather-app/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "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). +*/}} +{{- define "fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/weather-app/templates/deployment.yaml b/charts/weather-app/templates/deployment.yaml new file mode 100755 index 0000000..2eff0a3 --- /dev/null +++ b/charts/weather-app/templates/deployment.yaml @@ -0,0 +1,51 @@ +{{- if .Values.knativeDeploy }} +{{- else }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "fullname" . }} + labels: + draft: {{ default "draft-app" .Values.draft }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + draft: {{ default "draft-app" .Values.draft }} + app: {{ template "fullname" . }} +{{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: +{{- range $pkey, $pval := .Values.env }} + - name: {{ $pkey }} + value: {{ quote $pval }} +{{- end }} + ports: + - containerPort: {{ .Values.service.internalPort }} + livenessProbe: + httpGet: + path: {{ .Values.probePath }} + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + readinessProbe: + httpGet: + path: {{ .Values.probePath }} + port: {{ .Values.service.internalPort }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + resources: +{{ toYaml .Values.resources | indent 12 }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} +{{- end }} \ No newline at end of file diff --git a/charts/weather-app/templates/ksvc.yaml b/charts/weather-app/templates/ksvc.yaml new file mode 100755 index 0000000..d37fb3f --- /dev/null +++ b/charts/weather-app/templates/ksvc.yaml @@ -0,0 +1,41 @@ +{{- if .Values.knativeDeploy }} +apiVersion: serving.knative.dev/v1alpha1 +kind: Service +metadata: +{{- if .Values.service.name }} + name: {{ .Values.service.name }} +{{- else }} + name: {{ template "fullname" . }} +{{- end }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +spec: + runLatest: + configuration: + revisionTemplate: + spec: + container: + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: +{{- range $pkey, $pval := .Values.env }} + - name: {{ $pkey }} + value: {{ quote $pval }} +{{- end }} + livenessProbe: + httpGet: + path: {{ .Values.probePath }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + readinessProbe: + failureThreshold: {{ .Values.readinessProbe.failureThreshold }} + httpGet: + path: {{ .Values.probePath }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} + successThreshold: {{ .Values.readinessProbe.successThreshold }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + resources: +{{ toYaml .Values.resources | indent 14 }} +{{- end }} diff --git a/charts/weather-app/templates/service.yaml b/charts/weather-app/templates/service.yaml new file mode 100755 index 0000000..9321361 --- /dev/null +++ b/charts/weather-app/templates/service.yaml @@ -0,0 +1,26 @@ +{{- if .Values.knativeDeploy }} +{{- else }} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.service.name }} + name: {{ .Values.service.name }} +{{- else }} + name: {{ template "fullname" . }} +{{- end }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + protocol: TCP + name: http + selector: + app: {{ template "fullname" . }} +{{- end }} diff --git a/charts/weather-app/values.yaml b/charts/weather-app/values.yaml new file mode 100755 index 0000000..c7f9ece --- /dev/null +++ b/charts/weather-app/values.yaml @@ -0,0 +1,41 @@ +# Default values for node projects. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +replicaCount: 1 +image: + repository: draft + tag: dev + pullPolicy: IfNotPresent + +# define environment variables here as a map of key: value +env: + +# enable this flag to use knative serve to deploy the app +knativeDeploy: false + +service: + name: weather-app + type: ClusterIP + externalPort: 80 + internalPort: 8080 + annotations: + fabric8.io/expose: "true" + fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx" +resources: + limits: + cpu: 400m + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi +probePath: / +livenessProbe: + initialDelaySeconds: 60 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 +readinessProbe: + failureThreshold: 1 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 diff --git a/jenkins-x.yml b/jenkins-x.yml new file mode 100755 index 0000000..dd66462 --- /dev/null +++ b/jenkins-x.yml @@ -0,0 +1 @@ +buildPack: javascript diff --git a/skaffold.yaml b/skaffold.yaml new file mode 100644 index 0000000..adce0ab --- /dev/null +++ b/skaffold.yaml @@ -0,0 +1,28 @@ +apiVersion: skaffold/v1beta2 +kind: Config +build: + artifacts: + - image: arctiqteam/weather-app + context: . + docker: {} + tagPolicy: + envTemplate: + template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.VERSION}}' + local: {} +deploy: + kubectl: {} +profiles: +- name: dev + build: + tagPolicy: + envTemplate: + template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.DIGEST_HEX}}' + local: {} + deploy: + helm: + releases: + - name: weather-app + chartPath: charts/weather-app + setValueTemplates: + image.repository: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}' + image.tag: '{{.DIGEST_HEX}}' From 1bfe682a9db5d3974a39b37b123ea063415f10cc Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 19 Nov 2019 16:41:12 -0500 Subject: [PATCH 21/62] Revert "Update pipeline-run.yaml" This reverts commit 36c7cbdee19e4aa76c641d5a6d446c167c6c50d5. --- kubernetes/tekton/pipeline-run.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml index 7fe2497..0f73fc0 100644 --- a/kubernetes/tekton/pipeline-run.yaml +++ b/kubernetes/tekton/pipeline-run.yaml @@ -1,7 +1,7 @@ apiVersion: tekton.dev/v1alpha1 kind: PipelineRun metadata: - generateName: weather-pipeline-run- + name: weather-pipeline-run-v6 spec: serviceAccountName: weather-svc pipelineRef: From 09cf50868b6a03198e5c5312719a29b94c6fae87 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 19 Nov 2019 16:42:49 -0500 Subject: [PATCH 22/62] remove jenkins --- jenkins-x.yml | 1 - skaffold.yaml | 28 ---------------------------- 2 files changed, 29 deletions(-) delete mode 100755 jenkins-x.yml delete mode 100644 skaffold.yaml diff --git a/jenkins-x.yml b/jenkins-x.yml deleted file mode 100755 index dd66462..0000000 --- a/jenkins-x.yml +++ /dev/null @@ -1 +0,0 @@ -buildPack: javascript diff --git a/skaffold.yaml b/skaffold.yaml deleted file mode 100644 index adce0ab..0000000 --- a/skaffold.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: skaffold/v1beta2 -kind: Config -build: - artifacts: - - image: arctiqteam/weather-app - context: . - docker: {} - tagPolicy: - envTemplate: - template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.VERSION}}' - local: {} -deploy: - kubectl: {} -profiles: -- name: dev - build: - tagPolicy: - envTemplate: - template: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}:{{.DIGEST_HEX}}' - local: {} - deploy: - helm: - releases: - - name: weather-app - chartPath: charts/weather-app - setValueTemplates: - image.repository: '{{.DOCKER_REGISTRY}}/{{.IMAGE_NAME}}' - image.tag: '{{.DIGEST_HEX}}' From 556862913715856c38530ad56496d32c74d30161 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Tue, 19 Nov 2019 16:43:02 -0500 Subject: [PATCH 23/62] Delete .helmignore --- .helmignore | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .helmignore diff --git a/.helmignore b/.helmignore deleted file mode 100644 index 747e6e9..0000000 --- a/.helmignore +++ /dev/null @@ -1,27 +0,0 @@ -# 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 -*.png - -# known compile time folders -target/ -node_modules/ -vendor/ \ No newline at end of file From 7136f58afb003ef0f1de64e5026e7c2f55dc1683 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 19 Nov 2019 16:43:32 -0500 Subject: [PATCH 24/62] remove jenkins --- OWNERS | 4 -- OWNERS_ALIASES | 6 --- charts/preview/Chart.yaml | 5 -- charts/preview/Makefile | 18 ------- charts/preview/requirements.yaml | 16 ------ charts/preview/values.yaml | 22 --------- charts/weather-app/.helmignore | 21 -------- charts/weather-app/Chart.yaml | 5 -- charts/weather-app/Makefile | 48 ------------------ charts/weather-app/README.md | 1 - charts/weather-app/templates/NOTES.txt | 4 -- charts/weather-app/templates/_helpers.tpl | 16 ------ charts/weather-app/templates/deployment.yaml | 51 -------------------- charts/weather-app/templates/ksvc.yaml | 41 ---------------- charts/weather-app/templates/service.yaml | 26 ---------- charts/weather-app/values.yaml | 41 ---------------- 16 files changed, 325 deletions(-) delete mode 100644 OWNERS delete mode 100644 OWNERS_ALIASES delete mode 100644 charts/preview/Chart.yaml delete mode 100755 charts/preview/Makefile delete mode 100755 charts/preview/requirements.yaml delete mode 100755 charts/preview/values.yaml delete mode 100755 charts/weather-app/.helmignore delete mode 100644 charts/weather-app/Chart.yaml delete mode 100755 charts/weather-app/Makefile delete mode 100755 charts/weather-app/README.md delete mode 100755 charts/weather-app/templates/NOTES.txt delete mode 100755 charts/weather-app/templates/_helpers.tpl delete mode 100755 charts/weather-app/templates/deployment.yaml delete mode 100755 charts/weather-app/templates/ksvc.yaml delete mode 100755 charts/weather-app/templates/service.yaml delete mode 100755 charts/weather-app/values.yaml diff --git a/OWNERS b/OWNERS deleted file mode 100644 index 4f1db2c..0000000 --- a/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -approvers: -- daniyalj -reviewers: -- daniyalj diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES deleted file mode 100644 index 06556e1..0000000 --- a/OWNERS_ALIASES +++ /dev/null @@ -1,6 +0,0 @@ -aliases: -- daniyalj -best-approvers: -- daniyalj -best-reviewers: -- daniyalj diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml deleted file mode 100644 index 6b68431..0000000 --- a/charts/preview/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Kubernetes -icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png -name: preview -version: 0.1.0-SNAPSHOT diff --git a/charts/preview/Makefile b/charts/preview/Makefile deleted file mode 100755 index 6e57da1..0000000 --- a/charts/preview/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -OS := $(shell uname) - -preview: -ifeq ($(OS),Darwin) - sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml - sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml - sed -i "" -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml -else ifeq ($(OS),Linux) - sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml - sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml - sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/arctiqteam\/weather-app|" values.yaml - sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml -else - echo "platfrom $(OS) not supported to release from" - exit -1 -endif - echo " version: $(PREVIEW_VERSION)" >> requirements.yaml - jx step helm build diff --git a/charts/preview/requirements.yaml b/charts/preview/requirements.yaml deleted file mode 100755 index ac2f352..0000000 --- a/charts/preview/requirements.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# !! File must end with empty line !! -dependencies: -- alias: expose - name: exposecontroller - repository: http://chartmuseum.jenkins-x.io - version: 2.3.92 -- alias: cleanup - name: exposecontroller - repository: http://chartmuseum.jenkins-x.io - version: 2.3.92 - - # !! "alias: preview" must be last entry in dependencies array !! - # !! Place custom dependencies above !! -- alias: preview - name: weather-app - repository: file://../weather-app diff --git a/charts/preview/values.yaml b/charts/preview/values.yaml deleted file mode 100755 index b53ceaa..0000000 --- a/charts/preview/values.yaml +++ /dev/null @@ -1,22 +0,0 @@ - -expose: - Annotations: - helm.sh/hook: post-install,post-upgrade - helm.sh/hook-delete-policy: hook-succeeded - config: - exposer: Ingress - http: true - tlsacme: false - -cleanup: - Args: - - --cleanup - Annotations: - helm.sh/hook: pre-delete - helm.sh/hook-delete-policy: hook-succeeded - -preview: - image: - repository: - tag: - pullPolicy: IfNotPresent \ No newline at end of file diff --git a/charts/weather-app/.helmignore b/charts/weather-app/.helmignore deleted file mode 100755 index f0c1319..0000000 --- a/charts/weather-app/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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 diff --git a/charts/weather-app/Chart.yaml b/charts/weather-app/Chart.yaml deleted file mode 100644 index d9a980b..0000000 --- a/charts/weather-app/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Kubernetes -icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/d273e09/images/nodejs.png -name: weather-app -version: 0.1.0-SNAPSHOT diff --git a/charts/weather-app/Makefile b/charts/weather-app/Makefile deleted file mode 100755 index 889f145..0000000 --- a/charts/weather-app/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -CHART_REPO := http://jenkins-x-chartmuseum:8080 -CURRENT=$(pwd) -NAME := weather-app -OS := $(shell uname) -RELEASE_VERSION := $(shell cat ../../VERSION) - -build: clean - rm -rf requirements.lock - helm dependency build - helm lint - -install: clean build - helm install . --name ${NAME} - -upgrade: clean build - helm upgrade ${NAME} . - -delete: - helm delete --purge ${NAME} - -clean: - rm -rf charts - rm -rf ${NAME}*.tgz - -release: clean - helm dependency build - helm lint - helm init --client-only - helm package . - curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(shell sed -n 's/^version: //p' Chart.yaml).tgz" $(CHART_REPO)/api/charts - rm -rf ${NAME}*.tgz% - -tag: -ifeq ($(OS),Darwin) - sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml - sed -i "" -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml -else ifeq ($(OS),Linux) - sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml - sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/arctiqteam\/weather-app|" values.yaml - sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml -else - echo "platfrom $(OS) not supported to release from" - exit -1 -endif - git add --all - git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed - git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)" - git push origin v$(RELEASE_VERSION) diff --git a/charts/weather-app/README.md b/charts/weather-app/README.md deleted file mode 100755 index 83de828..0000000 --- a/charts/weather-app/README.md +++ /dev/null @@ -1 +0,0 @@ -# Javascript application \ No newline at end of file diff --git a/charts/weather-app/templates/NOTES.txt b/charts/weather-app/templates/NOTES.txt deleted file mode 100755 index 97823be..0000000 --- a/charts/weather-app/templates/NOTES.txt +++ /dev/null @@ -1,4 +0,0 @@ - -Get the application URL by running these commands: - -kubectl get ingress {{ template "fullname" . }} diff --git a/charts/weather-app/templates/_helpers.tpl b/charts/weather-app/templates/_helpers.tpl deleted file mode 100755 index f0d83d2..0000000 --- a/charts/weather-app/templates/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "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). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/weather-app/templates/deployment.yaml b/charts/weather-app/templates/deployment.yaml deleted file mode 100755 index 2eff0a3..0000000 --- a/charts/weather-app/templates/deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- if .Values.knativeDeploy }} -{{- else }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - labels: - draft: {{ default "draft-app" .Values.draft }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -spec: - replicas: {{ .Values.replicaCount }} - template: - metadata: - labels: - draft: {{ default "draft-app" .Values.draft }} - app: {{ template "fullname" . }} -{{- if .Values.podAnnotations }} - annotations: -{{ toYaml .Values.podAnnotations | indent 8 }} -{{- end }} - spec: - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: -{{- range $pkey, $pval := .Values.env }} - - name: {{ $pkey }} - value: {{ quote $pval }} -{{- end }} - ports: - - containerPort: {{ .Values.service.internalPort }} - livenessProbe: - httpGet: - path: {{ .Values.probePath }} - port: {{ .Values.service.internalPort }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - readinessProbe: - httpGet: - path: {{ .Values.probePath }} - port: {{ .Values.service.internalPort }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - resources: -{{ toYaml .Values.resources | indent 12 }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} -{{- end }} \ No newline at end of file diff --git a/charts/weather-app/templates/ksvc.yaml b/charts/weather-app/templates/ksvc.yaml deleted file mode 100755 index d37fb3f..0000000 --- a/charts/weather-app/templates/ksvc.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.knativeDeploy }} -apiVersion: serving.knative.dev/v1alpha1 -kind: Service -metadata: -{{- if .Values.service.name }} - name: {{ .Values.service.name }} -{{- else }} - name: {{ template "fullname" . }} -{{- end }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -spec: - runLatest: - configuration: - revisionTemplate: - spec: - container: - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: -{{- range $pkey, $pval := .Values.env }} - - name: {{ $pkey }} - value: {{ quote $pval }} -{{- end }} - livenessProbe: - httpGet: - path: {{ .Values.probePath }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} - readinessProbe: - failureThreshold: {{ .Values.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.probePath }} - periodSeconds: {{ .Values.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - resources: -{{ toYaml .Values.resources | indent 14 }} -{{- end }} diff --git a/charts/weather-app/templates/service.yaml b/charts/weather-app/templates/service.yaml deleted file mode 100755 index 9321361..0000000 --- a/charts/weather-app/templates/service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.knativeDeploy }} -{{- else }} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.service.name }} - name: {{ .Values.service.name }} -{{- else }} - name: {{ template "fullname" . }} -{{- end }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -{{- if .Values.service.annotations }} - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - protocol: TCP - name: http - selector: - app: {{ template "fullname" . }} -{{- end }} diff --git a/charts/weather-app/values.yaml b/charts/weather-app/values.yaml deleted file mode 100755 index c7f9ece..0000000 --- a/charts/weather-app/values.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# Default values for node projects. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -replicaCount: 1 -image: - repository: draft - tag: dev - pullPolicy: IfNotPresent - -# define environment variables here as a map of key: value -env: - -# enable this flag to use knative serve to deploy the app -knativeDeploy: false - -service: - name: weather-app - type: ClusterIP - externalPort: 80 - internalPort: 8080 - annotations: - fabric8.io/expose: "true" - fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx" -resources: - limits: - cpu: 400m - memory: 256Mi - requests: - cpu: 200m - memory: 128Mi -probePath: / -livenessProbe: - initialDelaySeconds: 60 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -readinessProbe: - failureThreshold: 1 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 From 7b9610ab414f38188f6db70a8ba69ae6986fe45b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Tue, 19 Nov 2019 16:43:56 -0500 Subject: [PATCH 25/62] Delete .dockerignore --- .dockerignore | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 762752c..0000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -draft.toml -charts/ -NOTICE -LICENSE -README.md \ No newline at end of file From ce277ff89d0a3b6dd5f13f52e776b8a7aacf5819 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Mon, 9 Dec 2019 15:25:45 -0500 Subject: [PATCH 26/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 5885c04..371a101 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 895cd368035b6344b2f0a6198b6b4e6c0f19a3f2 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Fri, 30 Oct 2020 16:44:10 -0400 Subject: [PATCH 27/62] Create manifest.yml --- manifest.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 manifest.yml diff --git a/manifest.yml b/manifest.yml new file mode 100644 index 0000000..d7986a5 --- /dev/null +++ b/manifest.yml @@ -0,0 +1,3 @@ +--- +applications: +- name: weather From 9b10cfbbeb1f28a53dc1d04a199e37fa39ff0bc7 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Fri, 30 Oct 2020 16:45:06 -0400 Subject: [PATCH 28/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d6df4f..513f0ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Arctiq Weather App - utilized in an OpenShift Pipeline +# Arctiq Weather App Simple Node.js Command Line Weather Application * Built upon bmorielli25's [weather-app](https://github.com/bmorelli25/simple-nodejs-weather-app) From 3e9f4687a7a7a4df74a7864089c45492d4f6f6b1 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Fri, 30 Oct 2020 16:47:11 -0400 Subject: [PATCH 29/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 513f0ef..a01f383 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ This repo was used to build an app and promote across different OpenShift cluste * PROD B Cluster * Replace cluster URLs in snippets. + ### How to run: `oc create -f jenkins/pipeline.yaml` From da0da1efc539b322c3a6826f6672bb7e45c7698f Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:17:38 -0500 Subject: [PATCH 30/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a01f383..c3b114a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Simple Node.js Command Line Weather Application This repo was used to build an app and promote across different OpenShift clusters in this [demo](https://www.arctiq.ca/our-blog/2018/10/6/multi-cloud-application-container-deployment-pipeline/) + ### Pre-requisites * [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) From 155983eafad554a3f524f0288283ae232ba4eaa4 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:18:01 -0500 Subject: [PATCH 31/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c3b114a..d303ed8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Simple Node.js Command Line Weather Application This repo was used to build an app and promote across different OpenShift clusters in this [demo](https://www.arctiq.ca/our-blog/2018/10/6/multi-cloud-application-container-deployment-pipeline/) + ### Pre-requisites * [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) From 7d0d5f8f17920e764531c6efcbf76060ace8ae05 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:18:32 -0500 Subject: [PATCH 32/62] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index d303ed8..a01f383 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ Simple Node.js Command Line Weather Application This repo was used to build an app and promote across different OpenShift clusters in this [demo](https://www.arctiq.ca/our-blog/2018/10/6/multi-cloud-application-container-deployment-pipeline/) - - ### Pre-requisites * [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) From ddf973de5ad5a74858cff9385603dab1b0dd6d97 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:20:07 -0500 Subject: [PATCH 33/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a01f383..edbb6ed 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This repo was used to build an app and promote across different OpenShift cluste ### Pre-requisites + * [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) * 3 OpenShift clusters: * DEV/QA Cluster From 6effb89f9d8cac1fad431c96a9d9c574d7101a75 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:25:53 -0500 Subject: [PATCH 34/62] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index edbb6ed..a01f383 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ This repo was used to build an app and promote across different OpenShift cluste ### Pre-requisites - * [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) * 3 OpenShift clusters: * DEV/QA Cluster From db9f4df38e644410ed6dd48648104a8935d8e5d8 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:26:52 -0500 Subject: [PATCH 35/62] Update README.md --- README.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/README.md b/README.md index a01f383..d19432f 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,2 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application - -* Built upon bmorielli25's [weather-app](https://github.com/bmorelli25/simple-nodejs-weather-app) - -This repo was used to build an app and promote across different OpenShift clusters in this [demo](https://www.arctiq.ca/our-blog/2018/10/6/multi-cloud-application-container-deployment-pipeline/) - -### Pre-requisites - -* [Skopeo Jenkins slave image for image promotion](https://github.com/redhat-cop/containers-quickstarts/tree/master/jenkins-slaves/jenkins-slave-image-mgmt) -* 3 OpenShift clusters: - * DEV/QA Cluster - * PROD A Cluster - * PROD B Cluster -* Replace cluster URLs in snippets. - - -### How to run: - -`oc create -f jenkins/pipeline.yaml` - -### Run the pipeline and see the weather! - -![gif](https://github.com/arctiqteam/weather-app/blob/master/giphy.gif?raw=true 'website gif') From d96dceb8d03e03d9b2aa393df1a5f67d992cc600 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 12:32:33 -0500 Subject: [PATCH 36/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d19432f..9a79a46 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application + From a2ee69586b999bfc76ebe32b7446f6ea42af6021 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 13:05:45 -0500 Subject: [PATCH 37/62] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9a79a46..d19432f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application - From eb3f8a59fcf2d1531bc7c9aa955e824e5abee87a Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 13:27:20 -0500 Subject: [PATCH 38/62] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d19432f..9a79a46 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application + From 6cfb73e10519d08a1edfadb1036e6acbcacd793b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Sun, 1 Nov 2020 13:39:25 -0500 Subject: [PATCH 39/62] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9a79a46..d19432f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application - From 7d5ff7ac4744116728d83613dc93df2e2c8c4338 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Mon, 2 Nov 2020 11:28:46 -0500 Subject: [PATCH 40/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 371a101..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/washington_blue.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From b5de33f2743739ea83f7a8c17a952b06e59a7dd3 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 3 Nov 2020 12:40:02 -0500 Subject: [PATCH 41/62] commit sf --- jenkins/pipeline.yaml | 258 ---------------------- kubernetes/deployment.yaml | 19 -- kubernetes/tekton/build-task.yaml | 37 ---- kubernetes/tekton/deploy-task.yaml | 36 --- kubernetes/tekton/pipeline-run.yaml | 23 -- kubernetes/tekton/pipeline.yaml | 42 ---- openshift/weather-app-dc-template.yaml | 26 --- openshift/weather-app-route-template.yaml | 12 - openshift/weather-app-svc-template.yaml | 16 -- public/css/style.css | 4 +- 10 files changed, 2 insertions(+), 471 deletions(-) delete mode 100644 jenkins/pipeline.yaml delete mode 100644 kubernetes/deployment.yaml delete mode 100644 kubernetes/tekton/build-task.yaml delete mode 100644 kubernetes/tekton/deploy-task.yaml delete mode 100644 kubernetes/tekton/pipeline-run.yaml delete mode 100644 kubernetes/tekton/pipeline.yaml delete mode 100644 openshift/weather-app-dc-template.yaml delete mode 100644 openshift/weather-app-route-template.yaml delete mode 100644 openshift/weather-app-svc-template.yaml diff --git a/jenkins/pipeline.yaml b/jenkins/pipeline.yaml deleted file mode 100644 index f96f7ac..0000000 --- a/jenkins/pipeline.yaml +++ /dev/null @@ -1,258 +0,0 @@ -apiVersion: v1 -kind: BuildConfig -metadata: - name: arctiq-weather - labels: - name: arctiq-weather - annotations: - pipeline.alpha.openshift.io/uses: '[{"name": "arctiq-weather", "namespace": "", "kind": "DeploymentConfig"}]' -spec: - triggers: - - - type: GitHub - github: - secret: CwokaXwLfG63gBP3R0jV - - - type: Generic - generic: - secret: secret101 - runPolicy: Serial - source: - type: None - strategy: - type: JenkinsPipeline - jenkinsPipelineStrategy: - env: - - name: GITHUB_CREDS - value: github - - name: APP_NAME - value: weather - - name: DEV_PROJECT - value: dev - - name: QA_REGISTRY - value: docker://docker-registry-default.apps. - - name: QA_PROJECT - value: qa - - name: QA_TAG - value: promoteToQA - - name: PRODA_CLUSTER - value: https:// - - name: PRODA_REGISTRY - value: docker://docker-registry-default.apps. - - name: PRODA_TAG - value: promoteToProdA - - name: PRODA_PROJECT - value: weather - - name: PRODB_CLUSTER - value: https:// - - name: PRODB_TAG - value: promoteToProdB - - name: PRODB_PROJECT - value: weather - - name: PRODB_REGISTRY - value: docker://docker-registry-default.apps. - - jenkinsfile: |- - pipeline { - agent { - label 'jenkins-slave-image-mgmt' - } - stages { - stage('Create Build') { - when { - expression { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - return !openshift.selector("bc", "weather").exists(); - } - } - } - } - steps { - script { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - openshift.newBuild("openshift/nodejs~https://github.com/ArctiqTeam/weather-app.git", "--name=weather") - } - } - } - } - } - stage('Start Build') { - steps { - script { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - openshift.selector("bc", "weather").startBuild("--wait=true") - } - } - } - } - } - stage('Deploy Image in Dev') { - when { - expression { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - return !openshift.selector('dc', 'weather').exists() - } - } - } - } - steps { - script { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - def app = openshift.newApp("weather:latest", "--name=weather") - app.narrow("svc").expose(); - - def dc = openshift.selector("dc", "weather") - while (dc.object().spec.replicas != dc.object().status.availableReplicas) { - sleep 10 - } - openshift.set("triggers", "dc/weather", "--manual") - } - } - } - } - } - stage('Deploy DEV') { - steps { - script { - openshift.withCluster() { - openshift.withProject(env.DEV_PROJECT) { - openshift.selector("dc", "weather").rollout().latest(); - } - } - } - } - } - stage('Tag for QA') { - steps { - script { - openshift.withCluster() { - openshift.tag("${env.DEV_PROJECT}/weather:latest", "${env.QA_PROJECT}/weather:${QA_TAG}") - } - } - } - } - stage('Create QA') { - when { - expression { - openshift.withCluster() { - openshift.withProject(env.QA_PROJECT) { - return !openshift.selector('dc', 'weather').exists() - } - } - } - } - steps { - script { - openshift.withCluster() { - openshift.withProject(env.QA_PROJECT) { - def app = openshift.newApp("weather:${QA_TAG}", "--name=weather") - app.narrow("svc").expose(); - - def dc = openshift.selector("dc", "weather") - while (dc.object().spec.replicas != dc.object().status.availableReplicas) { - sleep 10 - } - openshift.set("triggers", "dc/weather", "--manual") - } - } - } - } - } - stage('Deploy QA') { - steps { - script { - openshift.withCluster() { - openshift.withProject(env.QA_PROJECT) { - openshift.selector("dc", "weather").rollout().latest(); - } - } - } - } - } - stage('Promote to PROD?') { - steps { - timeout(time:15, unit:'MINUTES') { - input message: "Promote to PROD?", ok: "Promote" - } - } - } - stage('Tag for Prod') { - steps { - script { - openshift.withCluster() { - openshift.tag("${env.QA_PROJECT}/weather:${QA_TAG}", "${env.QA_PROJECT}/weather:${PRODA_TAG}") - openshift.tag("${env.QA_PROJECT}/weather:${QA_TAG}", "${env.QA_PROJECT}/weather:${PRODB_TAG}") - } - } - } - } - stage('Copy Image to PROD A') { - steps { - script { - openshift.withCluster() { - openshift.withProject("${QA_PROJECT}") { - withCredentials([string(credentialsId: 'QA_CREDS', variable: 'QA_CREDS'), - string(credentialsId: 'PRODA_CREDS', variable: 'PRODA_CREDS')]) { - // call like this so we dont print credentials to logs - sh ''' - set -x - skopeo --debug copy --src-tls-verify=false --dest-tls-verify=false --src-creds="${QA_CREDS}" --dest-creds="${PRODA_CREDS}" "${QA_REGISTRY}/${QA_PROJECT}/weather:${PRODA_TAG}" "${PRODA_REGISTRY}/${PRODA_PROJECT}/weather:${PRODA_TAG}" - ''' - } - } - } - } - } - } - stage('Deploy Image in Prod A') { - steps { - script { - openshift.withCluster(env.PRODA_CLUSTER) { - openshift.withProject(env.PRODA_PROJECT) { - openshift.selector("dc", "weather").rollout().latest(); - slackSend (color: '#0eaf2b', message: "Success: Job - App is deployed in Prod A - check the weather here: http://weather.apps.") - } - } - } - } - } - stage('Copy Image to PROD B') { - steps { - script { - openshift.withCluster() { - openshift.withProject("${QA_PROJECT}") { - withCredentials([string(credentialsId: 'QA_CREDS', variable: 'QA_CREDS'), - string(credentialsId: 'PRODB_CREDS', variable: 'PRODB_CREDS')]) { - // call like this so we dont print credentials to logs - sh ''' - set -x - skopeo --debug copy --src-tls-verify=false --dest-tls-verify=false --src-creds="${QA_CREDS}" --dest-creds="${PRODB_CREDS}" "${QA_REGISTRY}/${QA_PROJECT}/weather:${PRODB_TAG}" "${PRODB_REGISTRY}/${PRODB_PROJECT}/weather:${PRODB_TAG}" - ''' - } - } - } - } - } - } - stage('Deploy Image in Prod B') { - steps { - script { - openshift.withCluster(env.PRODB_CLUSTER) { - openshift.withProject(env.PRODB_PROJECT) { - openshift.selector("dc", "weather").rollout().latest(); - slackSend (color: '#0eaf2b', message: "Success: Job - App is deployed in Prod B - check the weather here: http://weather.apps.") - } - } - } - } - } - } - } - output: - resources: - postCommit: diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml deleted file mode 100644 index 0f42c9e..0000000 --- a/kubernetes/deployment.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: weather -spec: - selector: - matchLabels: - app: weather - replicas: 1 - template: - metadata: - labels: - app: weather - spec: - containers: - - name: weather - image: docker.io/daniyalj/weather:latest - ports: - - containerPort: 8080 diff --git a/kubernetes/tekton/build-task.yaml b/kubernetes/tekton/build-task.yaml deleted file mode 100644 index e889256..0000000 --- a/kubernetes/tekton/build-task.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: tekton.dev/v1alpha1 -kind: Task -metadata: - name: build-docker-image-from-git-source -spec: - inputs: - resources: - - name: docker-source - type: git - params: - - name: pathToDockerFile - type: string - description: The path to the dockerfile to build - default: /workspace/docker-source/Dockerfile - - name: pathToContext - type: string - description: - The build context used by Kaniko - (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts) - default: /workspace/docker-source - outputs: - resources: - - name: builtImage - type: image - steps: - - name: build-and-push - image: gcr.io/kaniko-project/executor:v0.13.0 - # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential - env: - - name: "DOCKER_CONFIG" - value: "/builder/home/.docker/" - command: - - /kaniko/executor - args: - - --dockerfile=$(inputs.params.pathToDockerFile) - - --destination=$(outputs.resources.builtImage.url) - - --context=$(inputs.params.pathToContext) diff --git a/kubernetes/tekton/deploy-task.yaml b/kubernetes/tekton/deploy-task.yaml deleted file mode 100644 index 19f2adc..0000000 --- a/kubernetes/tekton/deploy-task.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: tekton.dev/v1alpha1 -kind: Task -metadata: - name: deploy-using-kubectl -spec: - inputs: - resources: - - name: source - type: git - - name: image - type: image - params: - - name: path - type: string - description: Path to the manifest to apply - - name: yamlPathToImage - type: string - description: - The path to the image to replace in the yaml manifest (arg to yq) - steps: - - name: replace-image - image: mikefarah/yq - command: ["yq"] - args: - - "w" - - "-i" - - "$(inputs.params.path)" - - "$(inputs.params.yamlPathToImage)" - - "$(inputs.resources.image.url)" - - name: run-kubectl - image: lachlanevenson/k8s-kubectl - command: ["kubectl"] - args: - - "apply" - - "-f" - - "$(inputs.params.path)" diff --git a/kubernetes/tekton/pipeline-run.yaml b/kubernetes/tekton/pipeline-run.yaml deleted file mode 100644 index 0f73fc0..0000000 --- a/kubernetes/tekton/pipeline-run.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: tekton.dev/v1alpha1 -kind: PipelineRun -metadata: - name: weather-pipeline-run-v6 -spec: - serviceAccountName: weather-svc - pipelineRef: - name: weather-pipeline - resources: - - name: source-repo - resourceSpec: - type: git - params: - - name: revision - value: static - - name: url - value: https://github.com/ArctiqTeam/weather-app.git - - name: weather-image - resourceSpec: - type: image - params: - - name: url - value: gcr.io/iceberg-234522/weather:washington diff --git a/kubernetes/tekton/pipeline.yaml b/kubernetes/tekton/pipeline.yaml deleted file mode 100644 index 11efa17..0000000 --- a/kubernetes/tekton/pipeline.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: tekton.dev/v1alpha1 -kind: Pipeline -metadata: - name: weather-pipeline -spec: - resources: - - name: source-repo - type: git - - name: weather-image - type: image - tasks: - - name: build-weather-image - taskRef: - name: build-docker-image-from-git-source - params: - - name: pathToDockerFile - value: Dockerfile - - name: pathToContext - value: /workspace/docker-source/ - resources: - inputs: - - name: docker-source - resource: source-repo - outputs: - - name: builtImage - resource: weather-image - - name: deploy-weather - taskRef: - name: deploy-using-kubectl - resources: - inputs: - - name: source - resource: source-repo - - name: image - resource: weather-image - from: - - build-weather-image - params: - - name: path - value: /workspace/source/kubernetes/deployment.yaml #configure: may change according to your source - - name: yamlPathToImage - value: "spec.template.spec.containers[0].image" diff --git a/openshift/weather-app-dc-template.yaml b/openshift/weather-app-dc-template.yaml deleted file mode 100644 index bc211da..0000000 --- a/openshift/weather-app-dc-template.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apps.openshift.io/v1 -kind: DeploymentConfig -metadata: - annotations: - app: weather - name: weather -spec: - replicas: 1 - selector: - app: weather - deploymentconfig: weather - strategy: - type: Rolling - template: - metadata: - labels: - app: weather - deploymentconfig: weather - spec: - containers: - - image: docker.io/daniyalj/weather:latest - imagePullPolicy: Always - name: weather - ports: - - containerPort: 8080 - protocol: TCP diff --git a/openshift/weather-app-route-template.yaml b/openshift/weather-app-route-template.yaml deleted file mode 100644 index fdc621d..0000000 --- a/openshift/weather-app-route-template.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app: weather - name: weather-app -spec: - port: - targetPort: 8080-tcp - to: - kind: Service - name: weather diff --git a/openshift/weather-app-svc-template.yaml b/openshift/weather-app-svc-template.yaml deleted file mode 100644 index af98798..0000000 --- a/openshift/weather-app-svc-template.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - labels: - app: weather - name: weather -spec: - ports: - - name: 8080-tcp - port: 8080 - protocol: TCP - targetPort: 8080 - selector: - deploymentconfig: weather - type: ClusterIP diff --git a/public/css/style.css b/public/css/style.css index 07410f3..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 800dd995b2fe77382e8ed49e8337672715f5c960 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 3 Nov 2020 12:54:28 -0500 Subject: [PATCH 42/62] sf --- public/css/style.css | 4 ++-- server.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; diff --git a/server.js b/server.js index 44ffd53..e255e42 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ From c5237430c254771c718a0ed1274530da25ae8ddc Mon Sep 17 00:00:00 2001 From: Daniyal Date: Tue, 3 Nov 2020 14:38:07 -0500 Subject: [PATCH 43/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 07410f3..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From eadddc7efeea2ab25ed924bdcc98c2df97cab2be Mon Sep 17 00:00:00 2001 From: Daniyal Date: Tue, 3 Nov 2020 14:39:09 -0500 Subject: [PATCH 44/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index e255e42..f8298d6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From 41e6fefa3a6ab4ed27df93c152523c18b26c6eea Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 3 Nov 2020 14:58:05 -0500 Subject: [PATCH 45/62] change sf --- public/css/style.css | 4 ++-- server.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..62fe575 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /*background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; diff --git a/server.js b/server.js index f8298d6..fd71eec 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees fahrenheit in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From dfe0e7eedaceea47c46e2dd24f98651b453f6a02 Mon Sep 17 00:00:00 2001 From: daniyalj Date: Tue, 3 Nov 2020 16:16:50 -0500 Subject: [PATCH 46/62] update docs --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d19432f..62ff964 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # Arctiq Weather App Simple Node.js Command Line Weather Application + +``` +$ cf push +``` From b0cc940c07cafaaa31fe0ea648128e331eac4e3b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 11:03:28 -0500 Subject: [PATCH 47/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 62fe575..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /*background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From b761e1b11a20254fe5019968b5f83c4a044d5ecd Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 11:03:50 -0500 Subject: [PATCH 48/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index fd71eec..f8298d6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees fahrenheit in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From 43c5e2daa8bdb81490c2922df5cff4c28fc42e9e Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 11:04:18 -0500 Subject: [PATCH 49/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f8298d6..80954b4 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From aeeeea1017f251d5df9423d785f1bf24ab36f2f9 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 11:04:38 -0500 Subject: [PATCH 50/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 6914a5d8b93e5fc772cda6057823907f724335a8 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 11:36:44 -0500 Subject: [PATCH 51/62] Revert "Change to Farenheit" --- public/css/style.css | 4 ++-- server.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 07410f3..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; diff --git a/server.js b/server.js index 80954b4..f8298d6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From dfc3d2d1e283f363acd35f6e36dee923c3c20d66 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:27:38 -0500 Subject: [PATCH 52/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 8d56fccdc0fd4a6441240a1409fa2a7226148c15 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:29:10 -0500 Subject: [PATCH 53/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f8298d6..80954b4 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From e8ff6437d5d8e865f8fa18760d8d909dc96ddfae Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:54:40 -0500 Subject: [PATCH 54/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 07410f3..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 51d114b5f6be9155d2ab4189ae0476e05514cde0 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:55:17 -0500 Subject: [PATCH 55/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 80954b4..f8298d6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From 88ad313d6bb675658511e264672d38857de2f39a Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:56:39 -0500 Subject: [PATCH 56/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From aea2bd50d65c5a6805de5d1985c8c508af2cf9b6 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 21:56:55 -0500 Subject: [PATCH 57/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f8298d6..80954b4 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From f25eff494bbf60b93626117eb562bba4dc91345b Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 22:21:17 -0500 Subject: [PATCH 58/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 07410f3..362ba11 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ - background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); + background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); + /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ background-size: cover; -moz-background-size: cover; -o-background-size: cover; From f5f8b9c91e9338e72f3d6fd9b907f6d8179c90ff Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 22:21:54 -0500 Subject: [PATCH 59/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 80954b4..f8298d6 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From 4c4eea7af9882151d4a38b500581d74367e66252 Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 22:23:38 -0500 Subject: [PATCH 60/62] Update style.css --- public/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 362ba11..07410f3 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,8 +7,8 @@ body { width: 800px; margin: 0 auto; font-family: 'Open Sans', sans-serif; - background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); - /* background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); */ + /* background-image: url("https://raw.githubusercontent.com/daniyalj/arctiq-mountain/master/weatherlogoblue.jpg"); */ + background-image: url("https://github.com/stewartshea/arctiq-backgrounds/raw/master/sf-bg-arctiq.jpg"); background-size: cover; -moz-background-size: cover; -o-background-size: cover; From 43d1c507d932bba2890f1c55cc9e2ffdd905bccc Mon Sep 17 00:00:00 2001 From: Daniyal Date: Wed, 4 Nov 2020 22:24:08 -0500 Subject: [PATCH 61/62] Update server.js --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index f8298d6..80954b4 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.get('/', function (req, res) { app.post('/', function (req, res) { let city = req.body.city; - let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}` + let url = `http://api.openweathermap.org/data/2.5/weather?q=${city}&units=imperial&appid=${apiKey}` request(url, function (err, response, body) { if(err){ @@ -28,7 +28,7 @@ app.post('/', function (req, res) { if(weather.main == undefined){ res.render('index', {weather: null, error: 'Error, please try again'}); } else { - let weatherText = `It's ${weather.main.temp} degrees celsius in ${weather.name}!`; + let weatherText = `It's ${weather.main.temp} degrees farenheit in ${weather.name}!`; res.render('index', {weather: weatherText, error: null, hostname: hostname}); } } From b16fc857ba5c2868be8156aa919381bf29182427 Mon Sep 17 00:00:00 2001 From: Mr Tekton Date: Sat, 7 Nov 2020 00:20:50 +0000 Subject: [PATCH 62/62] deploy weather-weather-pipeline-qwfrk-anthos-export-zdpgq-pod-jx6l7 --- .../namespaces/weather/deployment.yaml | 123 ++++++++++++++++++ .../namespaces/weather/namespace.yaml | 11 ++ config-management/namespaces/weather/sa.yaml | 11 ++ .../namespaces/weather/service.yaml | 18 +++ config-management/namespaces/weather/vs.yaml | 0 5 files changed, 163 insertions(+) create mode 100644 config-management/namespaces/weather/deployment.yaml create mode 100644 config-management/namespaces/weather/namespace.yaml create mode 100644 config-management/namespaces/weather/sa.yaml create mode 100644 config-management/namespaces/weather/service.yaml create mode 100644 config-management/namespaces/weather/vs.yaml diff --git a/config-management/namespaces/weather/deployment.yaml b/config-management/namespaces/weather/deployment.yaml new file mode 100644 index 0000000..b6675ab --- /dev/null +++ b/config-management/namespaces/weather/deployment.yaml @@ -0,0 +1,123 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: "49" + labels: + app.kubernetes.io/component: app-scaler + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + name: weather +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/component: app-server + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + sidecar.istio.io/inject: "true" + traffic.sidecar.istio.io/includeOutboundIPRanges: '*' + creationTimestamp: null + labels: + app.kubernetes.io/component: app-server + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + kf.dev/networkpolicy: app + spec: + containers: + - env: + - name: PORT + value: "8080" + - name: VCAP_APP_PORT + value: $(PORT) + - name: CF_INSTANCE_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: CF_INSTANCE_INTERNAL_IP + value: $(CF_INSTANCE_IP) + - name: VCAP_APP_HOST + value: $(CF_INSTANCE_IP) + - name: CF_INSTANCE_PORT + value: "8080" + - name: CF_INSTANCE_ADDR + value: $(CF_INSTANCE_IP):$(CF_INSTANCE_PORT) + - name: CF_INSTANCE_GUID + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.uid + - name: INSTANCE_GUID + value: $(CF_INSTANCE_GUID) + - name: CF_INSTANCE_INDEX + value: "0" + - name: INSTANCE_INDEX + value: $(CF_INSTANCE_INDEX) + - name: MEMORY_LIMIT + valueFrom: + resourceFieldRef: + divisor: 1Mi + resource: limits.memory + - name: DISK_LIMIT + valueFrom: + resourceFieldRef: + divisor: 1Mi + resource: limits.ephemeral-storage + - name: LANG + value: en_US.UTF-8 + - name: VCAP_SERVICES + valueFrom: + secretKeyRef: + key: VCAP_SERVICES + name: kf-injected-envs-weather + optional: false + - name: DATABASE_URL + valueFrom: + secretKeyRef: + key: DATABASE_URL + name: kf-injected-envs-weather + optional: true + - name: MEMORY_LIMIT + value: $(MEMORY_LIMIT)M + - name: KF_UPDATE_REQUESTS_22d1139e-aa64-485d-8bac-acc75574daa5 + value: "47" + image: northamerica-northeast1-docker.pkg.dev/arctiq-anthos/kf-processing/app_weather_weather-47:6764c547-c72e-4b20-b370-cf93dadcb61f + imagePullPolicy: Always + name: user-container + ports: + - containerPort: 8080 + name: http-user-port + protocol: TCP + readinessProbe: + failureThreshold: 3 + periodSeconds: 10 + successThreshold: 1 + tcpSocket: + port: 8080 + timeoutSeconds: 60 + resources: + requests: + cpu: 100m + ephemeral-storage: 1Gi + memory: 1Gi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + enableServiceLinks: false + restartPolicy: Always + schedulerName: default-scheduler + serviceAccount: sa-weather + serviceAccountName: sa-weather + terminationGracePeriodSeconds: 30 + diff --git a/config-management/namespaces/weather/namespace.yaml b/config-management/namespaces/weather/namespace.yaml new file mode 100644 index 0000000..c5a1c6f --- /dev/null +++ b/config-management/namespaces/weather/namespace.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/managed-by: kf + istio-injection: enabled + name: weather +spec: + finalizers: + - kubernetes + diff --git a/config-management/namespaces/weather/sa.yaml b/config-management/namespaces/weather/sa.yaml new file mode 100644 index 0000000..bb6ea1c --- /dev/null +++ b/config-management/namespaces/weather/sa.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: serviceaccount + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + name: sa-weather +secrets: +- name: sa-weather-token-2nkk7 + diff --git a/config-management/namespaces/weather/service.yaml b/config-management/namespaces/weather/service.yaml new file mode 100644 index 0000000..e535ea0 --- /dev/null +++ b/config-management/namespaces/weather/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: service + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + name: weather +spec: + ports: + - name: http-user-port + port: 80 + targetPort: 8080 + selector: + app.kubernetes.io/component: app-server + app.kubernetes.io/managed-by: kf + app.kubernetes.io/name: weather + diff --git a/config-management/namespaces/weather/vs.yaml b/config-management/namespaces/weather/vs.yaml new file mode 100644 index 0000000..e69de29