Skip to content

Commit

Permalink
OPSEXP-2730 Add Alfresco Microsoft 365 Connector Docker image (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius authored Aug 13, 2024
1 parent 96dfcfd commit 03c3de7
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
ACS_CHART_VERSION: 8.3.0
ACS_VALUES_VERSION: cfb0d426eff14a8b581c31e61db5e670da09ba3b
ARTIFACT_NAME: alfresco-docker-images

concurrency:
Expand Down Expand Up @@ -162,7 +163,7 @@ jobs:
- name: Fetch upstream values for tests
run: >-
curl -ssfL
https://raw.githubusercontent.com/Alfresco/acs-deployment/v${{ env.ACS_CHART_VERSION }}/test/enterprise-integration-test-values.yaml
https://raw.githubusercontent.com/Alfresco/acs-deployment/${{ env.ACS_VALUES_VERSION }}/test/enterprise-integration-test-values.yaml
-o test/helm/enterprise-integration-test-values.yaml &&
ls -l test/helm/enterprise-integration-test-values.yaml &&
cat test/helm/enterprise-integration-test-values.yaml
Expand Down
19 changes: 19 additions & 0 deletions connector/ms365/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM java_base

EXPOSE 9095

ARG ALFRESCO_MS365_GROUP_NAME
ARG ALFRESCO_MS365_GROUP_ID
ARG ALFRESCO_MS365_USER_NAME
ARG ALFRESCO_MS365_USER_ID

ADD onedrive-springboot*.jar /opt/app.jar

RUN groupadd -g ${ALFRESCO_MS365_GROUP_ID} ${ALFRESCO_MS365_GROUP_NAME} && \
useradd -u ${ALFRESCO_MS365_USER_ID} -g ${ALFRESCO_MS365_GROUP_NAME} ${ALFRESCO_MS365_USER_NAME} && \
chgrp ${ALFRESCO_MS365_GROUP_NAME} /opt/app.jar

USER ${ALFRESCO_MS365_USER_NAME}

COPY entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
26 changes: 26 additions & 0 deletions connector/ms365/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Runtime variables

Sets of variables configurable with your docker image

## ms365

```yaml

alfresco-connector-ms365:
image: localhost/alfresco-ooi-service:YOUR-TAG
environment:
JAVA_OPTS: "-Dalfresco.base-url=http://alfresco:8080"
ALFRESCO_ADMIN_PASSWORD: admin
ALFRESCO_ADMIN_USERNAME: admin
ALFRESCO_DEPLOYMODEL_ENABLED: 'true'
ALFRESCO_DEPLOYMODEL_RETRY_INTERVAL: '30000'
ALFRESCO_DEPLOYMODEL_TIMEOUT: '960000'

```

- `JAVA_OPTS` - Additional java options
- `ALFRESCO_ADMIN_USERNAME` - The username for the Alfresco admin account used to authenticate to the repository.
- `ALFRESCO_ADMIN_PASSWORD` - The password for the Alfresco admin account used to authenticate to the repository.
- `ALFRESCO_DEPLOYMODEL_ENABLED` - Enables or disables the deployment of models. Set to `'true'` to enable model deployment, or `'false'` to disable it.
- `ALFRESCO_DEPLOYMODEL_RETRY_INTERVAL` - The interval (in milliseconds) between retry attempts for model deployment. Default is `30000` milliseconds.
- `ALFRESCO_DEPLOYMODEL_TIMEOUT` - The timeout (in milliseconds) for model deployment. Default is `960000` milliseconds.
14 changes: 14 additions & 0 deletions connector/ms365/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"artifacts": {
"acs23": [
{
"name": "onedrive-springboot",
"version": "2.0.2",
"path": "connector/ms365",
"classifier": ".jar",
"repository": "enterprise-releases",
"group": "org.alfresco"
}
]
}
}
2 changes: 2 additions & 0 deletions connector/ms365/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
exec java $JAVA_OPTS -jar /opt/app.jar
35 changes: 34 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "default" {
targets = ["content_service", "enterprise-search", "ats", "tengines"]
targets = ["content_service", "enterprise-search", "ats", "tengines", "connectors"]
}

group "content_service" {
Expand All @@ -18,6 +18,10 @@ group "tengines" {
targets = ["tengine_libreoffice", "tengine_imagemagick", "tengine_tika", "tengine_pdfrenderer", "tengine_misc", "tengine_aio"]
}

group "connectors" {
targets = ["connector_ms365"]
}

variable "LABEL_VENDOR" {
default = "Hyland Software, Inc."
}
Expand Down Expand Up @@ -455,3 +459,32 @@ target "tengine_aio" {
tags = ["localhost/alfresco-transform-core-aio:latest"]
output = ["type=docker"]
}

variable "ALFRESCO_MS365_USER_NAME" {
default = "ooi-user"
}

variable "ALFRESCO_MS365_USER_ID" {
default = "33006"
}

target "connector_ms365" {
context = "./connector/ms365"
dockerfile = "Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
}
args = {
ALFRESCO_MS365_GROUP_NAME = "${ALFRESCO_GROUP_NAME}"
ALFRESCO_MS365_GROUP_ID = "${ALFRESCO_GROUP_ID}"
ALFRESCO_MS365_USER_NAME = "${ALFRESCO_MS365_USER_NAME}"
ALFRESCO_MS365_USER_ID = "${ALFRESCO_MS365_USER_ID}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Microsoft 365 Connector"
"org.opencontainers.image.description" = "Alfresco Microsoft 365 Connector"
}
tags = ["localhost/alfresco-ooi-service:latest"]
output = ["type=docker"]
}
9 changes: 9 additions & 0 deletions test/helm/test-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ alfresco-transform-service:
repository: localhost/alfresco-shared-file-store
tag: latest
#alfresco-sync-service:
alfresco-connector-ms365:
enabled: true
image:
repository: localhost/alfresco-ooi-service
tag: latest
environment:
ALFRESCO_ADMIN_PASSWORD: admin
ALFRESCO_ADMIN_USERNAME: admin
livenessProbe: null
dtas:
additionalArgs:
- --tb=short
Expand Down

0 comments on commit 03c3de7

Please sign in to comment.