Skip to content

Commit

Permalink
Merge pull request #86 from magento-commerce/develop
Browse files Browse the repository at this point in the history
MCLOUD-8486: Release Cloud Tools
  • Loading branch information
BaDos authored Mar 1, 2022
2 parents 229ad4c + 861ee2e commit 2f3258a
Show file tree
Hide file tree
Showing 114 changed files with 1,559 additions and 179 deletions.
26 changes: 26 additions & 0 deletions .github/.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"templateVersion": "0.1",
"product": {
"name": "Magento Cloud Docker",
"description": "The Magento Cloud Docker implementation deploys Cloud projects to a local workstation so that you can develop and test your code in a simulated Cloud environment"
},
"contacts": {
"team": {
"name": "Magic Mountain",
"DL": "Grp-magento-cloud-all",
"slackChannel": "magic_mountain"
}
},
"ticketTracker": {
"functionalJiraQueue": {
"projectKey": "MCLOUD"
},
"securityJiraQueue": {
"projectKey": "MAGREQ",
"component": "Magento Cloud Engineering"
}
},
"staticScan": {
"enable": false
}
}
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"name": "magento/magento-cloud-docker",
"description": "Magento Cloud Docker",
"type": "magento2-component",
"version": "1.3.0",
"version": "1.3.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"ext-json": "*",
"composer/composer": "^1.0||^2.0",
"composer/semver": "^1.0||^2.0||^3.0",
"illuminate/config": "^5.5",
"symfony/config": "^4.4||^5.1",
"symfony/console": "^2.8||^4.0",
"symfony/dependency-injection": "^3.3||^4.3||^5.1",
"symfony/yaml": "^3.3||^4.0||^5.1"
"composer/composer": "^1.4 || ^2.0",
"composer/semver": "@stable",
"illuminate/config": "^5.5||^8.77",
"symfony/config": "^4.4 || ^5.1",
"symfony/console": "^2.8 || ^4.0 || ^5.1",
"symfony/dependency-injection": "^3.3 || ^4.3 || ^5.1",
"symfony/yaml": "^3.3 || ^4.0 || ^5.1"
},
"require-dev": {
"codeception/codeception": "^4.1",
Expand All @@ -27,7 +27,7 @@
"consolidation/robo": "^1.2",
"phpmd/phpmd": "@stable",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.0"
},
"bin": [
Expand Down
1 change: 1 addition & 0 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\Database\DbSales" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\Redis" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\ElasticSearch" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\OpenSearch" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\Fpm" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\Web" />
<argument type="service" id="Magento\CloudDocker\Compose\ProductionBuilder\Service\Varnish" />
Expand Down
1 change: 1 addition & 0 deletions dist/bin/magento-docker
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ USAGE="Magento Cloud Docker
php 7.3 run a command in a PHP 7.3 container
php 7.4 run a command in a PHP 7.4 container
php 8.0 run a command in a PHP 8.0 container
php 8.1 run a command in a PHP 8.1 container
copy-to copy to container (use --all or specific file/directory)
copy-from copy from container (use --all or specific file/directory)
fix-owns fix ownership to www:www
Expand Down
16 changes: 0 additions & 16 deletions images/elasticsearch/5.2/Dockerfile

This file was deleted.

42 changes: 0 additions & 42 deletions images/elasticsearch/5.2/docker-entrypoint.sh

This file was deleted.

7 changes: 5 additions & 2 deletions images/elasticsearch/6.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:6.5.4

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml

Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/6.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/6.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.15

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/6.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
9 changes: 7 additions & 2 deletions images/elasticsearch/7.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.11.2

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://mirror.rackspace.com\/centos-vault|g' /etc/yum.repos.d/CentOS-Linux-* && \
yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/7.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.2

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/7.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/7.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.7.1

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/7.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.9.3

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.9/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
7 changes: 5 additions & 2 deletions images/elasticsearch/es/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:{%version%}

RUN yum -y install zip
RUN zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
RUN {%fix_repos%}yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache

RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml
{%single_node%}
Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/es/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

if [[ -n "$ES_PLUGINS" ]]; then
echo "Intalling plugins: $ES_PLUGNS"
echo "Installing plugins: $ES_PLUGNS"
for PLUGIN in $ES_PLUGINS
do
./bin/elasticsearch-plugin install -b "$PLUGIN"
Expand Down
2 changes: 1 addition & 1 deletion images/nginx/1.19/etc/vhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ server {
fastcgi_buffers 1024 4k;

fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=18000";
fastcgi_param PHP_VALUE "max_execution_time=18000";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_param MAGE_MODE $MAGE_MODE;
Expand Down
21 changes: 21 additions & 0 deletions images/opensearch/1.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM opensearchproject/opensearch:1.1.0

USER root
RUN yum -y install zip && \
zip -q -d /usr/share/opensearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache
USER opensearch

RUN bin/opensearch-plugin install -b analysis-icu && \
bin/opensearch-plugin install -b analysis-phonetic

ADD docker-healthcheck.sh /docker-healthcheck.sh
ADD docker-entrypoint.sh /docker-entrypoint.sh

HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 9200 9300
12 changes: 12 additions & 0 deletions images/opensearch/1.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -eo pipefail

if [[ -n "$OS_PLUGINS" ]]; then
echo "Installing plugins: $OS_PLUGINS"
for PLUGIN in $OS_PLUGINS
do
./bin/opensearch-plugin install -b "$PLUGIN"
done
fi

/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eo pipefail

if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then
if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then
health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ")
if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then
exit 0
Expand Down
21 changes: 21 additions & 0 deletions images/opensearch/1.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM opensearchproject/opensearch:1.2.1

USER root
RUN yum -y install zip && \
zip -q -d /usr/share/opensearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
yum -y clean all && \
rm -rf /var/cache
USER opensearch

RUN bin/opensearch-plugin install -b analysis-icu && \
bin/opensearch-plugin install -b analysis-phonetic

ADD docker-healthcheck.sh /docker-healthcheck.sh
ADD docker-entrypoint.sh /docker-entrypoint.sh

HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"]

ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 9200 9300
Loading

0 comments on commit 2f3258a

Please sign in to comment.