# Adding New BASTA Grids (Project Owners) This guide is for project owners who manage BASTA grids in production. ## Why this process exists The Nectar production instance has a small system disk (~30 GB). Grid files must be stored on the attached data volume, not on the main server disk. ## Before you start - You have SSH access to the production host. - You have Django admin credentials for BASTA-Web. - You know the mounted path for the attached grid volume (ask another project owner if unsure). ## Step 1: Connect to the production server SSH into the Nectar production host. ```bash ssh ubuntu@basta-web.cloud.edu.au ``` If DNS is unavailable, use the host IP: ```bash ssh ubuntu@136.186.108.251 ``` ## Step 2: Upload or download the grid onto the attached volume Choose one method: 1. Upload from your local machine using `scp`. 2. Download directly on the server using the BASTA download CLI. The target path must be on the attached volume (example from production style path): ```text /mnt/grid_data/dust_maps/bayestar/.hdf5 ``` ### Option A: `scp` from local machine Run from your local machine: ```bash scp /local/path/.hdf5 ubuntu@basta-web.cloud.edu.au:/mnt/grid_data/dust_maps/bayestar/ ``` IP fallback: ```bash scp /local/path/.hdf5 ubuntu@136.186.108.251:/mnt/grid_data/dust_maps/bayestar/ ``` ### Option B: BASTA download CLI on the server Run on the production server: ```bash BASTAdownload --output /mnt/grid_data/dust_maps/ ``` ## Step 3: Confirm the file exists at the final path On the production server: ```bash ls -lh /mnt/grid_data/dust_maps//.hdf5 ``` Copy the full absolute path. You will paste this into Django admin. ## Step 4: Add the grid record in Django admin 1. Sign in to BASTA-Web admin with your project-owner credentials: - `https://basta-web.cloud.edu.au/admin/` 2. Open **Grid models**. 3. Click **Add Grid model**. 4. Fill in the required fields: - `name`: human-readable grid name. - `file_path`: full absolute path on the attached volume (from Step 3). - `grid_type`: `Isochrone` or `Stellar tracks`. - `default`: only set this if this should become the default for that grid type. 5. Save. ## Step 5: Sanity check in the web app Create a quick test run in BASTA-Web and verify the new grid appears and runs. ## Common issues - **Grid path is on the main disk**: move the file to the attached volume and update `file_path`. - **File not found when running BASTA**: check for typos and confirm read permissions for the Django/worker user. - **Wrong grid selected by default**: edit the grid and update the `default` toggle. ## Notes for project owners - Do not store admin passwords in this repository. - Hostname/IP and URL are acceptable to document for project owners; keep credentials, SSH keys, and secrets out of docs. - If paths or hostnames change, update this page.