mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-22 04:07:04 +00:00
refactor: rename hive to spinifex in all shell scripts
- Update scripts/: start-dev, stop-dev, dev-setup, setup, setup-ovn, etc. - Update tests/e2e/: all E2E test scripts - Update scripts/iac/: rename hive-test.sh → spinifex-test.sh, update TF files - Update config/: rename hive.service and install script - Binary refs use spx, env vars use SPINIFEX_, paths use spinifex
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Query images, get Ubuntu image
|
||||
export AWS_PROFILE=hive
|
||||
export AWS_PROFILE=spinifex
|
||||
|
||||
# Detect architecture
|
||||
ARCH=$(uname -m)
|
||||
@@ -14,7 +14,7 @@ else
|
||||
IMAGE_NAME="ami-ubuntu-24.04-x86_64"
|
||||
fi
|
||||
|
||||
# Query available instance types from Hive and pick the first micro type
|
||||
# Query available instance types from Spinifex and pick the first micro type
|
||||
INSTANCE_TYPE=$(aws ec2 describe-instance-types --query "InstanceTypes[?contains(InstanceType, '.micro')].InstanceType | [0]" --output text)
|
||||
if [ -z "$INSTANCE_TYPE" ] || [ "$INSTANCE_TYPE" = "None" ]; then
|
||||
echo "Error: Could not find available micro instance type"
|
||||
@@ -28,27 +28,27 @@ echo "Detected architecture: $ARCH"
|
||||
echo "Looking for image with Name: $IMAGE_NAME"
|
||||
|
||||
# Query images and extract ImageId matching the IMAGE_NAME
|
||||
HIVE_AMI=$(aws ec2 describe-images --query "Images[?Name=='$IMAGE_NAME'].ImageId" --output text)
|
||||
SPINIFEX_AMI=$(aws ec2 describe-images --query "Images[?Name=='$IMAGE_NAME'].ImageId" --output text)
|
||||
|
||||
if [ -z "$HIVE_AMI" ]; then
|
||||
if [ -z "$SPINIFEX_AMI" ]; then
|
||||
echo "Error: Could not find image with Name '$IMAGE_NAME'"
|
||||
echo "Available images:"
|
||||
aws ec2 describe-images --query "Images[*].[Name,ImageId]" --output table
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export HIVE_AMI=$HIVE_AMI
|
||||
export SPINIFEX_AMI=$SPINIFEX_AMI
|
||||
|
||||
echo "Found ImageId: $HIVE_AMI"
|
||||
export HIVE_AMI
|
||||
echo "Found ImageId: $SPINIFEX_AMI"
|
||||
export SPINIFEX_AMI
|
||||
|
||||
echo "Launching instance"
|
||||
|
||||
# Launch instance
|
||||
aws ec2 run-instances \
|
||||
--image-id "$HIVE_AMI" \
|
||||
--image-id "$SPINIFEX_AMI" \
|
||||
--instance-type "$INSTANCE_TYPE" \
|
||||
--key-name hive-key \
|
||||
--key-name spinifex-key \
|
||||
--security-group-ids sg-0123456789abcdef0 \
|
||||
--subnet-id subnet-6e7f829e \
|
||||
--count 1
|
||||
|
||||
Reference in New Issue
Block a user