-
Notifications
You must be signed in to change notification settings - Fork 10
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
ruby test matrix [INPLAT-41] #3347
Merged
emmettbutler
merged 20 commits into
main
from
emmett.butler/ruby-matrix-libc.arch.runtime
Nov 6, 2024
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3866506
ruby test matrix
emmettbutler 3b2b25b
copypasta
emmettbutler f38a8d9
only ubuntu24
emmettbutler c186c51
3.4-rc
emmettbutler de742e9
more apps
emmettbutler 3637606
try netcat-traditional
emmettbutler d7c13f7
netcat traditional
emmettbutler 7e9ff06
netcat traditional
emmettbutler 2fb52fb
alpine doesnt have apt
emmettbutler 5b61a1d
dont set language
emmettbutler 341e842
add the missing gem to the gemfile
emmettbutler 6fced93
add the missing gem to the gemfile
emmettbutler 6e25da2
add the missing gem to the gemfile
emmettbutler 8935dda
remove unsupported versions
emmettbutler a8d6e8d
remove references to unsupported versions
emmettbutler 4dbb978
remove references to unsupported versions
emmettbutler df7e837
disable failing health checks
emmettbutler bacda5c
redundant
emmettbutler adf662a
Update provision_test-app-ruby-multialpine.yml
emmettbutler b0efbb1
Update provision_test-app-ruby-multicontainer.yml
emmettbutler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 25 additions & 0 deletions
25
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,25 @@ | ||
weblog: | ||
name: test-app-ruby-multialpine | ||
exact_os_branches: [ubuntu24] | ||
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 |
25 changes: 25 additions & 0 deletions
25
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,25 @@ | ||
weblog: | ||
name: test-app-ruby-multicontainer | ||
exact_os_branches: [ubuntu24] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove |
||
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll set this by command line. We should remove this from here, because actually it should work on all vms