What are Locations?
Locations are simple organizational units that group nodes together. They’re commonly used to represent:- Geographic Locations: US-East, EU-West, Asia-Pacific
- Data Centers: NYC1, LON1, SFO2
- Providers: AWS, DigitalOcean, OVH
- Logical Groups: Production, Development, Testing
Location Model
Locations are simple models with minimal fields (fromapp/Models/Location.php:42-45):
Fields
- short: A short identifier (e.g., “us-east”, “eu-1”)
- Required
- 1-60 characters
- Must be unique
- long: A descriptive name (e.g., “United States - East Coast”)
- Optional
- Up to 191 characters
Creating a Location
Fill in Details
Location Information
- Short Code: A unique identifier (e.g.,
us-east) - Description: Full descriptive name (e.g.,
United States - East Coast)
Locations must be created before you can add nodes. Each node must be assigned to a location.
Viewing Locations
The locations index page displays:- Short code
- Long description
- Number of nodes in the location
- Number of servers in the location
app/Http/Controllers/Admin/LocationController.php:36-40:
Location Details
Clicking on a location shows:- All nodes assigned to this location
- Node statistics (servers, memory, disk)
- Total resources across all nodes
- Ability to edit or delete the location
Updating a Location
From
app/Http/Controllers/Admin/LocationController.php:73-82:
Deleting a Location
To delete a location:Remove All Nodes
Ensure no nodes are assigned to this location
- Delete nodes, or
- Reassign nodes to a different location
app/Http/Controllers/Admin/LocationController.php:91-102:
Location Relationships
Nodes
A location has many nodes (fromapp/Models/Location.php:57-60):
Servers
A location has many servers through nodes (fromapp/Models/Location.php:67-70):
Use Cases
Geographic Distribution
Organize nodes by geographic regions for latency optimization:Data Center Organization
Group nodes by data center:Provider Separation
Separate nodes by hosting provider:Environment Separation
Separate production from development:Server Creation Workflow
Locations affect server creation:- User/admin selects a Location
- System filters available Nodes by location
- User/admin selects a specific Node (or auto-deploy)
- Server is created on the selected node
app/Http/Controllers/Admin/Servers/CreateServerController.php:55-58:
Auto-Deployment
When using auto-deployment:- Select a location
- Don’t select a specific node
- System finds the best node in that location
- Based on available resources
API Access
Locations are accessible via the API:Best Practices
-
Consistent Naming: Use a consistent naming scheme
- Good:
us-east,us-west,eu-central - Bad:
location1,loc-2,new-location
- Good:
-
Descriptive Long Names: Make descriptions clear
- Good: “United States - East Coast”
- Bad: “US East”
- Plan Ahead: Design your location structure before adding nodes
-
Logical Grouping: Group nodes by factors that matter to your users
- Geographic proximity
- Network performance
- Provider reliability
-
Don’t Over-Organize: Too many locations can be confusing
- Start with 3-5 locations
- Expand as needed
Common Naming Schemes
Geographic
Data Center
Provider-Based
Troubleshooting
Cannot Delete Location
Problem: Error when trying to delete a location Solution: The location has nodes assigned to it. Either:- Delete all nodes in the location, or
- Reassign nodes to a different location
Location Not Showing in Dropdown
Problem: Location doesn’t appear when creating servers Solution: Ensure:- Location was created successfully
- At least one node is assigned to the location
- Node has available allocations
Short Code Conflict
Problem: “Short code already exists” error Solution: Each location must have a unique short code. Choose a different identifier.Migration Considerations
If you need to reorganize locations:- Create New Locations: Set up your new location structure
- Reassign Nodes: Move nodes to new locations one by one
- Delete Old Locations: Remove old locations after all nodes are moved
Next Steps
Node Management
Add nodes to your locations
Server Deployment
Deploy servers to your organized nodes
