diff --git a/openshift/Dockerfile b/openshift/Dockerfile deleted file mode 100644 index cf5639c9a..000000000 --- a/openshift/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT - -# Stage 1: Build Angular application -FROM docker-registry.default.svc:5000/researchfi/node:14.15.0-alpine as builder -COPY . /app -WORKDIR /app -RUN chown -R node:node /app -USER node -RUN npm install -RUN npm run build:ssr - -# Stage 2: Serve Angular application -FROM docker-registry.default.svc:5000/researchfi/node:14.15.0-alpine as angular -COPY --from=builder /app/dist/ /dist/ -### NOTE: Copying of style file leads into increased TTFB value and therefore poor performance -### Do not use this file copy method. -## SSR build warns from non existent stylesheet in 'browser/' -# ## Manually copy this file from localized build to suppress this warning -# COPY --from=builder /app/dist/browser/fi/*.css /dist/browser/ -WORKDIR / - -RUN chown -R node:node /dist -USER node - -EXPOSE 8080 -CMD node dist/server.js \ No newline at end of file diff --git a/openshift/Jenkinsfile b/openshift/Jenkinsfile deleted file mode 100644 index d9540d1b5..000000000 --- a/openshift/Jenkinsfile +++ /dev/null @@ -1,94 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2019 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-frontend-build". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "researchfi-frontend-build") - // Start build and display logs - buildConfig.startBuild().logs("-f") - - // New image gets automatically tagged "latest", it is defined in the OpenShift build config. - // Tag image also using short Git commit hash. - // openshift.tag("researchfi-frontend-devel:latest", "researchfi-frontend-devel:${GIT_COMMIT_SHORT}") - } - } - } - } - } - - /* - Wait until devel deployment is ready. - At this point the devel environment should be deploying, triggered by a new image from previous step. - */ - /* - stage('Wait devel deployment') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - sleep 30 - timeout(5) { - openshift.selector("dc", "researchfi-frontend-devel-deployment").related('pods').untilEach(1) { - return (it.object().status.phase == "Running") - } - } - } - } - } - } - } - */ - - /* - Deploy to production. - Confirm deployment by prompting user. - Production deployment is triggered by tagging the devel "latest" as production "latest". - Also tag the production "latest" with Git commit hash. - */ - /* - stage('Deploy to production') { - steps { - timeout(time: 12, unit: 'HOURS') { - input message: "Deploy to production?", ok: "Deploy" - } - script { - openshift.withCluster() { - openshift.withProject() { - openshift.tag("researchfi-frontend-devel:latest", "researchfi-frontend-production:latest") - // openshift.tag("researchfi-frontend-production:latest", "researchfi-frontend-production:${GIT_COMMIT_SHORT}") - } - } - } - } - } - */ - } -} \ No newline at end of file diff --git a/openshift/Jenkinsfile-devel b/openshift/Jenkinsfile-devel deleted file mode 100644 index 014942ed2..000000000 --- a/openshift/Jenkinsfile-devel +++ /dev/null @@ -1,43 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2019 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-frontend-build-devel". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "researchfi-frontend-build-devel") - // Start build and display logs - buildConfig.startBuild().logs("-f") - } - } - } // script - } // steps - } // stage - } -} \ No newline at end of file diff --git a/openshift/Jenkinsfile-mydata-demo-frontend b/openshift/Jenkinsfile-mydata-demo-frontend deleted file mode 100644 index f21c6ea56..000000000 --- a/openshift/Jenkinsfile-mydata-demo-frontend +++ /dev/null @@ -1,43 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2021 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-mydata-demo-frontend". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "mydata-demo-frontend-build") - // Start build and display logs - buildConfig.startBuild().logs("-f") - } - } - } - } - } - } -} \ No newline at end of file diff --git a/openshift/Jenkinsfile-production b/openshift/Jenkinsfile-production deleted file mode 100644 index 514272f52..000000000 --- a/openshift/Jenkinsfile-production +++ /dev/null @@ -1,69 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2019 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-frontend-production-build". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "researchfi-frontend-production-build") - // Start build and display logs - buildConfig.startBuild().logs("-f") - - // New image gets automatically tagged "latest", it is defined in the OpenShift build config. - // Tag image also using short Git commit hash. - // openshift.tag("researchfi-frontend-production-staging:latest", "researchfi-frontend-devel:${GIT_COMMIT_SHORT}") - } - } - } - } - } - - /* - Deploy to production. - Confirm deployment by prompting user. - Production deployment is triggered by tagging the staging "latest" as production "latest". - Also tag the production "latest" with Git commit hash. - */ - stage('Deploy to production') { - steps { - timeout(time: 12, unit: 'HOURS') { - input message: "Deploy image from staging to production?", ok: "Deploy" - } - script { - openshift.withCluster() { - openshift.withProject() { - openshift.tag("researchfi-frontend-production-staging:latest", "researchfi-frontend-production:latest") - // openshift.tag("researchfi-frontend-production:latest", "researchfi-frontend-production:${GIT_COMMIT_SHORT}") - } - } - } - } - } - } -} \ No newline at end of file diff --git a/openshift/Jenkinsfile-qa b/openshift/Jenkinsfile-qa deleted file mode 100644 index 3c0d197f3..000000000 --- a/openshift/Jenkinsfile-qa +++ /dev/null @@ -1,43 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2019 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-frontend-build-qa". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "researchfi-frontend-build-qa") - // Start build and display logs - buildConfig.startBuild().logs("-f") - } - } - } - } - } - } -} \ No newline at end of file diff --git a/openshift/Jenkinsfile-releasetest b/openshift/Jenkinsfile-releasetest deleted file mode 100644 index a9f1969cf..000000000 --- a/openshift/Jenkinsfile-releasetest +++ /dev/null @@ -1,43 +0,0 @@ -// This file is part of the research.fi service -// -// Copyright 2019 Ministry of Education and Culture, Finland -// -// :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -// :license: MIT -pipeline { - agent { - node { - label 'nodejs' - } - } - - environment { - // Get short version of Git commit hash. - GIT_COMMIT_SHORT = sh( - script: "printf \$(git rev-parse --short ${GIT_COMMIT})", - returnStdout: true - ) - } - - stages { - /* - Build image using build config "researchfi-frontend-build-releasetest". - After build is complete, OpenShift's image change trigger automatically updates devel deployment. - Wait until devel pod is ready. - */ - stage('Build image') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // Get build config - def buildConfig = openshift.selector("bc", "researchfi-frontend-build-releasetest") - // Start build and display logs - buildConfig.startBuild().logs("-f") - } - } - } - } - } - } -} \ No newline at end of file diff --git a/openshift/template-deployment-config-devel-branch-production-api.yml b/openshift/template-deployment-config-devel-branch-production-api.yml deleted file mode 100644 index 70e6da0dd..000000000 --- a/openshift/template-deployment-config-devel-branch-production-api.yml +++ /dev/null @@ -1,103 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT - -# Configuration for deploying frontend from 'devel' branch, but using production api. - -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend-devel - template: researchfi-frontend-devel-productiondata - name: researchfi-frontend-devel-productiondata -objects: - # Service (devel) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-service-devel-productiondata - labels: - app: researchfi-frontend-devel - annotations: - description: Research.fi frontend service for devel-branch, using production data - spec: - ports: - - name: frontend-devel-productiondata - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-devel-productiondata - - # Deployment config (development) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-devel-productiondata - labels: - app: researchfi-frontend-devel - spec: - selector: - app: researchfi-frontend-devel - depcfg: frontend-devel-productiondata - template: - metadata: - labels: - app: researchfi-frontend-devel - depcfg: frontend-devel-productiondata - spec: - containers: - - name: frontend-devel-productiondata - image: researchfi/researchfi-frontend-devel - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-devel-productiondata - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-devel-productiondata - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-devel-productiondata - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-devel-productiondata - from: - kind: ImageStreamTag - name: researchfi-frontend-devel:latest - strategy: - type: Rolling diff --git a/openshift/template-devel.yml b/openshift/template-devel.yml deleted file mode 100644 index ca2e2b295..000000000 --- a/openshift/template-devel.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend-devel - template: researchfi-frontend-devel - name: researchfi-frontend-devel -objects: - # Service (devel) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-service-devel - labels: - app: researchfi-frontend-devel - annotations: - description: Research.fi frontend service for devel-branch - spec: - ports: - - name: frontend-devel - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-devel - - # ImageStream (development) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-devel - labels: - app: researchfi-frontend-devel - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-build-devel - labels: - app: researchfi-frontend-devel - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: devel - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: researchfi-frontend-devel:latest - successfulBuildsHistoryLimit: 4 - failedBuildsHistoryLimit: 4 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-pipeline-devel - labels: - app: researchfi-frontend-devel - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: devel - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile-devel - - # Deployment config (development) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-devel - labels: - app: researchfi-frontend-devel - spec: - selector: - app: researchfi-frontend-devel - depcfg: frontend-devel - template: - metadata: - labels: - app: researchfi-frontend-devel - depcfg: frontend-devel - spec: - containers: - - name: frontend-devel - image: researchfi/researchfi-frontend-devel - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-devel - from: - kind: ImageStreamTag - name: researchfi-frontend-devel:latest - strategy: - type: Rolling diff --git a/openshift/template-mydata-demo.yml b/openshift/template-mydata-demo.yml deleted file mode 100644 index 83ffda82b..000000000 --- a/openshift/template-mydata-demo.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2021 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: mydata-demo-frontend - template: mydata-demo-frontend - name: mydata-demo-frontend -objects: - # Service (mydata-demo-frontend) - - apiVersion: v1 - kind: Service - metadata: - name: mydata-demo-frontend-service - labels: - app: mydata-demo-frontend - annotations: - description: Mydata demo frontend service - spec: - ports: - - name: mydata-demo-frontend - port: 8080 - targetPort: 8080 - selector: - depcfg: mydata-demo-frontend-deployment-config - - # ImageStream - - apiVersion: v1 - kind: ImageStream - metadata: - name: mydata-demo-frontend - labels: - app: mydata-demo-frontend - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: mydata-demo-frontend-build - labels: - app: mydata-demo-frontend - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: mydata_demo - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: mydata-demo-frontend:latest - successfulBuildsHistoryLimit: 2 - failedBuildsHistoryLimit: 2 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: mydata-demo-frontend-pipeline - labels: - app: mydata-demo-frontend - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: mydata_demo - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile-mydata-demo-frontend - - # Deployment config - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: mydata-demo-frontend-deployment - labels: - app: mydata-demo-frontend - spec: - selector: - app: mydata-demo-frontend - depcfg: mydata-demo-frontend-deployment-config - template: - metadata: - labels: - app: mydata-demo-frontend - depcfg: mydata-demo-frontend-deployment-config - spec: - containers: - - name: mydata-demo-frontend - image: researchfi/mydata-demo-frontend - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-mydata-demo - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-mydata-demo - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-mydata-demo - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - mydata-demo-frontend - from: - kind: ImageStreamTag - name: mydata-demo-frontend:latest - strategy: - type: Rolling diff --git a/openshift/template-production.yml b/openshift/template-production.yml deleted file mode 100644 index 42919de6c..000000000 --- a/openshift/template-production.yml +++ /dev/null @@ -1,243 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend-production - template: researchfi-frontend-production - name: researchfi-frontend-production -objects: - # Service (staging) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-production-staging-service - labels: - app: researchfi-frontend-production - annotations: - description: Research.fi frontend service for production staging - spec: - ports: - - name: frontend - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-production-staging - - # Service (production) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-production-service - labels: - app: researchfi-frontend-production - annotations: - description: Research.fi frontend service for production - spec: - ports: - - name: frontend - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-production - - # ImageStream (staging) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-production-staging - labels: - app: researchfi-frontend-production - - # ImageStream (production) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-production - labels: - app: researchfi-frontend-production - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-production-build - labels: - app: researchfi-frontend-production - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: master - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: researchfi-frontend-production-staging:latest - successfulBuildsHistoryLimit: 20 - failedBuildsHistoryLimit: 20 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-pipeline-production - labels: - app: researchfi-frontend-production - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: master - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile-production - - # Deployment config (staging) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-production-staging - labels: - app: researchfi-frontend-production - spec: - selector: - app: researchfi-frontend-production - depcfg: frontend-production-staging - template: - metadata: - labels: - app: researchfi-frontend-production - depcfg: frontend-production-staging - spec: - containers: - - name: frontend-production-staging - image: researchfi/researchfi-frontend-production-staging:latest - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-production-staging - from: - kind: ImageStreamTag - name: researchfi-frontend-production-staging:latest - strategy: - type: Rolling - - # Deployment config (production) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-production - labels: - app: researchfi-frontend-production - spec: - selector: - app: researchfi-frontend-production - depcfg: frontend-production - template: - metadata: - labels: - app: researchfi-frontend-production - depcfg: frontend-production - spec: - containers: - - name: frontend-production - image: researchfi/researchfi-frontend-production - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-production - from: - kind: ImageStreamTag - name: researchfi-frontend-production:latest - strategy: - type: Rolling diff --git a/openshift/template-qa.yml b/openshift/template-qa.yml deleted file mode 100644 index 507fbe2ff..000000000 --- a/openshift/template-qa.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend-qa - template: researchfi-frontend-qa - name: researchfi-frontend-qa -objects: - # Service (qa) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-service-qa - labels: - app: researchfi-frontend-qa - annotations: - description: Research.fi frontend service for qa-branch - spec: - ports: - - name: frontend-qa - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-qa - - # ImageStream (qa) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-qa - labels: - app: researchfi-frontend-qa - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-build-qa - labels: - app: researchfi-frontend-qa - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: qa - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: researchfi-frontend-qa:latest - successfulBuildsHistoryLimit: 4 - failedBuildsHistoryLimit: 4 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-pipeline-qa - labels: - app: researchfi-frontend-qa - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: qa - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile-qa - - # Deployment config (qa) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-qa - labels: - app: researchfi-frontend-qa - spec: - selector: - app: researchfi-frontend-qa - depcfg: frontend-qa - template: - metadata: - labels: - app: researchfi-frontend-qa - depcfg: frontend-qa - spec: - containers: - - name: frontend-qa - image: researchfi/researchfi-frontend-qa - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-qa - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-qa - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-qa - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-qa - from: - kind: ImageStreamTag - name: researchfi-frontend-qa:latest - strategy: - type: Rolling diff --git a/openshift/template-releasetest.yml b/openshift/template-releasetest.yml deleted file mode 100644 index 599612a76..000000000 --- a/openshift/template-releasetest.yml +++ /dev/null @@ -1,148 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend-releasetest - template: researchfi-frontend-releasetest - name: researchfi-frontend-releasetest -objects: - # Service (release test) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-service-releasetest - labels: - app: researchfi-frontend-releasetest - annotations: - description: Research.fi frontend service for test-branch - spec: - ports: - - name: frontend-releasetest - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-releasetest - - # ImageStream (release test) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-releasetest - labels: - app: researchfi-frontend-releasetest - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-build-releasetest - labels: - app: researchfi-frontend-releasetest - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: releasetest - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: researchfi-frontend-releasetest:latest - successfulBuildsHistoryLimit: 4 - failedBuildsHistoryLimit: 4 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-pipeline-releasetest - labels: - app: researchfi-frontend-releasetest - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: releasetest - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile-releasetest - - # Deployment config (release test) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-deployment-releasetest - labels: - app: researchfi-frontend-releasetest - spec: - selector: - app: researchfi-frontend-releasetest - depcfg: frontend-releasetest - template: - metadata: - labels: - app: researchfi-frontend-releasetest - depcfg: frontend-releasetest - spec: - containers: - - name: frontend-releasetest - image: researchfi/researchfi-frontend-releasetest - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/fi/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-releasetest - items: - - key: configfile - path: config.json - - key: configfile_auth_fi - path: auth_config.json - - name: config-volume-sv - configMap: - name: frontend-config-releasetest - items: - - key: configfile - path: config.json - - key: configfile_auth_sv - path: auth_config.json - - name: config-volume-en - configMap: - name: frontend-config-releasetest - items: - - key: configfile - path: config.json - - key: configfile_auth_en - path: auth_config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-releasetest - from: - kind: ImageStreamTag - name: researchfi-frontend-releasetest:latest - strategy: - type: Rolling diff --git a/openshift/template.yml b/openshift/template.yml deleted file mode 100644 index 23844d58a..000000000 --- a/openshift/template.yml +++ /dev/null @@ -1,231 +0,0 @@ -# This file is part of the research.fi service -# -# Copyright 2019 Ministry of Education and Culture, Finland -# -# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi -# :license: MIT -apiVersion: v1 -kind: Template -metadata: - labels: - app: researchfi-frontend - template: researchfi-frontend - name: researchfi-frontend -objects: - # Service (development) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-devel-service - labels: - app: researchfi-frontend - annotations: - description: Research.fi frontend service for development - spec: - ports: - - name: frontend - port: 8080 - targetPort: 8080 - selector: - depcfg: frontend-devel - - # Service (production) - - apiVersion: v1 - kind: Service - metadata: - name: researchfi-frontend-production-service - labels: - app: researchfi-frontend - annotations: - description: Research.fi frontend service for production - spec: - ports: - - name: frontend - port: 8081 - targetPort: 8081 - selector: - depcfg: frontend-production - - # ImageStream (development) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-devel - labels: - app: researchfi-frontend - - # ImageStream (production) - - apiVersion: v1 - kind: ImageStream - metadata: - name: researchfi-frontend-production - labels: - app: researchfi-frontend - - # BuildConfig using Docker build strategy - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-build - labels: - app: researchfi-frontend - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: devel - contextDir: . - strategy: - dockerStrategy: - dockerfilePath: openshift/Dockerfile - output: - to: - kind: ImageStreamTag - name: researchfi-frontend-devel:latest - successfulBuildsHistoryLimit: 4 - failedBuildsHistoryLimit: 4 - - # Jenkins pipeline - - apiVersion: v1 - kind: BuildConfig - metadata: - name: researchfi-frontend-pipeline - labels: - app: researchfi-frontend - spec: - source: - git: - uri: https://github.com/CSCfi/research-fi-frontend.git - ref: devel - contextDir: . - strategy: - jenkinsPipelineStrategy: - jenkinsfilePath: openshift/Jenkinsfile - - # Deployment config (development) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-devel-deployment - labels: - app: researchfi-frontend - spec: - selector: - app: researchfi-frontend - depcfg: frontend-devel - template: - metadata: - labels: - app: researchfi-frontend - depcfg: frontend-devel - spec: - containers: - - name: frontend-devel - image: researchfi/researchfi-frontend-devel - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - - name: config-volume-sv - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - - name: config-volume-en - configMap: - name: frontend-config-devel - items: - - key: configfile - path: config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-devel - from: - kind: ImageStreamTag - name: researchfi-frontend-devel:latest - strategy: - type: Rolling - - # Deployment config (production) - - apiVersion: v1 - kind: DeploymentConfig - metadata: - name: researchfi-frontend-production-deployment - labels: - app: researchfi-frontend - spec: - selector: - app: researchfi-frontend - depcfg: frontend-production - template: - metadata: - labels: - app: researchfi-frontend - depcfg: frontend-production - spec: - containers: - - name: frontend-production - image: researchfi/researchfi-frontend-production - imagePullPolicy: Always - ports: - - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config-volume-fi - mountPath: /dist/browser/assets/config - - name: config-volume-sv - mountPath: /dist/browser/sv/assets/config - - name: config-volume-en - mountPath: /dist/browser/en/assets/config - volumes: - - name: config-volume-fi - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - name: config-volume-sv - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - - name: config-volume-en - configMap: - name: frontend-config-production - items: - - key: configfile - path: config.json - replicas: 1 - triggers: - - type: ConfigChange - - type: ImageChange - imageChangeParams: - automatic: true - containerNames: - - frontend-production - from: - kind: ImageStreamTag - name: researchfi-frontend-production:latest - strategy: - type: Rolling