Skip to content

Commit 37edffb

Browse files
committed
Add swap setup and document x86 E2.1.Micro shape
Create a swap file during host setup so image builds don't OOM on the 1 GB E2.1.Micro shape, and document both Always Free shape options. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013vqQJQAud7rmfykwWKJACY
1 parent 1abee12 commit 37edffb

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

deploy/oracle/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ What you get:
1717
In the [OCI Console](https://cloud.oracle.com/)**Compute → Instances → Create**:
1818

1919
- **Image:** Canonical Ubuntu 22.04 (or Oracle Linux 9).
20-
- **Shape:** `VM.Standard.A1.Flex` (Ampere ARM, **Always Free** — e.g. 1–2 OCPUs,
21-
6–12 GB RAM is plenty).
20+
- **Shape:** either Always Free option works:
21+
- `VM.Standard.A1.Flex` (Ampere ARM) — more RAM, but see the logviewer ARM
22+
note under Troubleshooting.
23+
- `VM.Standard.E2.1.Micro` (x86, 1 OCPU / 1 GB RAM) — logviewer runs natively;
24+
`setup.sh` adds a swap file to handle the 1 GB limit during image builds.
2225
- **SSH keys:** upload/download a key pair so you can log in.
2326
- Note the instance's **public IP** after it boots.
2427

deploy/oracle/setup.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
set -euo pipefail
1414

1515
LOGVIEWER_PORT=8000
16+
SWAP_SIZE=2G
17+
18+
echo "==> Ensuring swap exists (important on 1 GB shapes like E2.1.Micro)..."
19+
if ! sudo swapon --show | grep -q '/swapfile'; then
20+
sudo fallocate -l "${SWAP_SIZE}" /swapfile || sudo dd if=/dev/zero of=/swapfile bs=1M count=2048
21+
sudo chmod 600 /swapfile
22+
sudo mkswap /swapfile
23+
sudo swapon /swapfile
24+
grep -q '/swapfile' /etc/fstab || echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
25+
else
26+
echo " Swap already present, skipping."
27+
fi
1628

1729
echo "==> Installing Docker Engine + Compose plugin..."
1830
if ! command -v docker >/dev/null 2>&1; then

0 commit comments

Comments
 (0)