@@ -73,7 +73,7 @@ Connect to the virtual machine and run the following commands to get everything
7373 ` ` `
7474 * Add to ` PATH` :
7575 ` ` ` shell
76- ` source $HOME /.local/bin/env
76+ ` source $HOME /.local/bin/env`
7777 ` ` `
7878 * Install libraries from ` pyproject.toml` file:
7979 ` ` ` shell
@@ -127,6 +127,32 @@ The `card_data/infrastructure/` directory has the following files:
127127Although the files are included in this repository, they need to be moved or created in a specific directory on
128128the Linux virtual machine.
129129
130+ ##### Prerequisites
131+
132+ Before copying or creating the scripts, ensure the following system tools are installed.
133+ These are required by the shell scripts:
134+
135+ - **`netcat` (nc)**: Used by `wait-for-rds.sh` to check RDS availability
136+ - **`jq`**: Used by `start-dagster.sh` to parse JSON from AWS Secrets Manager
137+
138+ For **Debian/Ubuntu** systems, install with:
139+
140+ ```shell
141+ sudo apt update && sudo apt install -y netcat jq
142+ ```
143+
144+ For other platforms, use the appropriate package manager:
145+
146+ - **RHEL/CentOS/Amazon Linux**: `sudo yum install -y nc jq` or `sudo dnf install -y nc jq`
147+ - **macOS**: `brew install netcat jq`
148+ - **Alpine Linux**: `apk add netcat-openbsd jq`
149+
150+ !!! warning
151+
152+ Without these tools installed, the scripts will fail with errors like
153+ "command not found" when systemd attempts to run them.
154+
155+
130156#### Copy Files
131157Copy or move the files from the checked out repository to the proper directory on the Linux machine (_the files must first
132158be edited to match project specific configuration. Such as the proper RDS instance name in `wait-for-rds.sh`_):
@@ -162,6 +188,10 @@ First, create `dagster.service`
162188 WorkingDirectory=/home/ubuntu/card_data/card_data
163189 Environment="AWS_DEFAULT_REGION=us-west-2"
164190 Environment="PATH=/home/ubuntu/card_data/card_data/.venv/bin:/usr/local/bin:/usr/bin:/bin"
191+ NoNewPrivileges=true
192+ PrivateTmp=true
193+ ProtectSystem=strict
194+ ProtectHome=read-only
165195 ExecStartPre=/home/ubuntu/wait-for-rds.sh
166196 ExecStart=/home/ubuntu/start-dagster.sh
167197 Restart=on-failure
0 commit comments