From 64173f60d7f372a27de5800d96fd34ac38fa6ea8 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Sat, 20 Jul 2024 23:09:28 -0700 Subject: [PATCH 01/16] Create artillery_config_sebs.yml --- load_generator/artillery_config_sebs.yml | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 load_generator/artillery_config_sebs.yml diff --git a/load_generator/artillery_config_sebs.yml b/load_generator/artillery_config_sebs.yml new file mode 100644 index 00000000..76001cf8 --- /dev/null +++ b/load_generator/artillery_config_sebs.yml @@ -0,0 +1,32 @@ +config: + target: 'http://host.docker.internal:9011' + phases: + - duration: 60 + arrivalRate: 1 + + rampTo: 20 + name: "Ramp-up phase" + - duration: 60 + arrivalRate: 20 + rampTo: 5 + name: "Ramp down phase" + - duration: 60 + arrivalRate: 5 + rampTo: 20 + name: "Ramp up phase" + - duration: 60 + arrivalRate: 20 + rampTo: 5 + name: "Ramp down phase" + - duration: 60 + arrivalRate: 5 + rampTo: 20 + name: "Ramp up phase" + +scenarios: + - flow: + - post: + url: "/post" + json: "{{ payload }}" + + payload: "{{ $processEnvironment.PAYLOAD_FILE }}" From c5b97faef1f61bcbcb798e50ca60848f42f464d1 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:20:14 -0700 Subject: [PATCH 02/16] Add files via upload --- load_generator/artillery_generator.py | 63 +++++++++++++++++++++++++++ load_generator/load_test_config.yaml | 45 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 load_generator/artillery_generator.py create mode 100644 load_generator/load_test_config.yaml diff --git a/load_generator/artillery_generator.py b/load_generator/artillery_generator.py new file mode 100644 index 00000000..fc64a64b --- /dev/null +++ b/load_generator/artillery_generator.py @@ -0,0 +1,63 @@ +import yaml +import sys +import argparse + +def create_yaml_config(max_users, frequency, cycles): + config = { + 'config': { + 'target': 'http://172.17.0.2:9000', + 'phases': [] + }, + 'scenarios': [ + { + 'flow': [ + { + 'post': { + 'url': '/post', + 'json': '{{ payload }}' + } + } + ] + } + ], + 'payload': '{{ $processEnvironment.PAYLOAD_FILE }}' + } + + for i in range(cycles): + config['config']['phases'].extend([ + { + 'duration': frequency, + 'arrivalRate': 1 if i == 0 else 5, + 'rampTo': max_users, + 'name': f'Ramp-up phase {i+1}' + }, + { + 'duration': frequency, + 'arrivalRate': max_users, + 'rampTo': 5, + 'name': f'Ramp down phase {i+1}' + } + ]) + + # Remove the last ramp down phase + config['config']['phases'].pop() + + return config + +def main(): + parser = argparse.ArgumentParser(description='Generate YAML config for load testing') + parser.add_argument('max_users', type=int, help='Maximum number of users') + parser.add_argument('frequency', type=int, help='Duration of each phase in seconds') + parser.add_argument('cycles', type=int, help='Number of cycles') + + args = parser.parse_args() + + config = create_yaml_config(args.max_users, args.frequency, args.cycles) + + with open('load_test_config.yaml', 'w') as f: + yaml.dump(config, f, default_flow_style=False) + + print("YAML configuration file 'load_test_config.yaml' has been created.") + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/load_generator/load_test_config.yaml b/load_generator/load_test_config.yaml new file mode 100644 index 00000000..8a8ce5d7 --- /dev/null +++ b/load_generator/load_test_config.yaml @@ -0,0 +1,45 @@ +config: + phases: + - arrivalRate: 1 + duration: 5 + name: Ramp-up phase 1 + rampTo: 100 + - arrivalRate: 100 + duration: 5 + name: Ramp down phase 1 + rampTo: 5 + - arrivalRate: 5 + duration: 5 + name: Ramp-up phase 2 + rampTo: 100 + - arrivalRate: 100 + duration: 5 + name: Ramp down phase 2 + rampTo: 5 + - arrivalRate: 5 + duration: 5 + name: Ramp-up phase 3 + rampTo: 100 + - arrivalRate: 100 + duration: 5 + name: Ramp down phase 3 + rampTo: 5 + - arrivalRate: 5 + duration: 5 + name: Ramp-up phase 4 + rampTo: 100 + - arrivalRate: 100 + duration: 5 + name: Ramp down phase 4 + rampTo: 5 + - arrivalRate: 5 + duration: 5 + name: Ramp-up phase 5 + rampTo: 100 + target: http://172.17.0.2:9000 +payload: '{{ $processEnvironment.PAYLOAD_FILE }}' +scenarios: +- flow: + - post: + json: '{{ payload }}' + url: /post From c52bbd35e31eef7e4849df6ff4efd605dad92c8e Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:21:01 -0700 Subject: [PATCH 03/16] Create 210_payload.json Adds the payload for 210.thumbnailer benchmark --- load_generator/payloads/210_payload.json | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 load_generator/payloads/210_payload.json diff --git a/load_generator/payloads/210_payload.json b/load_generator/payloads/210_payload.json new file mode 100644 index 00000000..0f75c77e --- /dev/null +++ b/load_generator/payloads/210_payload.json @@ -0,0 +1,50 @@ +{ + "functions": [ + { + "benchmark": "210.thumbnailer", + "config": { + "architecture": "x86", + "memory": 256, + "runtime": { + "language": "python", + "version": "3.7" + }, + "timeout": 60 + }, + "hash": "442f3e4db7130c83a19c23ecd82efb70", + "instance_id": "67f07668974637517d711c11b9d1c761f7dd571af6ad2173019aec143dcf7a2a", + "name": "210.thumbnailer-python-3.7", + "port": 9000, + "triggers": [], + "url": "172.17.0.3:9000" + } + ], + "inputs": [ + { + "bucket": { + "bucket": "sebs-benchmarks-local-0cf48662", + "input": "210.thumbnailer-0-input", + "output": "210.thumbnailer-0-output" + }, + "object": { + "height": 200, + "key": "6_astronomy-desktop-wallpaper-evening-1624438.jpg", + "width": 200 + } + } + ], + "storage": { + "access_key": "GNAZaCZQiH0sd-cZfpXN-2DextknZwjN5JezJ2wiciw", + "address": "172.17.0.2:9000", + "input_buckets": [ + "210.thumbnailer-0-input" + ], + "instance_id": "69161516e1cd11774ba54925d1828a14b6e43ca389468897bc7fa3bedb339f54", + "mapped_port": 9011, + "output_buckets": [ + "210.thumbnailer-0-output" + ], + "secret_key": "ae8704512eda16b6b5aa0cc267192b0fbdc931eb78acd8dba417c27c2badb735", + "type": "minio" + } +} From 9d50346c755127159d76896bfa2b67f894a388aa Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:26:49 -0700 Subject: [PATCH 04/16] Create readme.md adds explanation and directions for the code --- load_generator/readme.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 load_generator/readme.md diff --git a/load_generator/readme.md b/load_generator/readme.md new file mode 100644 index 00000000..e4aa72b0 --- /dev/null +++ b/load_generator/readme.md @@ -0,0 +1,26 @@ +# SeBS Load Generator + +## Overview + +This tool allows the user to specify parameters for entry into a docker container. + +## New Prerequisites +- Artillery +- Pyyaml + +## Setup + +### 1. Install Dependencies + +`pip install artillery pyyaml` + +### 2. Build Config File + +`python artillery_generator ` + +### 3. Run the File + +`export PAYLOAD_FILE=_payload.json ` +`artillery run load_test_config.yml` + +### 4. Enjoy! From 7694c10a377ebdc0ec65799d3038aa41fee68644 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:27:17 -0700 Subject: [PATCH 05/16] Delete load_generator/artillery_config_sebs.yml removed unnecessary files --- load_generator/artillery_config_sebs.yml | 32 ------------------------ 1 file changed, 32 deletions(-) delete mode 100644 load_generator/artillery_config_sebs.yml diff --git a/load_generator/artillery_config_sebs.yml b/load_generator/artillery_config_sebs.yml deleted file mode 100644 index 76001cf8..00000000 --- a/load_generator/artillery_config_sebs.yml +++ /dev/null @@ -1,32 +0,0 @@ -config: - target: 'http://host.docker.internal:9011' - phases: - - duration: 60 - arrivalRate: 1 - - rampTo: 20 - name: "Ramp-up phase" - - duration: 60 - arrivalRate: 20 - rampTo: 5 - name: "Ramp down phase" - - duration: 60 - arrivalRate: 5 - rampTo: 20 - name: "Ramp up phase" - - duration: 60 - arrivalRate: 20 - rampTo: 5 - name: "Ramp down phase" - - duration: 60 - arrivalRate: 5 - rampTo: 20 - name: "Ramp up phase" - -scenarios: - - flow: - - post: - url: "/post" - json: "{{ payload }}" - - payload: "{{ $processEnvironment.PAYLOAD_FILE }}" From 1bfc8017909c5899b8ece6740bf1e65544d214c5 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:28:04 -0700 Subject: [PATCH 06/16] Update readme.md --- load_generator/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_generator/readme.md b/load_generator/readme.md index e4aa72b0..4bc6aef1 100644 --- a/load_generator/readme.md +++ b/load_generator/readme.md @@ -20,7 +20,7 @@ This tool allows the user to specify parameters for entry into a docker containe ### 3. Run the File -`export PAYLOAD_FILE=_payload.json ` +`export PAYLOAD_FILE=/payloads/_payload.json ` /n `artillery run load_test_config.yml` ### 4. Enjoy! From 8a0cf74906836af18e13aaaf56ad8702ba423e6a Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:28:34 -0700 Subject: [PATCH 07/16] Update readme.md --- load_generator/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_generator/readme.md b/load_generator/readme.md index 4bc6aef1..70b36aff 100644 --- a/load_generator/readme.md +++ b/load_generator/readme.md @@ -20,7 +20,7 @@ This tool allows the user to specify parameters for entry into a docker containe ### 3. Run the File -`export PAYLOAD_FILE=/payloads/_payload.json ` /n +`export PAYLOAD_FILE=/payloads/_payload.json ' < br / > `artillery run load_test_config.yml` ### 4. Enjoy! From e0ecac1641fe2286c71f3fee589e597f292bed99 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:28:56 -0700 Subject: [PATCH 08/16] Update readme.md --- load_generator/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_generator/readme.md b/load_generator/readme.md index 70b36aff..6b99fa73 100644 --- a/load_generator/readme.md +++ b/load_generator/readme.md @@ -20,7 +20,7 @@ This tool allows the user to specify parameters for entry into a docker containe ### 3. Run the File -`export PAYLOAD_FILE=/payloads/_payload.json ' < br / > +`export PAYLOAD_FILE=/payloads/_payload.json ' `artillery run load_test_config.yml` ### 4. Enjoy! From 3810cc9d8dd1709f04ffc1500937c1fe1f9c27c2 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:30:01 -0700 Subject: [PATCH 09/16] Update readme.md --- load_generator/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/load_generator/readme.md b/load_generator/readme.md index 6b99fa73..7c7aa2b3 100644 --- a/load_generator/readme.md +++ b/load_generator/readme.md @@ -20,7 +20,8 @@ This tool allows the user to specify parameters for entry into a docker containe ### 3. Run the File -`export PAYLOAD_FILE=/payloads/_payload.json ' -`artillery run load_test_config.yml` +export PAYLOAD_FILE=/payloads/_payload.json + +artillery run load_test_config.yml ### 4. Enjoy! From ff0741c226310bb80dbc16e664883c971f1e7c1a Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:30:33 -0700 Subject: [PATCH 10/16] Update readme.md --- load_generator/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/load_generator/readme.md b/load_generator/readme.md index 7c7aa2b3..d143fc48 100644 --- a/load_generator/readme.md +++ b/load_generator/readme.md @@ -20,8 +20,8 @@ This tool allows the user to specify parameters for entry into a docker containe ### 3. Run the File -export PAYLOAD_FILE=/payloads/_payload.json +`export PAYLOAD_FILE=/payloads/_payload.json` -artillery run load_test_config.yml +`artillery run load_test_config.yml` ### 4. Enjoy! From 2c65adf9c6ebdc98a81fad6d8572f625de78379d Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:08:08 -0700 Subject: [PATCH 11/16] Update artillery_generator.py --- load_generator/artillery_generator.py | 69 +++++++++++++++++---------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/load_generator/artillery_generator.py b/load_generator/artillery_generator.py index fc64a64b..1cfb5572 100644 --- a/load_generator/artillery_generator.py +++ b/load_generator/artillery_generator.py @@ -1,12 +1,25 @@ import yaml import sys import argparse +import math def create_yaml_config(max_users, frequency, cycles): + """ + Create a YAML configuration for load testing with a sinusoidal pattern. + + :param max_users: Maximum number of concurrent users + :param frequency: Duration of each cycle in seconds + :param cycles: Number of cycles to run + :return: Dictionary containing the YAML configuration + """ + # Define the initial configuration dictionary config = { 'config': { - 'target': 'http://172.17.0.2:9000', - 'phases': [] + 'target': 'http://localhost:9000', # Target URL for the load test + 'phases': [], # List to store the different phases of the load test + 'ensure': { + 'p95': 2000 # Ensure 95% of responses are under 2000ms + } }, 'scenarios': [ { @@ -14,50 +27,56 @@ def create_yaml_config(max_users, frequency, cycles): { 'post': { 'url': '/post', - 'json': '{{ payload }}' + 'json': '{{ payload }}' # JSON payload for the POST request } } ] } ], - 'payload': '{{ $processEnvironment.PAYLOAD_FILE }}' + 'payload': '{{ $processEnvironment.PAYLOAD_FILE }}' # Reference to the environment variable for payload file } + # Generate phases for each cycle for i in range(cycles): - config['config']['phases'].extend([ - { - 'duration': frequency, - 'arrivalRate': 1 if i == 0 else 5, - 'rampTo': max_users, - 'name': f'Ramp-up phase {i+1}' - }, - { - 'duration': frequency, - 'arrivalRate': max_users, - 'rampTo': 5, - 'name': f'Ramp down phase {i+1}' - } - ]) - - # Remove the last ramp down phase - config['config']['phases'].pop() + for j in range(10): # 10 phases per cycle for a smoother sinusoidal pattern + phase_duration = max(1, int(frequency / 10)) # Ensure phase duration is at least 1 second + t = j / 10 # Time variable from 0 to 1 + users = int(max_users * (math.sin(2 * math.pi * t) + 1) / 2) # Calculate users using sine function + + # Append the phase configuration to the phases list + config['config']['phases'].append({ + 'duration': phase_duration, + 'arrivalRate': users, + 'name': f'Cycle {i+1}, Phase {j+1}' + }) return config def main(): + """ + Main function to parse command-line arguments and generate the YAML configuration file. + """ + # Set up command-line argument parser parser = argparse.ArgumentParser(description='Generate YAML config for load testing') - parser.add_argument('max_users', type=int, help='Maximum number of users') - parser.add_argument('frequency', type=int, help='Duration of each phase in seconds') - parser.add_argument('cycles', type=int, help='Number of cycles') + parser.add_argument('max_users', type=int, help='Maximum number of users (1-1000)') + parser.add_argument('frequency', type=int, help='Duration of each cycle in seconds (1-50)') + parser.add_argument('cycles', type=int, help='Number of cycles (1-50)') args = parser.parse_args() + # Apply limits to input parameters + args.max_users = max(1, min(1000, args.max_users)) # Ensure max_users is within 1-1000 + args.frequency = max(1, min(50, args.frequency)) # Ensure frequency is within 1-50 seconds + args.cycles = max(1, min(50, args.cycles)) # Ensure cycles is within 1-50 + + # Generate YAML configuration using the input parameters config = create_yaml_config(args.max_users, args.frequency, args.cycles) + # Write YAML configuration to file with open('load_test_config.yaml', 'w') as f: yaml.dump(config, f, default_flow_style=False) print("YAML configuration file 'load_test_config.yaml' has been created.") if __name__ == '__main__': - main() \ No newline at end of file + main() From 1c460d8a44231c852fa2b97b2d5956b433140d9b Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:09:18 -0700 Subject: [PATCH 12/16] Update artillery_generator.py --- load_generator/artillery_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load_generator/artillery_generator.py b/load_generator/artillery_generator.py index 1cfb5572..498b89c2 100644 --- a/load_generator/artillery_generator.py +++ b/load_generator/artillery_generator.py @@ -15,7 +15,7 @@ def create_yaml_config(max_users, frequency, cycles): # Define the initial configuration dictionary config = { 'config': { - 'target': 'http://localhost:9000', # Target URL for the load test + 'target': 'http://172.17.0.2:9000', # Target URL for the load test 'phases': [], # List to store the different phases of the load test 'ensure': { 'p95': 2000 # Ensure 95% of responses are under 2000ms From 929ef219f560cfcc447783b6f998270411592f48 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:09:33 -0700 Subject: [PATCH 13/16] Delete load_generator/load_test_config.yaml --- load_generator/load_test_config.yaml | 45 ---------------------------- 1 file changed, 45 deletions(-) delete mode 100644 load_generator/load_test_config.yaml diff --git a/load_generator/load_test_config.yaml b/load_generator/load_test_config.yaml deleted file mode 100644 index 8a8ce5d7..00000000 --- a/load_generator/load_test_config.yaml +++ /dev/null @@ -1,45 +0,0 @@ -config: - phases: - - arrivalRate: 1 - duration: 5 - name: Ramp-up phase 1 - rampTo: 100 - - arrivalRate: 100 - duration: 5 - name: Ramp down phase 1 - rampTo: 5 - - arrivalRate: 5 - duration: 5 - name: Ramp-up phase 2 - rampTo: 100 - - arrivalRate: 100 - duration: 5 - name: Ramp down phase 2 - rampTo: 5 - - arrivalRate: 5 - duration: 5 - name: Ramp-up phase 3 - rampTo: 100 - - arrivalRate: 100 - duration: 5 - name: Ramp down phase 3 - rampTo: 5 - - arrivalRate: 5 - duration: 5 - name: Ramp-up phase 4 - rampTo: 100 - - arrivalRate: 100 - duration: 5 - name: Ramp down phase 4 - rampTo: 5 - - arrivalRate: 5 - duration: 5 - name: Ramp-up phase 5 - rampTo: 100 - target: http://172.17.0.2:9000 -payload: '{{ $processEnvironment.PAYLOAD_FILE }}' -scenarios: -- flow: - - post: - json: '{{ payload }}' - url: /post From e980d4fa1ab586d595594853fa72c3becbf3a865 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:02:17 -0700 Subject: [PATCH 14/16] Update artillery_generator.py --- load_generator/artillery_generator.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/load_generator/artillery_generator.py b/load_generator/artillery_generator.py index 498b89c2..44e6cbac 100644 --- a/load_generator/artillery_generator.py +++ b/load_generator/artillery_generator.py @@ -64,11 +64,6 @@ def main(): args = parser.parse_args() - # Apply limits to input parameters - args.max_users = max(1, min(1000, args.max_users)) # Ensure max_users is within 1-1000 - args.frequency = max(1, min(50, args.frequency)) # Ensure frequency is within 1-50 seconds - args.cycles = max(1, min(50, args.cycles)) # Ensure cycles is within 1-50 - # Generate YAML configuration using the input parameters config = create_yaml_config(args.max_users, args.frequency, args.cycles) From faddcc5a76c20b93d0add1dc8aa22c343c569919 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:05:10 -0700 Subject: [PATCH 15/16] Add files via upload Added support for Amazon Linux 2023? --- dockerfiles/aws/nodejs/Dockerfile.buid2023 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dockerfiles/aws/nodejs/Dockerfile.buid2023 diff --git a/dockerfiles/aws/nodejs/Dockerfile.buid2023 b/dockerfiles/aws/nodejs/Dockerfile.buid2023 new file mode 100644 index 00000000..f9654dc5 --- /dev/null +++ b/dockerfiles/aws/nodejs/Dockerfile.buid2023 @@ -0,0 +1,22 @@ +ARG BASE_IMAGE +FROM ${BASE_IMAGE} + +# shadow-utils +RUN dnf install -y shadow-utils && dnf clean all + +ENV GOSU_VERSION 1.14 +# https://github.com/tianon/gosu/releases/tag/1.14 +# key https://keys.openpgp.org/search?q=tianon%40debian.org +RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \ + && chmod +x /usr/local/bin/gosu + +RUN mkdir -p /sebs/ +COPY dockerfiles/nodejs_installer.sh /sebs/installer.sh +COPY dockerfiles/entrypoint.sh /sebs/entrypoint.sh +RUN chmod +x /sebs/entrypoint.sh + +# useradd and groupmod is installed in /usr/sbin which is not in PATH +ENV PATH=/usr/sbin:$PATH +ENV SCRIPT_FILE=/mnt/function/package.sh +CMD /bin/bash /sebs/installer.sh +ENTRYPOINT ["/sebs/entrypoint.sh"] From dd2997ceb2b85ceb0973b14acd7cd844aba426b4 Mon Sep 17 00:00:00 2001 From: aidenh6307 <104961329+aidenh6307@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:05:40 -0700 Subject: [PATCH 16/16] Add files via upload Added support for Amazon Linux 2023? --- dockerfiles/aws/python/Dockerfile.build2023 | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dockerfiles/aws/python/Dockerfile.build2023 diff --git a/dockerfiles/aws/python/Dockerfile.build2023 b/dockerfiles/aws/python/Dockerfile.build2023 new file mode 100644 index 00000000..ff1524aa --- /dev/null +++ b/dockerfiles/aws/python/Dockerfile.build2023 @@ -0,0 +1,24 @@ +ARG BASE_IMAGE +FROM ${BASE_IMAGE} +ARG VERSION +ENV PYTHON_VERSION=${VERSION} + +# shadow-utils, zip +RUN dnf install -y shadow-utils zip && dnf clean all + +ENV GOSU_VERSION 1.14 +# https://github.com/tianon/gosu/releases/tag/1.14 +# key https://keys.openpgp.org/search?q=tianon%40debian.org +RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64" \ + && chmod +x /usr/local/bin/gosu + +RUN mkdir -p /sebs/ +COPY dockerfiles/python_installer.sh /sebs/installer.sh +COPY dockerfiles/entrypoint.sh /sebs/entrypoint.sh +RUN chmod +x /sebs/entrypoint.sh + +# useradd and groupmod is installed in /usr/sbin which is not in PATH +ENV PATH=/usr/sbin:$PATH +ENV SCRIPT_FILE=/mnt/function/package.sh +CMD /bin/bash /sebs/installer.sh +ENTRYPOINT ["/sebs/entrypoint.sh"]