diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c77793e95db..57fe467801d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,10 @@ onboarding_nodejs: SCENARIO: [ CONTAINER_AUTO_INJECTION_INSTALL_SCRIPT_PROFILING] - ONBOARDING_FILTER_ENV: [dev, prod] ONBOARDING_FILTER_WEBLOG: [test-app-nodejs,test-app-nodejs-multicontainer] - SCENARIO: [INSTALLER_AUTO_INJECTION,SIMPLE_AUTO_INJECTION_PROFILING] + SCENARIO: [SIMPLE_AUTO_INJECTION_PROFILING] + - ONBOARDING_FILTER_ENV: [dev, prod] + ONBOARDING_FILTER_WEBLOG: [test-app-nodejs,test-app-nodejs-multicontainer,test-app-nodejs-multialpine] + SCENARIO: [INSTALLER_AUTO_INJECTION] - ONBOARDING_FILTER_ENV: [dev, prod] ONBOARDING_FILTER_WEBLOG: [test-app-nodejs-16] SCENARIO: [INSTALLER_NOT_SUPPORTED_AUTO_INJECTION] diff --git a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-multicontainer.yml b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-multicontainer.yml index e6eb546d977..23be94b2012 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-multicontainer.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-multicontainer.yml @@ -9,9 +9,17 @@ weblog: local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml - name: copy-nodejs-app local_path: lib-injection/build/docker/nodejs/sample-app + - name: copy-node16-app-dockerfile + local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16 - name: copy-node18-app-dockerfile local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18 - - name: copy-nodesj-alpine-app-dockerfile + - name: copy-node20-app-dockerfile + local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20 + - name: copy-node22-app-dockerfile + local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22 + - name: copy-node-app-dockerfile + local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node + - name: copy-nodejs-alpine-app-dockerfile local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.alpine - name: copy-reverseproxy-dockerfile local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node new file mode 100644 index 00000000000..fc1efde4b99 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node-alpine b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node-alpine new file mode 100644 index 00000000000..19cc45ae409 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node-alpine @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:alpine + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16 b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16 new file mode 100644 index 00000000000..5e164c7e66c --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16 @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:16-slim + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16-alpine b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16-alpine new file mode 100644 index 00000000000..c60d58caf12 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node16-alpine @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:16-alpine + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18 b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18 index 549f4868123..d507c19c5bb 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18 +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18 @@ -1,4 +1,4 @@ -FROM public.ecr.aws/docker/library/node:18 +FROM public.ecr.aws/docker/library/node:18-slim # Create app directory WORKDIR /usr/src/app diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18-alpine b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18-alpine new file mode 100644 index 00000000000..e05d241d6dc --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node18-alpine @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:18-alpine + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20 b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20 new file mode 100644 index 00000000000..936a126a080 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20 @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:20-slim + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20-alpine b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20-alpine new file mode 100644 index 00000000000..f82c3494396 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node20-alpine @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:20-alpine + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22 b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22 new file mode 100644 index 00000000000..965b488b633 --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22 @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:22-slim + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22-alpine b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22-alpine new file mode 100644 index 00000000000..b1a5f4132fe --- /dev/null +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.node22-alpine @@ -0,0 +1,9 @@ +FROM public.ecr.aws/docker/library/node:22-alpine + +# Create app directory +WORKDIR /usr/src/app + +COPY . . + +EXPOSE 18080 +CMD [ "node", "index.js" ] diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy index 82cdb622233..f131f6f168b 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/Dockerfile.reverseproxy @@ -1,3 +1,3 @@ FROM public.ecr.aws/nginx/nginx:stable-perl -COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml index 518c88d4cf0..c9600367a4f 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/docker-compose.yml @@ -10,7 +10,17 @@ services: context: . dockerfile: Dockerfile.reverseproxy healthcheck: - test: "curl -f http://localhost:8080" + test: "curl -f http://localhost:8080" + + node_16: + env_file: "scenario_app.env" + image: system-tests/node_16:latest + restart: always + build: + context: . + dockerfile: Dockerfile.node16 + healthcheck: + test: "curl -f http://localhost:18080" node_18: env_file: "scenario_app.env" @@ -22,6 +32,36 @@ services: healthcheck: test: "curl -f http://localhost:18080" + node_20: + env_file: "scenario_app.env" + image: system-tests/node_20:latest + restart: always + build: + context: . + dockerfile: Dockerfile.node20 + healthcheck: + test: "curl -f http://localhost:18080" + + node_22: + env_file: "scenario_app.env" + image: system-tests/node_22:latest + restart: always + build: + context: . + dockerfile: Dockerfile.node22 + healthcheck: + test: "curl -f http://localhost:18080" + + node: + env_file: "scenario_app.env" + image: system-tests/node:latest + restart: always + build: + context: . + dockerfile: Dockerfile.node + healthcheck: + test: "curl -f http://localhost:18080" + node_alpine: env_file: "scenario_app.env" image: system-tests/node_alpine:latest diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/nginx.conf b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/nginx.conf index d12df9a0de5..b939febb95a 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/nginx.conf +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-multicontainer/nginx.conf @@ -9,9 +9,22 @@ http { '"$request" $status $upstream_addr ' '"$http_referer" "$http_user_agent" "$gzip_ratio"'; + upstream node_16_app { + server node_16:18080; + } upstream node_18_app { server node_18:18080; } + upstream node_20_app { + server node_20:18080; + } + upstream node_22_app { + server node_22:18080; + } + upstream node_app { + server node:18080; + } + upstream node_alpine_app { server node_alpine:18080; } @@ -37,14 +50,31 @@ http { }"; } + location /node_16/ { + proxy_pass http://node_16_app/; + proxy_redirect off; + } location /node_18/ { proxy_pass http://node_18_app/; proxy_redirect off; } + location /node_20/ { + proxy_pass http://node_20_app/; + proxy_redirect off; + } + location /node_22/ { + proxy_pass http://node_22_app/; + proxy_redirect off; + } + location /node/ { + proxy_pass http://node_app/; + proxy_redirect off; + } + location /node_alpine/ { proxy_pass http://node_alpine_app/; proxy_redirect off; } } -} \ No newline at end of file +}