-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby test matrix [INPLAT-41] (#3347)
- Loading branch information
1 parent
df55b74
commit 2a24480
Showing
18 changed files
with
599 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multialpine.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
weblog: | ||
name: test-app-ruby-multialpine | ||
install: | ||
- os_type: linux | ||
copy_files: | ||
- name: copy-multicontainer-run-script | ||
local_path: utils/build/virtual_machine/weblogs/common/create_and_run_app_multicontainer.sh | ||
- name: copy-docker-compose-file | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/docker-compose.yml | ||
- name: copy-ruby-app | ||
local_path: lib-injection/build/docker/ruby | ||
- name: copy-ruby3_2-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_2-alpine | ||
- name: copy-ruby3_1-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_1-alpine | ||
- name: copy-ruby3_0-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_0-alpine | ||
- name: copy-ruby2_7-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_7-alpine | ||
- name: copy-reverseproxy-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.reverseproxy | ||
- name: copy-reverseproxy-conf | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/nginx.conf | ||
remote-command: sh create_and_run_app_multicontainer.sh |
24 changes: 24 additions & 0 deletions
24
utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multicontainer.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
weblog: | ||
name: test-app-ruby-multicontainer | ||
install: | ||
- os_type: linux | ||
copy_files: | ||
- name: copy-multicontainer-run-script | ||
local_path: utils/build/virtual_machine/weblogs/common/create_and_run_app_multicontainer.sh | ||
- name: copy-docker-compose-file | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/docker-compose.yml | ||
- name: copy-ruby-app | ||
local_path: lib-injection/build/docker/ruby | ||
- name: copy-ruby3_2-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_2 | ||
- name: copy-ruby3_1-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_1 | ||
- name: copy-ruby3_0-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_0 | ||
- name: copy-ruby2_7-app-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_2_7 | ||
- name: copy-reverseproxy-dockerfile | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.reverseproxy | ||
- name: copy-reverseproxy-conf | ||
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/nginx.conf | ||
remote-command: sh create_and_run_app_multicontainer.sh |
3 changes: 3 additions & 0 deletions
3
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.reverseproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM public.ecr.aws/nginx/nginx:stable-perl | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf |
27 changes: 27 additions & 0 deletions
27
...s/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_7-alpine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM public.ecr.aws/docker/library/ruby:2.7-alpine | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set timezone to UTC by default | ||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# Upgrade RubyGems and Bundler | ||
RUN gem update --system 3.4.1 | ||
RUN gem install bundler -v '~> 2.3.26' | ||
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME" | ||
ENV BUNDLE_SILENCE_ROOT_WARNING 1 | ||
|
||
# Setup directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Add files | ||
COPY lib_injection_rails_app /app | ||
|
||
# Install gems | ||
RUN bundle install | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["bin/rails server -b 0.0.0.0 -p 18080"] |
27 changes: 27 additions & 0 deletions
27
...s/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_0-alpine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM public.ecr.aws/docker/library/ruby:3.0-alpine | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set timezone to UTC by default | ||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# Upgrade RubyGems and Bundler | ||
RUN gem update --system 3.4.1 | ||
RUN gem install bundler -v '~> 2.3.26' | ||
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME" | ||
ENV BUNDLE_SILENCE_ROOT_WARNING 1 | ||
|
||
# Setup directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Add files | ||
COPY lib_injection_rails_app /app | ||
|
||
# Install gems | ||
RUN bundle install | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["bin/rails server -b 0.0.0.0 -p 18080"] |
27 changes: 27 additions & 0 deletions
27
...s/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_1-alpine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM public.ecr.aws/docker/library/ruby:3.1-alpine | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set timezone to UTC by default | ||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# Upgrade RubyGems and Bundler | ||
RUN gem update --system 3.4.1 | ||
RUN gem install bundler -v '~> 2.3.26' | ||
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME" | ||
ENV BUNDLE_SILENCE_ROOT_WARNING 1 | ||
|
||
# Setup directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Add files | ||
COPY lib_injection_rails_app /app | ||
|
||
# Install gems | ||
RUN bundle install | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["bin/rails server -b 0.0.0.0 -p 18080"] |
27 changes: 27 additions & 0 deletions
27
...s/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_2-alpine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM public.ecr.aws/docker/library/ruby:3.2-alpine | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set timezone to UTC by default | ||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# Upgrade RubyGems and Bundler | ||
RUN gem update --system 3.4.1 | ||
RUN gem install bundler -v '~> 2.3.26' | ||
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME" | ||
ENV BUNDLE_SILENCE_ROOT_WARNING 1 | ||
|
||
# Setup directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Add files | ||
COPY lib_injection_rails_app /app | ||
|
||
# Install gems | ||
RUN bundle install | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["bin/rails server -b 0.0.0.0 -p 18080"] |
53 changes: 53 additions & 0 deletions
53
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: '2' | ||
|
||
services: | ||
reverseproxy: | ||
image: reverseproxy:latest | ||
ports: | ||
- 5985:8080 | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.reverseproxy | ||
healthcheck: | ||
test: "curl -f http://localhost:8080" | ||
|
||
ruby_3_2: | ||
env_file: "scenario_app.env" | ||
image: system-tests/ruby_3_2:latest | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ruby_3_2-alpine | ||
healthcheck: | ||
test: "curl -f http://localhost:18080" | ||
|
||
ruby_3_1: | ||
env_file: "scenario_app.env" | ||
image: system-tests/ruby_3_1:latest | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ruby_3_1-alpine | ||
healthcheck: | ||
test: "curl -f http://localhost:18080" | ||
|
||
ruby_3_0: | ||
env_file: "scenario_app.env" | ||
image: system-tests/ruby_3_0:latest | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ruby_3_0-alpine | ||
healthcheck: | ||
test: "curl -f http://localhost:18080" | ||
|
||
ruby_2_7: | ||
env_file: "scenario_app.env" | ||
image: system-tests/ruby_2_7:latest | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ruby_2_7-alpine | ||
healthcheck: | ||
test: "curl -f http://localhost:18080" |
71 changes: 71 additions & 0 deletions
71
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/nginx.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
worker_processes 1; | ||
|
||
events { worker_connections 1024; } | ||
|
||
|
||
http { | ||
|
||
log_format compression '$remote_addr - $remote_user [$time_local] ' | ||
'"$request" $status $upstream_addr ' | ||
'"$http_referer" "$http_user_agent" "$gzip_ratio"'; | ||
|
||
upstream ruby_3_2_app { | ||
server ruby_3_2:18080; | ||
} | ||
upstream ruby_3_1_app { | ||
server ruby_3_1:18080; | ||
} | ||
upstream ruby_3_0_app { | ||
server ruby_3_0:18080; | ||
} | ||
upstream ruby_2_7_app { | ||
server ruby_2_7:18080; | ||
} | ||
server { | ||
listen 8080; | ||
access_log /var/log/nginx/access.log compression; | ||
|
||
location / { | ||
default_type application/json; | ||
return 200 "{ | ||
'app_type':'multicontainer', | ||
'apps':[{ | ||
'runtime':'3.2', | ||
'type':'alpine', | ||
'url':'/ruby_3_2/' | ||
},{ | ||
'runtime':'3.1', | ||
'type':'alpine', | ||
'url':'/ruby_3_1/' | ||
},{ | ||
'runtime':'3.0', | ||
'type':'alpine', | ||
'url':'/ruby_3_0/' | ||
},{ | ||
'runtime':'2.7', | ||
'type':'alpine', | ||
'url':'/ruby_2_7/' | ||
} | ||
] | ||
}"; | ||
} | ||
|
||
location /ruby_3_2/ { | ||
proxy_pass http://ruby_3_2_app/; | ||
proxy_redirect off; | ||
} | ||
location /ruby_3_1/ { | ||
proxy_pass http://ruby_3_1_app/; | ||
proxy_redirect off; | ||
} | ||
location /ruby_3_0/ { | ||
proxy_pass http://ruby_3_0_app/; | ||
proxy_redirect off; | ||
} | ||
location /ruby_2_7/ { | ||
proxy_pass http://ruby_2_7_app/; | ||
proxy_redirect off; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...s/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.reverseproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM public.ecr.aws/nginx/nginx:stable-perl | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf |
46 changes: 46 additions & 0 deletions
46
utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_2_7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM public.ecr.aws/docker/library/ruby:2.7 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install prerequisites | ||
RUN set -ex && \ | ||
echo "===> Installing dependencies" && \ | ||
apt-get -y update && \ | ||
apt-get install -y --force-yes --no-install-recommends \ | ||
curl wget tar gzip gnupg apt-transport-https ca-certificates tzdata locales && \ | ||
\ | ||
echo "===> Installing database libraries" && \ | ||
apt-get install -y --force-yes --no-install-recommends sqlite3 && \ | ||
\ | ||
echo "===> Installing dev tools" && \ | ||
mkdir -p /usr/share/man/man1 && \ | ||
apt-get install -y --force-yes --no-install-recommends \ | ||
sudo git openssh-client rsync vim \ | ||
net-tools netcat-traditional parallel unzip zip bzip2 && \ | ||
\ | ||
echo "===> Cleaning up" && \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Set timezone to UTC by default | ||
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# Upgrade RubyGems and Bundler | ||
RUN gem update --system 3.4.1 | ||
RUN gem install bundler -v '~> 2.3.26' | ||
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME" | ||
ENV BUNDLE_SILENCE_ROOT_WARNING 1 | ||
|
||
# Setup directory | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Add files | ||
COPY lib_injection_rails_app /app | ||
|
||
# Install gems | ||
RUN bundle install | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["bin/rails server -b 0.0.0.0 -p 18080"] |
Oops, something went wrong.