Commit de2ef7da authored by Nicholas Karsky's avatar Nicholas Karsky
Browse files

File pipeline

parent a6854411
......@@ -27,6 +27,11 @@ variables:
TIME_ZONE: UTC+0
FILE_BUCKET: nice-etching-277309-file
#Azure
AZURE_SERVICE: file
AZURE_BUILD_SUBDIR: provider/file-azure
AZURE_TEST_SUBDIR: testing/file-test-azure
include:
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
......@@ -55,3 +60,7 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
ref: 'master'
file: 'cloud-providers/osdu-gcp-cloudrun.yml'
- project: 'osdu/platform/ci-cd-pipelines'
ref: 'master'
file: 'cloud-providers/azure.yml'
\ No newline at end of file
#####################
# README: Defines a template to be used as a starting point for defining a service pipeline
#####################
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- /**/*.md
- .gitignore
- images/
pr:
autoCancel: true
branches:
include:
- '*'
paths:
exclude:
- /**/*.md
- .gitignore
- images/
resources:
repositories:
- repository: osdu-infrastructure
type: git
name: osdu-r2/osdu-infrastructure
variables:
- group: 'Azure Common Secrets'
- group: 'Azure - Common'
- name: serviceName
value: 'file'
stages:
- template: devops/service-pipelines/build-stage.yml@osdu-infrastructure
parameters:
mavenGoal: 'package'
mavenPublishJUnitResults: true
mavenOptions: '-P file-azure'
copyFileContents: |
pom.xml
provider/file-azure/maven/settings.xml
provider/file-azure/pom.xml
provider/file-azure/target/*.jar
copyFileContentsToFlatten: ''
mavenSettingsFile: './maven/settings.xml'
serviceBase: ${{ variables.serviceName }}
testingRootFolder: 'testing'
- template: devops/service-pipelines/deploy-stages.yml@osdu-infrastructure
parameters:
serviceName: ${{ variables.serviceName }}
testCoreMavenPomFile: 'testing/file-test-core/pom.xml'
testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml'
providers:
- name: Azure
environments: ['demo']
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v2
name: file
appVersion: "latest"
description: Helm Chart for installing file service.
version: 0.1.0
type: application
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
namespace: osdu
spec:
replicas: {{ .Values.global.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
aadpodidbinding: osdu-identity
spec:
volumes:
- name: azure-keyvault
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: azure-keyvault
containers:
- name: {{ .Release.Name }}-{{ .Chart.Name }}
image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: Always
ports:
- containerPort: {{ .Values.service.port }}
#readinessProbe:
#httpGet:
#path: {{ .Values.service.probe.path }}
#port: {{ .Values.service.port }}
volumeMounts:
- name: azure-keyvault
mountPath: "/mnt/azure-keyvault"
readOnly: true
env:
- name: spring.application.name
value: file
- name: server.servlet.contextPath
value: /api/file/v2/
- name: server_port
value: "80"
- name: ACCEPT_HTTP # TEMPORARY UNTIL HTTPS
value: "true"
- name: KEYVAULT_URI
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
name: clientid
key: clientid
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: clientpassword
key: clientpassword
- name: AZURE_AD_APP_RESOURCE_ID
valueFrom:
secretKeyRef:
name: appid
key: appid
- name: AZURE_TENANT_ID
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_TENANT_ID
- name: appinsights_key
valueFrom:
secretKeyRef:
name: appinsights
key: appinsights
- name: AZURE_STORAGE_ACCOUNT
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_STORAGE_ACCOUNT
- name: cosmosdb_account
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_COSMOSDB_HOST
- name: cosmosdb_key
valueFrom:
secretKeyRef:
name: cosmos
key: cosmos
- name: cosmosdb_database
value: osdu-db
- name: LOG_PREFIX
value: file
- name: osdu_entitlements_url
value: http://entitlements-azure/entitlements/v1
- name: osdu_entitlements_app_key
value: "OBSOLETE"
- name: APPLICATION_PORT
value: $(server_port)
- name: SEARCH_HOST
value: http://search-service/api/search/v2
- name: JAVA_HEAP_MEMORY
value: "4096"
- name: ENVIRONMENT
value: dev
- name: TENANT_NAME
value: opendes
- name: osdu_storage_url
value: http://storage/api/storage/v2
- name: keyvault_url
value: $(KEYVAULT_URI)
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
namespace: osdu
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
app: {{ .Chart.Name }}
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
global:
replicaCount: 1
config:
name: file
image:
repository: community.opengroup.org:5555/osdu/platform/system/file
branch: master
tag: lastest
service:
type: ClusterIP
port: 80
probe:
path: /api/file/v2/swagger-ui.html
\ No newline at end of file
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: file
namespace: osdu
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
app: file
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: osdu-gitlab-file
namespace: osdu
spec:
replicas: 1
selector:
matchLabels:
app: file
template:
metadata:
labels:
app: file
aadpodidbinding: osdu-identity
spec:
volumes:
- name: azure-keyvault
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: azure-keyvault
containers:
- name: file
image: community.opengroup.org:5555/osdu/platform/system/file/file-trusted-file-pipeline:a71f1870ab8d7aa4082f594b4430730b5c6d4c8d
imagePullPolicy: Always
ports:
- containerPort: 80
#Omitting bc health check is different for this service
#readinessProbe:
#httpGet:
#path: /api/file/v2/swagger-ui.html
#port: 80
volumeMounts:
- name: azure-keyvault
mountPath: "/mnt/azure-keyvault"
readOnly: true
env:
- name: spring.application.name
value: file
- name: server.servlet.contextPath
value: /api/file/v2/
- name: server_port
value: "80"
- name: ACCEPT_HTTP # TEMPORARY UNTIL HTTPS
value: "true"
- name: KEYVAULT_URI
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
name: clientid
key: clientid
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: clientpassword
key: clientpassword
- name: AZURE_AD_APP_RESOURCE_ID
valueFrom:
secretKeyRef:
name: appid
key: appid
- name: AZURE_TENANT_ID
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_TENANT_ID
- name: appinsights_key
valueFrom:
secretKeyRef:
name: appinsights
key: appinsights
- name: AZURE_STORAGE_ACCOUNT
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_STORAGE_ACCOUNT
- name: cosmosdb_account
valueFrom:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_COSMOSDB_HOST
- name: cosmosdb_key
valueFrom:
secretKeyRef:
name: cosmos
key: cosmos
- name: cosmosdb_database
value: osdu-db
- name: LOG_PREFIX
value: file
- name: osdu_entitlements_url
value: http://entitlements-azure/entitlements/v1
- name: osdu_entitlements_app_key
value: "OBSOLETE"
- name: APPLICATION_PORT
value: $(server_port)
- name: SEARCH_HOST
value: http://search-service/api/search/v2
- name: JAVA_HEAP_MEMORY
value: "4096"
- name: ENVIRONMENT
value: dev
- name: TENANT_NAME
value: opendes
- name: osdu_storage_url
value: http://storage/api/storage/v2
- name: keyvault_url
value: $(KEYVAULT_URI)
#####################
# README: Defines a template to be used as a starting point for defining a service pipeline
#####################
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- /**/*.md
- .gitignore
- images/
pr:
autoCancel: true
branches:
include:
- '*'
paths:
exclude:
- /**/*.md
- .gitignore
- images/
resources:
repositories:
- repository: osdu-infrastructure
type: git
name: osdu-r2/osdu-infrastructure
variables:
- group: 'Azure Common Secrets'
- group: 'Azure - Common'
- name: serviceName
value: 'file'
stages:
- template: devops/service-pipelines/build-stage.yml@osdu-infrastructure
parameters:
mavenGoal: 'package'
mavenPublishJUnitResults: true
mavenOptions: '-P file-azure'
copyFileContents: |
pom.xml
provider/file-azure/maven/settings.xml
provider/file-azure/pom.xml
provider/file-azure/target/*.jar
copyFileContentsToFlatten: ''
mavenSettingsFile: './maven/settings.xml'
serviceBase: ${{ variables.serviceName }}
testingRootFolder: 'testing'
- template: devops/service-pipelines/deploy-stages.yml@osdu-infrastructure
parameters:
serviceName: ${{ variables.serviceName }}
testCoreMavenPomFile: 'testing/file-test-core/pom.xml'
testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml'
providers:
- name: Azure
environments: ['dev']
......@@ -35,7 +35,7 @@
<description>Azure implementation of File service APIs for CosmosDB and Blob Storage</description>
<properties>
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
<spring-boot.repackage.skip>false</spring-boot.repackage.skip>
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment