-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NXP-29877: enable ColdStorage CI/CD preview
- Loading branch information
Showing
17 changed files
with
522 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ARG BASE_IMAGE=docker-private.packages.nuxeo.com/nuxeo/nuxeo:11.4.34 | ||
|
||
FROM ${BASE_IMAGE} | ||
|
||
ARG BUILD_TAG | ||
ARG SCM_REF | ||
ARG VERSION | ||
|
||
LABEL org.nuxeo.build-tag=$BUILD_TAG | ||
LABEL org.nuxeo.scm-ref=$SCM_REF | ||
LABEL org.nuxeo.version=$VERSION | ||
|
||
COPY --chown=900:0 nuxeo-coldstorage-package-*.zip /packages/ | ||
COPY --chown=900:0 templates/s3-coldstorage /opt/nuxeo/server/templates/s3-coldstorage | ||
|
||
USER root | ||
RUN /install-packages.sh --offline /packages/*.zip | ||
RUN chown -R 900:0 $NUXEO_HOME \ | ||
&& chmod -R g+rwX $NUXEO_HOME | ||
USER 900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# (C) Copyright 2020 Nuxeo (http://nuxeo.com/) and others. | ||
# | ||
# 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: skaffold/v1beta14 | ||
kind: Config | ||
build: | ||
tagPolicy: | ||
envTemplate: | ||
template: "{{.DOCKER_REGISTRY}}/{{.ORG}}/{{.IMAGE_NAME}}:{{.VERSION}}" | ||
artifacts: | ||
- image: nuxeo-coldstorage | ||
context: ci/docker | ||
kaniko: | ||
dockerfile: Dockerfile | ||
buildContext: | ||
localDir: {} | ||
buildArgs: | ||
BASE_IMAGE: "{{.NUXEO_BASE_IMAGE}}" | ||
BUILD_TAG: "{{.BUILD_TAG}}" | ||
SCM_REF: "{{.GIT_COMMIT}}" | ||
VERSION: "{{.VERSION}}" | ||
cluster: | ||
concurrency: 1 | ||
namespace: napps | ||
dockerConfig: | ||
secretName: jenkins-docker-cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## DO NOT EDIT THIS FILE, USE nuxeo.conf ## | ||
#GLACIER | ||
s3-coldstorage.target=. | ||
nuxeo.glacier.bucket= | ||
nuxeo.glacier.bucket_prefix= |
27 changes: 27 additions & 0 deletions
27
ci/docker/templates/s3-coldstorage/nxserver/config/s3-glacier-blob-provider-config.xml.nxftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<component name="org.nuxeo.ecm.core.coldstorage.ci.test"> | ||
<extension target="org.nuxeo.ecm.core.blob.BlobManager" point="configuration"> | ||
<blobprovider name="glacier"> | ||
<class>org.nuxeo.ecm.blob.s3.S3BlobProvider</class> | ||
<property name="awsid">${nuxeo.aws.accessKeyId}</property> | ||
<property name="awssecret">${nuxeo.aws.secretKey}</property> | ||
<property name="region">${nuxeo.aws.region}</property> | ||
<property name="bucket">${nuxeo.glacier.bucket}</property> | ||
<property name="bucket_prefix">${nuxeo.glacier.bucket_prefix}/</property> | ||
<property name="directdownload">true</property> | ||
<property name="directdownload.expire">3600</property> | ||
<property name="cachesize">100MB</property> | ||
<property name="connection.max">50</property> | ||
<property name="connection.retry">3</property> | ||
<property name="connection.timeout">50000</property> | ||
<property name="socket.timeout">50000</property> | ||
</blobprovider> | ||
</extension> | ||
<extension target="org.nuxeo.ecm.core.blob.DocumentBlobManager" point="configuration"> | ||
<blobdispatcher> | ||
<class>org.nuxeo.ecm.core.blob.DefaultBlobDispatcher</class> | ||
<property name="blob:xpath=coldstorage:coldContent">glacier</property> | ||
<property name="default">default</property> | ||
</blobdispatcher> | ||
</extension> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
dependencies: | ||
- alias: expose | ||
name: exposecontroller | ||
repository: http://chartmuseum.jenkins-x.io | ||
version: 2.3.111 | ||
- alias: cleanup | ||
name: exposecontroller | ||
repository: http://chartmuseum.jenkins-x.io | ||
version: 2.3.111 | ||
- alias: nuxeo | ||
name: nuxeo | ||
version: ~1.0.11 | ||
repository: https://chartmuseum.platform.dev.nuxeo.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: aws-config-napps | ||
annotations: | ||
replicator.v1.mittwald.de/replicate-from: napps/aws-config-napps | ||
data: {} |
8 changes: 8 additions & 0 deletions
8
ci/helm/preview/templates/empty-secret-for-aws-iam-user-credentials.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: aws-iam-user-credentials | ||
annotations: | ||
replicator.v1.mittwald.de/replicate-from: napps/aws-iam-user-credentials | ||
data: {} |
7 changes: 7 additions & 0 deletions
7
ci/helm/preview/templates/empty-secret-for-instance-clid.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: instance-clid | ||
annotations: | ||
replicator.v1.mittwald.de/replicate-from: napps/instance-clid | ||
data: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: napps-tls | ||
annotations: | ||
replicator.v1.mittwald.de/replicate-from: napps/napps-tls | ||
data: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
expose: | ||
Annotations: | ||
helm.sh/hook: post-install,post-upgrade | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
config: | ||
# add tls configuration | ||
domain: napps.dev.nuxeo.com | ||
exposer: Ingress | ||
http: true | ||
tlsacme: true | ||
tlsSecretName: napps-tls | ||
urltemplate: '"{{.Service}}-{{.Namespace}}.{{.Domain}}"' | ||
|
||
cleanup: | ||
Args: | ||
- --cleanup | ||
Annotations: | ||
helm.sh/hook: pre-delete | ||
helm.sh/hook-delete-policy: hook-succeeded | ||
|
||
nuxeo: | ||
fullnameOverride: preview | ||
nuxeo: | ||
podLabels: | ||
branch: "$BRANCH_NAME" | ||
team: napps | ||
resource: pod | ||
usage: preview | ||
service: | ||
annotations: | ||
fabric8.io/expose: "true" | ||
fabric8.io/ingress.annotations: |- | ||
nginx.ingress.kubernetes.io/proxy-body-size: 0 | ||
nginx.ingress.kubernetes.io/server-snippet: ignore_invalid_headers off; | ||
labels: | ||
branch: "$BRANCH_NAME" | ||
team: napps | ||
resource: service | ||
usage: preview | ||
image: | ||
repository: ${DOCKER_REGISTRY}/${ORG}/nuxeo-coldstorage | ||
tag: ${VERSION} | ||
pullPolicy: Always | ||
persistence: | ||
enabled: disable | ||
packages: nuxeo-web-ui-3.1.0-rc.9 amazon-s3-online-storage-$NUXEO_VERSION | ||
livenessProbe: | ||
initialDelaySeconds: 420 | ||
periodSeconds: 20 | ||
successThreshold: 1 | ||
failureThreshold: 5 | ||
timeoutSeconds: 10 | ||
readinessProbe: | ||
periodSeconds: 20 | ||
initialDelaySeconds: 420 | ||
successThreshold: 1 | ||
timeoutSeconds: 10 | ||
failureThreshold: 5 | ||
customParams: |- | ||
org.nuxeo.connect.url=https://nos-preprod-connect.nuxeocloud.com/nuxeo/site/ | ||
nuxeo.templates=default,s3-coldstorage | ||
# AWS | ||
nuxeo.aws.accessKeyId=${env:AWS_ACCESS_KEY} | ||
nuxeo.aws.secretKey=${env:AWS_ACCESS_SECRET} | ||
nuxeo.aws.region=${env:AWS_REGION} | ||
nuxeo.s3storage.bucket_prefix=${env:AWS_S3_BUCKET_PREFIX} | ||
nuxeo.s3storage.bucket=${env:AWS_S3_BUCKET} | ||
nuxeo.glacier.bucket=${env:AWS_S3_GLACIER_BUCKET} | ||
nuxeo.glacier.bucket_prefix=${env:AWS_S3_BUCKET_PREFIX} | ||
customEnvs: | ||
- name: NUXEO_CLID | ||
valueFrom: | ||
secretKeyRef: | ||
name: instance-clid | ||
key: CLID | ||
- name: AWS_ACCESS_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-iam-user-credentials | ||
key: access_key_id | ||
- name: AWS_ACCESS_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-iam-user-credentials | ||
key: secret_access_key | ||
- name: AWS_REGION | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-config-napps | ||
key: region | ||
- name: AWS_S3_BUCKET | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-config-napps | ||
key: coldstorage.bucket | ||
- name: AWS_S3_GLACIER_BUCKET | ||
valueFrom: | ||
secretKeyRef: | ||
name: aws-config-napps | ||
key: coldstorage.bucket.glacier | ||
- name: AWS_S3_BUCKET_PREFIX | ||
value: $BUCKET_PREFIX | ||
tolerations: | ||
- key: team | ||
operator: Equal | ||
value: napps | ||
effect: NoSchedule | ||
nodeSelector: | ||
team: napps | ||
mongodb: | ||
deploy: false | ||
postgresql: | ||
deploy: true | ||
useStatefulSet: true | ||
image: | ||
tag: "11.7.0" | ||
initdbScripts: | ||
db-init.sql: | | ||
CREATE ROLE nuxeo WITH PASSWORD 'nuxeo' LOGIN; | ||
CREATE DATABASE nuxeo ENCODING 'UTF8' OWNER nuxeo; | ||
persistence: | ||
enabled: false | ||
labels: | ||
branch: "$BRANCH_NAME" | ||
resource: deployment | ||
team: napps | ||
usage: preview | ||
resources: | ||
requests: | ||
cpu: 500m | ||
memory: 1Gi | ||
limits: | ||
cpu: 1 | ||
memory: 2Gi | ||
tolerations: | ||
- key: team | ||
operator: Equal | ||
value: napps | ||
effect: NoSchedule | ||
nodeSelector: | ||
team: napps | ||
elasticsearch: | ||
deploy: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.