REPO-3304: helm charts have been moved to acs-community-deployment project

This commit is contained in:
Andrei Rebegea
2018-04-05 13:23:56 +03:00
parent 5ddca4c122
commit 06544068f2
19 changed files with 10 additions and 574 deletions

View File

@@ -7,87 +7,26 @@ The SNAPSHOT version of the artifacts is **never** published.
### Contributing guide ### Contributing guide
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project. Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
This project contains the code for packaging the entire Alfresco Content Services product Community edition. This produces the docker images for alfresco-content-repository-community and the distribution zip for the entire Alfresco Content Services Community product
# General
## General
### Build: ### Build:
* ```mvn clean install``` in the root of the project will build everything. * ```mvn clean install``` in the root of the project will build everything.
## Docker-compose & Kubernetes ## Docker Alfresco
Build and start Alfresco Content Services Community using docker-compose or Kubernetes, containing: On official releases, the image is published: https://hub.docker.com/r/alfresco/alfresco-content-repository-community/tags/
1. Alfresco Repository for community, with:
1.1. Alfresco Share Services amp
1.2. Alfresco AOS amp
1.3. Alfresco vti-bin war - that helps with AOS integration
1.4. Alfresco Google Docs Repo amp
2. Alfresco Share, with:
2.1 Alfresco Google Docks Share amp
3. A Postgres DB
4. Alfresco Solr6
### Docker Compose Instructions: For testing locally:
#### Prerequisite:
* Docker installed locally
#### Steps
1. Go to **docker-compose** folder
2. Run ```docker-compose up```
3. Check that everything starts up with the browser: http://localhost:8082/alfresco and http://localhost:8080/share and http://localhost:8083/solr/
#### Notes:
* Make sure the local machine has the ports (5432, 8080, 8082, 8083) set up in the docker-compose.yml file free.
* The images used in the docker-compose.yml are images that are build in the 'docker-alfresco' and 'docker-share' subfolders of the project - see the relevant sections below
* If you don't have access to the docker-internal.alfresco.com and quay.io images, or if you want custom data in your docker images, you can use the 'docker-alfresco' and 'docker-share' folders to customize and build your customized docker images that are used in the docker-compose project. Just make sure you use proper tags when you create the images and update the docker-compose.yml with these proper tags that you created.
### Kubernetes Instructions:
#### Prerequisite:
* Deploy the infrastructure chart as specified in https://github.com/Alfresco/alfresco-infrastructure-deployment
* A kubernetes secret (quay-registry-secret) with the above mentioned credentials created in your cluster.
**Note!** You do not need to pull this repo in order to deploy Alfresco Content Services in Kubernetes
#### Steps
1. Run ```helm repo add alfresco-incubator http://kubernetes-charts.alfresco.com/incubator``` to add the Alfresco Kubernetes repository to helm.
2. Deploy Alfresco Content Services:
```bash
#On MINIKUBE
helm install alfresco-incubator/alfresco-content-services \
--set dnsaddress="http://$ELBADDRESS:$INFRAPORT" \
--namespace=$DESIREDNAMESPACE
#On AWS
helm install alfresco-incubator/alfresco-content-services \
--set dnsaddress="http://$ELBADDRESS" \
--namespace=$DESIREDNAMESPACE
```
3. After deploying the helm chart you will get information for obtaining the URL for repository, share and solr.
#### Notes:
* The images used in the alfresco-content-services/values.yml are images that are built in the 'docker-alfresco' and 'docker-share' subfolders of the project - see the relevant sections below.
* If you don't have access to the docker-internal.alfresco.com and quay.io images, or if you want custom data in your docker images, you can use the 'docker-alfresco' and 'docker-share' folders to customize and build your customized docker images that are used in the docker-compose project. Just make sure you build them in the minikube docker environment and update the alfresco-content-services/values.yml with the tags that you created.
* You can also change those values when deploying the helm chart by running ```helm install alfresco-incubator/alfresco-content-services --set repository.image.tag="yourTag" --set share.image.tag="yourTag"```.
* Hint: Run ```eval $(minikube docker-env)``` to switch to your minikube docker environment on osx.
## Docker images
These images are used to build the images used by the docker-compose.yml project to bring up an ACS Community, similar to what the installer did/does.
### Docker Alfresco
1. Go to docker-alfreco folder 1. Go to docker-alfreco folder
2. Run *mvn clean install* if you have not done so 2. Run *mvn clean install* if you have not done so
3. Build the docker image: ```docker build . --tag my-acs-repo:6.0.test``` 3. Build the docker image: ```docker build . --tag acr-community:6.0.tag```
4. Check that the image has been created locally with your desired name/tag: ```docker images```
### Docker Share
1. Go to docker-share folder
2. Run *mvn clean install* if you have not done so
3. Build the docker image: ```docker build . --tag my-share:5.2.test```
4. Check that the image has been created locally with your desired name/tag: ```docker images``` 4. Check that the image has been created locally with your desired name/tag: ```docker images```
### Docker-compose & Kubernetes
Use the deployment project if you want the sample docker-compose or helm: https://github.com/Alfresco/acs-community-deployment
## Distribution zip ## Distribution zip
In this folder the distribution zip is build. It contains all the war files, libraries, certificates and settings files you need to deploy Alfresco Content Services Community on the supported application servers.
In this folder the distribution zip is build. It contains all the war files, libraries, certificates and settings files you need to deploy alfresco on the supported application servers.

View File

@@ -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

View File

@@ -1,13 +0,0 @@
name: alfresco-content-services-community
version: 0.0.1
description: A Helm chart for deploying Alfresco Content Services Community
keywords:
- alfresco
- community
- alfresco community
- content
- content services
home: https://www.alfresco.com
sources:
- https://github.com/Alfresco/acs-community-packaging/tree/master/helm
icon: https://avatars0.githubusercontent.com/u/391127?s=200&v=4

View File

@@ -1,10 +0,0 @@
dependencies:
- name: postgresql
version: 0.9.3
repository: https://kubernetes-charts.storage.googleapis.com/
condition: postgresql.enabled
- name: alfresco-infrastructure
version: 0.1.0-DEPLOY-426
condition: alfresco-content-services.alfresco-infrastructure.enabled
repository: http://kubernetes-charts.alfresco.com/incubator

View File

@@ -1,16 +0,0 @@
{{ if .Values.dnsaddress }}
You can access all components of Alfresco Content Services Community using the same root address, but different paths as follows:
Content: {{ .Values.dnsaddress }}/alfresco
Share: {{ .Values.dnsaddress }}/share
Solr: {{ .Values.dnsaddress }}/solr
{{ else }}
If you have a specific DNS address for the cluster please run the following commands to get the application paths:
helm upgrade --reuse-values {{ .Release.Name }} --set dnsaddress="Your DNS address ex: http://myenv.com" alfresco-incubator/alfresco-content-services
{{ end }}

View File

@@ -1,53 +0,0 @@
{{/*
Create a default fully qualified name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "content-services.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Get the Database hostname depending on the Database type
*/}}
{{- define "database.hostname" -}}
{{- if eq ( .Values.database.type | toString ) "postgresql" }}
{{- printf "%s-%s" .Release.Name .Values.postgresql.nameOverride -}}
{{- end }}
{{- end -}}
{{/*
Get the Database port depending on the Database type
*/}}
{{- define "database.port" -}}
{{- if eq ( .Values.database.type | toString ) "postgresql" }}
{{- print .Values.postgresql.service.port -}}
{{- end }}
{{- end -}}
{{/*
Create the Database driver depending on the Database type
*/}}
{{- define "database.driver" -}}
{{- if eq ( .Values.database.type | toString ) "postgresql" }}
{{- print .Values.postgresql.driver -}}
{{- end }}
{{- end -}}
{{/*
Get the Database user depending on the Database type
*/}}
{{- define "database.user" -}}
{{- if eq ( .Values.database.type | toString ) "postgresql" }}
{{- print .Values.postgresql.postgresUser -}}
{{- end }}
{{- end -}}
{{/*
Get the Database password depending on the Database type
*/}}
{{- define "database.password" }}
{{- if eq ( .Values.database.type | toString ) "postgresql" -}}
{{- print .Values.postgresql.postgresPassword -}}
{{- end }}
{{- end -}}

View File

@@ -1,25 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "content-services.fullname" . }}-repository-configmap
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{- if .Values.repository.environment }}
{{- range $key, $val := .Values.repository.environment }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
RELEASE_NAME: {{ .Release.Name }}
CATALINA_OPTS: "-Dalfresco.host={{ template "content-services.fullname" . }}-repository
-Dalfresco.port={{ .Values.repository.service.externalPort }}
-Dshare.host={{ template "content-services.fullname" . }}-share
-Dshare.port={{ .Values.share.service.externalPort }}
-Ddb.driver={{ template "database.driver" . }}
-Ddb.username={{ template "database.user" . }}
-Ddb.password={{ template "database.password" . }}
-Ddb.url=jdbc:{{ .Values.database.type }}://{{ template "database.hostname" . }}:{{ template "database.port" . }}/{{ .Values.postgresql.postgresDatabase }}
-Dsolr.host={{ template "content-services.fullname" . }}-solr
-Dsolr.port={{ .Values.solr.service.externalPort }}"

View File

@@ -1,11 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "content-services.fullname" . }}-share-configmap
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
REPO_HOST: "{{ template "content-services.fullname" . }}-repository"
REPO_PORT: "{{ .Values.repository.service.externalPort }}"

View File

@@ -1,18 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "content-services.fullname" . }}-solr-configmap
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
SOLR_ALFRESCO_HOST: "{{ template "content-services.fullname" . }}-repository"
SOLR_ALFRESCO_PORT: "{{ .Values.repository.service.externalPort }}"
SOLR_SOLR_HOST: "{{ template "content-services.fullname" . }}-solr"
SOLR_SOLR_PORT: "{{ .Values.solr.image.internalPort }}"
{{- if .Values.solr.environment }}
{{- range $key, $val := .Values.solr.environment }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}

View File

@@ -1,42 +0,0 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "content-services.fullname" . }}-repository
labels:
app: {{ template "content-services.fullname" . }}-repository
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.repository.replicaCount }}
template:
metadata:
labels:
app: {{ template "content-services.fullname" . }}-repository
release: {{ .Release.Name }}
spec:
imagePullSecrets:
- name: {{ .Values.registryPullSecrets }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.repository.image.repository }}:{{ .Values.repository.image.tag }}"
imagePullPolicy: {{ .Values.repository.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ template "content-services.fullname" . }}-repository-configmap
ports:
- containerPort: {{ .Values.repository.image.internalPort }}
resources:
{{ toYaml .Values.repository.resources | indent 12 }}
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.repository.data.mountPath }}
subPath: {{ .Values.persistence.repository.data.subPath }}
initContainers:
- name: init-db
image: busybox
command: ['sh', '-c', 'until nc -w1 {{ template "database.hostname" . }} {{ template "database.port" . }}; do echo "waiting for {{ .Values.database.type }}"; sleep 2; done;']
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}

View File

@@ -1,30 +0,0 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "content-services.fullname" . }}-share
labels:
app: {{ template "content-services.fullname" . }}-share
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.share.replicaCount }}
template:
metadata:
labels:
app: {{ template "content-services.fullname" . }}-share
release: {{ .Release.Name }}
spec:
imagePullSecrets:
- name: {{ .Values.registryPullSecrets }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.share.image.repository }}:{{ .Values.share.image.tag }}"
imagePullPolicy: {{ .Values.share.image.pullPolicy }}
ports:
- containerPort: {{ .Values.share.image.internalPort }}
resources:
{{ toYaml .Values.share.resources | indent 12 }}
envFrom:
- configMapRef:
name: {{ template "content-services.fullname" . }}-share-configmap

View File

@@ -1,46 +0,0 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "content-services.fullname" . }}-solr
labels:
app: {{ template "content-services.fullname" . }}-solr
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.solr.replicaCount }}
template:
metadata:
labels:
app: {{ template "content-services.fullname" . }}-solr
release: {{ .Release.Name }}
spec:
imagePullSecrets:
- name: {{ .Values.registryPullSecrets }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.solr.image.repository }}:{{ .Values.solr.image.tag }}"
imagePullPolicy: {{ .Values.solr.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ template "content-services.fullname" . }}-solr-configmap
ports:
- containerPort: {{ .Values.solr.image.internalPort }}
resources:
{{ toYaml .Values.solr.resources | indent 12 }}
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.solr.data.mountPath }}
subPath: {{ .Values.persistence.solr.data.subPath }}
initContainers:
- name: init-db
image: busybox
command: ["sh", "-c", "chown -R 1000:1000 {{ .Values.persistence.solr.data.mountPath }}"]
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.solr.data.mountPath }}
subPath: {{ .Values.persistence.solr.data.subPath }}
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}

View File

@@ -1,15 +0,0 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "content-services.fullname" . }}-repository
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: {{ .Values.repository.ingress.path }}
backend:
serviceName: {{ template "content-services.fullname" . }}-repository
servicePort: {{ .Values.repository.service.externalPort }}

View File

@@ -1,15 +0,0 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "content-services.fullname" . }}-share
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: {{ .Values.share.ingress.path }}
backend:
serviceName: {{ template "content-services.fullname" . }}-share
servicePort: {{ .Values.share.service.externalPort }}

View File

@@ -1,15 +0,0 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "content-services.fullname" . }}-solr
annotations:
kubernetes.io/ingress.class: "nginx"
ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- http:
paths:
- path: {{ .Values.solr.ingress.path }}
backend:
serviceName: {{ template "content-services.fullname" . }}-solr
servicePort: {{ .Values.solr.service.externalPort }}

View File

@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "content-services.fullname" . }}-repository
labels:
app: {{ template "content-services.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.repository.service.type }}
ports:
- port: {{ .Values.repository.service.externalPort }}
targetPort: {{ .Values.repository.image.internalPort }}
name: {{ .Values.repository.service.name }}
selector:
app: {{ template "content-services.fullname" . }}-repository
release: {{ .Release.Name }}

View File

@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "content-services.fullname" . }}-share
labels:
app: {{ template "content-services.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.share.service.type }}
ports:
- port: {{ .Values.share.service.externalPort }}
targetPort: {{ .Values.share.image.internalPort }}
name: {{ .Values.share.service.name }}
selector:
app: {{ template "content-services.fullname" . }}-share
release: {{ .Release.Name }}

View File

@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "content-services.fullname" . }}-solr
labels:
app: {{ template "content-services.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.solr.service.type }}
ports:
- port: {{ .Values.solr.service.externalPort }}
targetPort: {{ .Values.solr.image.internalPort }}
name: {{ .Values.solr.service.name }}
selector:
app: {{ template "content-services.fullname" . }}-solr
release: {{ .Release.Name }}

View File

@@ -1,119 +0,0 @@
# Default values for alfresco-acs.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
registryPullSecrets: quay-registry-secret
repository:
replicaCount: 1
image:
repository: alfresco/alfresco-content-repository-community
tag: "6.0.4-ea"
pullPolicy: Always
internalPort: 8080
service:
name: alfresco
type: NodePort
externalPort: 80
ingress:
path: /alfresco
environment:
JAVA_OPTS: " -Dsolr.base.url=/solr
-Dsolr.secureComms=none
-Dindex.subsystem.name=solr6"
resources:
requests:
memory: "1000Mi"
limits:
memory: "4000Mi"
share:
replicaCount: 1
image:
repository: alfresco/alfresco-share
tag: "6.0.a"
pullPolicy: Always
internalPort: 8080
service:
name: share
type: NodePort
externalPort: 80
ingress:
path: /share
resources:
requests:
memory: "500Mi"
limits:
memory: "1000Mi"
solr:
replicaCount: 1
image:
repository: alfresco/alfresco-search-services
tag: "1.1.0"
pullPolicy: Always
internalPort: 8983
service:
name: solr
type: NodePort
externalPort: 80
ingress:
path: /solr
environment:
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
SOLR_OPTS: "-Dsolr.content.dir=/opt/alfresco-search-services/data/contentstore"
resources:
requests:
memory: "250Mi"
limits:
memory: "500Mi"
persistence:
existingClaim: "alfresco-volume-claim"
repository:
data:
mountPath: "/usr/local/tomcat/alf_data"
subPath: "alfresco-content-services/repository-data"
solr:
data:
mountPath: "/opt/alfresco-search-services/data"
subPath: "alfresco-content-services/solr-data"
alfresco-content-services:
alfresco-infrastructure:
enabled: true
alfresco-infrastructure:
rabbitmq-ha:
enabled: false
activemq:
enabled: false
alfresco-keycloak:
enabled: false
alfresco-activiti-cloud-registry:
enabled: false
alfresco-api-gateway:
enabled: false
database:
type: postgresql
postgresql:
## If true, install the postgresql chart alongside Alfresco Content Services
enabled: true
nameOverride: postgresql-acs
imageTag: "10.1"
postgresUser: alfresco
postgresPassword: alfresco
postgresDatabase: alfresco
persistence:
existingClaim: "alfresco-volume-claim"
subPath: "alfresco-content-services/database-data"
resources:
requests:
memory: "250Mi"
limits:
memory: "500Mi"
driver: org.postgresql.Driver
replicaCount: 1