Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2722 Add ATS trouter image Dockerfile #7

Merged
merged 14 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ats/trouter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM java_base

EXPOSE 8095 8443

ARG GROUPNAME
ARG GROUPID
ARG ROUTERUSERNAME
ARG USERID
pmacius marked this conversation as resolved.
Show resolved Hide resolved

ADD ats/trouter/alfresco-transform-router*.jar /opt/app.jar

RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
useradd -u ${USERID} -G ${GROUPNAME} ${ROUTERUSERNAME} && \
pmacius marked this conversation as resolved.
Show resolved Hide resolved
chgrp -R ${GROUPNAME} /opt/app.jar

USER ${ROUTERUSERNAME}

HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1m \
CMD curl -f http://localhost:8095/actuator/health || exit 1
alxgomz marked this conversation as resolved.
Show resolved Hide resolved

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

Sets of variables configurable with your docker image

## trouter

```yaml

transform-router:
image: alfresco-transform-router:YOUR-TAG
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
-XX:MaxRAMPercentage=80
ACTIVEMQ_URL: nio://activemq:61616
CORE_AIO_URL: http://transform-core-aio:8090
FILE_STORE_URL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file

```
- `JAVA_OPTS` - Additional java options
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
- `CORE_AIO_URL` - Transform Core AIO server
- `ACTIVEMQ_URL` - Alfresco ActiveMQ
- `FILE_STORE_URL` - Alfresco Shared FileStore endpoint
13 changes: 13 additions & 0 deletions ats/trouter/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"artifacts": {
"acs23": [
{
"name": "alfresco-transform-router",
"version": "4.1.3",
"path": "ats/trouter",
"classifier": ".jar",
"group": "org.alfresco"
}
]
}
}
3 changes: 3 additions & 0 deletions ats/trouter/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec java $JAVA_OPTS $JAVA_OPTS_CONTAINER_FLAGS -jar /opt/app.jar
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
50 changes: 45 additions & 5 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "default" {
targets = ["content_service", "enterprise-search"]
targets = ["content_service", "enterprise-search", "ats"]
}

group "content_service" {
Expand All @@ -10,6 +10,10 @@ group "enterprise-search" {
targets = ["search_liveindexing"]
}

group "ats" {
targets = ["ats_trouter"]
}

variable "LABEL_VENDOR" {
default = "Hyland Software, Inc."
}
Expand Down Expand Up @@ -92,7 +96,7 @@ target "java_base" {
"org.opencontainers.image.source" = "$LABEL_SOURCE"
"org.opencontainers.image.authors" = "${LABEL_AUTHOR}"
}
tags = ["alfresco-base-java:${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR}"]
tags = ["localhost/alfresco-base-java:${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR}"]
output = ["type=cacheonly"]
}

Expand Down Expand Up @@ -134,7 +138,7 @@ target "tomcat_base" {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Tomcat"
"org.opencontainers.image.description" = "A base image shipping Tomcat for Alfresco Products"
}
tags = ["alfresco-base-tomcat:tomcat${TOMCAT_MAJOR}-${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR}"]
tags = ["localhost/alfresco-base-tomcat:tomcat${TOMCAT_MAJOR}-${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR}"]
output = ["type=cacheonly"]
}

Expand All @@ -149,7 +153,7 @@ target "repository" {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Content Repository"
"org.opencontainers.image.description" = "Alfresco Content Services Repository"
}
tags = ["alfresco-content-repository:latest"]
tags = ["localhost/alfresco-content-repository:latest"]
output = ["type=docker"]
}

Expand Down Expand Up @@ -187,6 +191,42 @@ target "search_liveindexing" {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing.name}"
"org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing.name} live indexing"
}
tags = ["${liveindexing.artifact}:latest"]
tags = ["localhost/${liveindexing.artifact}:latest"]
output = ["type=docker"]
}

variable "TROUTER_GROUPNAME" {
default = "Alfresco"
}

variable "TROUTER_GROUPID" {
default = "1000"
}

variable "TROUTER_ROUTERUSERNAME" {
pmacius marked this conversation as resolved.
Show resolved Hide resolved
default = "trouter"
}

variable "TROUTER_USERID" {
default = "33016"
}
gionn marked this conversation as resolved.
Show resolved Hide resolved

pmacius marked this conversation as resolved.
Show resolved Hide resolved
target "ats_trouter" {
dockerfile = "./ats/trouter/Dockerfile"
inherits = ["java_base"]
contexts = {
java_base = "target:java_base"
}
args = {
GROUPNAME = "${TROUTER_GROUPNAME}"
GROUPID = "${TROUTER_GROUPID}"
ROUTERUSERNAME = "${TROUTER_ROUTERUSERNAME}"
USERID = "${TROUTER_USERID}"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} ATS Trouter"
"org.opencontainers.image.description" = "Alfresco Transform Service Trouter"
}
tags = ["localhost/alfresco-transform-router:latest"]
output = ["type=docker"]
}
8 changes: 4 additions & 4 deletions docker-compose/docker-compose-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
start_period: 1m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:4.1.2
image: localhost/alfresco-transform-router:latest
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
Expand Down Expand Up @@ -182,17 +182,17 @@ services:
ports:
- "9090:9090"
live-indexing-metadata:
image: alfresco-elasticsearch-live-indexing-metadata:latest
image: localhost/alfresco-elasticsearch-live-indexing-metadata:latest
environment:
SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200
SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616
live-indexing-path:
image: alfresco-elasticsearch-live-indexing-path:latest
image: localhost/alfresco-elasticsearch-live-indexing-path:latest
environment:
SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200
SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616
live-indexing-content:
image: alfresco-elasticsearch-live-indexing-content:latest
image: localhost/alfresco-elasticsearch-live-indexing-content:latest
environment:
SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200
SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
start_period: 1m
transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:4.1.2
image: localhost/alfresco-transform-router:latest
environment:
JAVA_OPTS: >-
-XX:MinRAMPercentage=50
Expand Down Expand Up @@ -182,7 +182,7 @@ services:
ports:
- "9090:9090"
live-indexing:
image: alfresco-elasticsearch-live-indexing:latest
image: localhost/alfresco-elasticsearch-live-indexing:latest
environment:
SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200
SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616
Expand Down