Skip to content

Commit

Permalink
Merge pull request #53 from craftercms/develop
Browse files Browse the repository at this point in the history
Updated config to 4.1.1
  • Loading branch information
Alfonso Vásquez Drexler authored Aug 9, 2023
2 parents 765dbc9 + 5f913ba commit 6509635
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 58 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
1. Install kubectl
2. Have a Kubernetes cluster available. For testing the Simple Authoring and Simple Delivery you can used any cluster. If using `minikube`, please run the following commands, to avoid `context deadline exceeded` errors:

- `minikube image pull craftercms/authoring_tomcat:4.0.4`
- `minikube image pull craftercms/delivery_tomcat:4.0.4`
- `minikube image pull docker.elastic.co/elasticsearch/elasticsearch:7.17.1`
- `minikube image pull craftercms/authoring_tomcat:4.1.1`
- `minikube image pull craftercms/authoring_tomcat:4.1.1E`
- `minikube image pull craftercms/delivery_tomcat:4.1.1`
- `minikube image pull craftercms/delivery_tomcat:4.1.1E`
- `minikube image pull craftercms/deployer:4.1.1`
- `minikube image pull craftercms/deployer:4.1.1E`
- `minikube image pull opensearchproject/opensearch:2.8.0`

For the Authoring cluster example, you will need and AWS EKS cluster with the AWS Load Balancer Controller installed: https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html.

Expand Down
29 changes: 16 additions & 13 deletions authoring/cluster/authoring-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,35 +138,38 @@ spec:
initContainers:
# Modifies the crafter-setenv.sh to use the pod ordinal index + offset for the CRAFTER_DB_CLUSTER_SERVER_ID instead of an autogenerated number based on the IP
- name: crafter-setenv-fixer
image: craftercms/authoring_tomcat:4.0.4E
image: craftercms/authoring_tomcat:4.1.1E
volumeMounts:
- name: mnt
mountPath: /mnt
command: ["bash", "-c"]
args: ["sed 's/$BIN/$((100 + ${HOSTNAME##*-}))/' /opt/crafter/bin/crafter-setenv.sh > /mnt/crafter-setenv.sh"]
containers:
# Elasticsearch container
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
# OpenSearch container
- name: opensearch
image: opensearchproject/opensearch:2.8.0
readinessProbe:
httpGet:
path: /_cat/nodes?h=uptime
path: /_cluster/health?wait_for_status=yellow
port: 9200
initialDelaySeconds: 15
periodSeconds: 10
ports:
- containerPort: 9200
volumeMounts:
- name: data
subPath: indexes-es
mountPath: /usr/share/elasticsearch/data
subPath: indexes
mountPath: /usr/share/opensearch/data
- name: logs
subPath: elasticsearch
mountPath: /usr/share/elasticsearch/logs
subPath: search
mountPath: /usr/share/opensearch/logs
env:
- name: discovery.type
value: single-node
- name: ES_JAVA_OPTS
# For example purposes, disables SSL and authentication
- name: plugins.security.disabled
value: 'true'
- name: OPENSEARCH_JAVA_OPTS
value: "-server -Xss1024K -XX:MaxRAMPercentage=70.0"
resources:
requests:
Expand All @@ -177,7 +180,7 @@ spec:
memory: 2.5Gi
# Tomcat container
- name: tomcat
image: craftercms/authoring_tomcat:4.0.4E
image: craftercms/authoring_tomcat:4.1.1E
startupProbe:
httpGet:
path: /api/1/monitoring/status.json?token=defaultManagementToken
Expand Down Expand Up @@ -270,7 +273,7 @@ spec:
memory: 5Gi
# Deployer container
- name: deployer
image: craftercms/deployer:4.0.4E
image: craftercms/deployer:4.1.1E
imagePullPolicy: "Always"
startupProbe:
httpGet:
Expand Down Expand Up @@ -312,7 +315,7 @@ spec:
memory: 2.5Gi
# Git HTTPS server container
- name: git-https-server
image: craftercms/git_https_server:4.0.4E
image: craftercms/git_https_server:4.1.1E
imagePullPolicy: "Always"
ports:
- containerPort: 443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ hazelcast:
namespace: craftercms
service-label-name: hazelcastClusterName
service-label-value: studio_hazelcast_cluster
resolve-not-ready-addresses: true
expose-externally: false
resolve-not-ready-addresses: true
service-port: 5701
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ studio.configuration.management.previewProtectedUrls: >-
/api/1/site/context/graphql/rebuild,
/api/1/site/cache/clear,
/api/1/site/cache/statistics
############################################################
## Preview Deployer ##
############################################################
Expand All @@ -53,12 +54,6 @@ studio.preview.deleteTargetUrl: ${env:DEPLOYER_URL}/api/1/target/delete-if-exist
# URL to the preview repository (aka Sandbox) where authors save work-in-progress
studio.preview.repoUrl: ${env:CRAFTER_DATA_DIR}/repos/sites/{siteName}/sandbox

############################################################
## Preview Search ##
############################################################
studio.preview.search.createUrl: ${env:SEARCH_URL}/api/2/admin/index/create
studio.preview.search.deleteUrl: ${env:SEARCH_URL}/api/2/admin/index/delete/{siteName}

##################################################
## Database ##
##################################################
Expand Down Expand Up @@ -278,7 +273,7 @@ studio.mail.port: ${env:MAIL_PORT}
# You will need to uncomment the Hazelcast and Studio DB Cluster property sections too
# -------------------------------------------------------------------------------------

# Cluster Git URL format for synching members.
# Cluster Git URL format for synching members.
# - Typical SSH URL format: ssh://{username}@{localAddress}{absolutePath}
# - Typical HTTPS URL format: https://{localAddress}/repos/sites
studio.clustering.sync.urlFormat: https://{localAddress}/repos/sites
Expand Down Expand Up @@ -354,12 +349,12 @@ studio.db.cluster.bootstrap.wait.timeout: 180
################################################################
## Search ##
################################################################
# URLs to connect to Elasticsearch
studio.search.urls: ${env:ES_URL}
# The username for Elasticsearch
studio.search.username: ${env:ES_USERNAME}
# The password for Elasticsearch
studio.search.password: ${env:ES_PASSWORD}
# URLs to connect to Search
studio.search.urls: ${env:SEARCH_URL}
# The username for Search
studio.search.username: ${env:SEARCH_USERNAME}
# The password for Search
studio.search.password: ${env:SEARCH_PASSWORD}
# The connection timeout in milliseconds, if set to -1 the default will be used
studio.search.timeout.connect: -1
# The socket timeout in milliseconds, if set to -1 the default will be used
Expand Down Expand Up @@ -390,10 +385,10 @@ studio.search.keepAlive: false
# studio.serverless.delivery.deployer.target.localRepoPath: ${env:CRAFTER_DATA_DIR}/repos/aws/{siteName}
# Parameters for the target template. Please check the deployer template documentation for the possible parameters.
# The following parameters will be sent automatically, and you don't need to specify them: env, site_name, replace,
# disable_deploy_cron, local_repo_path, repo_url, use_crafter_search
# disable_deploy_cron, local_repo_path, repo_url
# studio.serverless.delivery.deployer.target.template.params:
# # The delivery Elasticsearch endpoint (optional is authoring is using the same one, specified in the ES_URL env variable)
# elastic_search_url:
# # The delivery search endpoint (optional is authoring is using the same one, specified in the SEARCH_URL env variable)
# search_url:
# aws:
# # AWS region (optional if specified through default AWS chain)
# region: us-east-1
Expand Down
29 changes: 16 additions & 13 deletions authoring/simple/authoring-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,31 @@ spec:
- name: logs
emptyDir: {}
containers:
# Elasticsearch container for internal authoring/preview search
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
# OpenSearch container for internal authoring/preview search
- name: opensearch
image: opensearchproject/opensearch:2.8.0
readinessProbe:
httpGet:
path: /_cat/nodes?h=uptime
path: /_cluster/health?wait_for_status=yellow
port: 9200
initialDelaySeconds: 15
periodSeconds: 10
ports:
- containerPort: 9200
volumeMounts:
- name: data
subPath: indexes-es
mountPath: /usr/share/elasticsearch/data
subPath: indexes
mountPath: /usr/share/opensearch/data
- name: logs
subPath: elasticsearch
mountPath: /usr/share/elasticsearch/logs
subPath: search
mountPath: /usr/share/opensearch/logs
env:
- name: discovery.type
value: single-node
- name: ES_JAVA_OPTS
# For example purposes, disables SSL and authentication
- name: plugins.security.disabled
value: 'true'
- name: OPENSEARCH_JAVA_OPTS
value: "-server -Xss1024K -XX:MaxRAMPercentage=70.0"
resources:
requests:
Expand All @@ -120,7 +123,7 @@ spec:
memory: 2.5Gi
# Tomcat container
- name: tomcat
image: craftercms/authoring_tomcat:4.0.4
image: craftercms/authoring_tomcat:4.1.1
imagePullPolicy: "Always"
startupProbe:
httpGet:
Expand Down Expand Up @@ -162,7 +165,7 @@ spec:
memory: 5Gi
# Deployer container
- name: deployer
image: craftercms/deployer:4.0.4
image: craftercms/deployer:4.1.1
startupProbe:
httpGet:
path: /api/1/monitoring/status?token=defaultManagementToken
Expand Down Expand Up @@ -208,7 +211,7 @@ spec:
# # Git SSH server container
# # Uncomment if using Git SSH
# - name: git-ssh-server
# image: craftercms/git_ssh_server:4.0.4
# image: craftercms/git_ssh_server:4.1.1
# imagePullPolicy: "Always"
# ports:
# - containerPort: 22
Expand All @@ -221,7 +224,7 @@ spec:
# Git HTTPS server container
# Uncomment if using Git HTTPS
- name: git-https-server
image: craftercms/git_https_server:4.0.4
image: craftercms/git_https_server:4.1.1
imagePullPolicy: "Always"
ports:
- containerPort: 443
Expand Down
27 changes: 15 additions & 12 deletions delivery/simple/delivery-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
# # Uncomment if using the Git SSH server in Authoring
# initContainers:
# - name: ssh-keys-copier
# image: craftercms/delivery_tomcat:4.0.4
# image: craftercms/delivery_tomcat:4.1.1
# volumeMounts:
# - name: ssh-keys
# mountPath: /.ssh
Expand All @@ -94,28 +94,31 @@ spec:
# ssh-keyscan 'authoring-svc-headless' >> /opt/crafter/data/ssh/known_hosts;
# chown -R crafter:crafter /opt/crafter/data/ssh
containers:
# Elasticsearch container
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
# OpenSearch container
- name: opensearch
image: opensearchproject/opensearch:2.8.0
readinessProbe:
httpGet:
path: /_cat/nodes?h=uptime
path: /_cluster/health?wait_for_status=yellow
port: 9200
initialDelaySeconds: 15
periodSeconds: 10
ports:
- containerPort: 9200
volumeMounts:
- name: data
subPath: indexes-es
mountPath: /usr/share/elasticsearch/data
subPath: indexes
mountPath: /usr/share/opensearch/data
- name: logs
subPath: elasticsearch
mountPath: /usr/share/elasticsearch/logs
subPath: search
mountPath: /usr/share/opensearch/logs
env:
- name: discovery.type
value: single-node
- name: ES_JAVA_OPTS
# For example purposes, disables SSL and authentication
- name: plugins.security.disabled
value: 'true'
- name: OPENSEARCH_JAVA_OPTS
value: "-server -Xss1024K -XX:MaxRAMPercentage=70.0"
resources:
requests:
Expand All @@ -126,7 +129,7 @@ spec:
memory: 2.5Gi
# Tomcat container
- name: tomcat
image: craftercms/delivery_tomcat:4.0.4
image: craftercms/delivery_tomcat:4.1.1
startupProbe:
httpGet:
path: /api/1/monitoring/status.json?token=defaultManagementToken
Expand Down Expand Up @@ -167,7 +170,7 @@ spec:
memory: 4Gi
# Deployer container
- name: deployer
image: craftercms/deployer:4.0.4
image: craftercms/deployer:4.1.1
startupProbe:
httpGet:
path: /api/1/monitoring/status?token=defaultManagementToken
Expand Down

0 comments on commit 6509635

Please sign in to comment.