Barrack API Documentation
  1. vm
Barrack API Documentation
  • Platform Documentation
    • "Authentication & Access"
    • "Getting Started"
    • "Platform Documentation"
    • "Troubleshooting"
    • vm
      • "Advanced Configuration"
      • "Boot Source Configuration"
      • "GPU Configuration"
      • "Region Selection"
      • "SSH Key Configuration"
      • "VM States & Billing"
    • storage
      • "Managing Volumes"
      • "Storage Management"
    • ssh
      • "Creating SSH Keys"
      • "Importing SSH Keys"
      • "Managing SSH Keys"
    • security
      • "Attaching Firewalls to VMs"
      • "Firewall Management"
      • "Firewall Rules"
    • dashboard
      • "Dashboard Overview"
      • "VM Management"
    • backup
      • "Creating Snapshots"
      • "Custom Images"
      • "Managing Snapshots"
      • "Restoring Snapshots"
      • "Snapshots Management"
    • account
      • "Credits System"
      • "Account Management"
  • Balance
    • Get credit balance
      GET
  • GPU Stocks
    • Get GPU stock availability
      GET
  • GPU Specs
    • Get GPU specifications
      GET
  • Regions
    • List available regions
      GET
  • Pricing
    • Get pricing information
      GET
    • Get pricing information
      POST
  • Deploy Instance
    • Create a new instance
  • Instance management
    • List instances
    • Delete instance
    • Get instance billing
    • Hibernate instance
    • Reboot instance
    • Restore hibernated instance
    • Start instance
    • Stop instance
    • Toggle public IP for instance
    • Get instance details
    • Get hibernated instances count
    • Add instance security rule
    • Remove instance security rule
  • OS Images
    • List OS images
  • SSH Keys
    • List SSH keys
    • Create SSH key
    • Get SSH key
    • Delete SSH key
  • Scripts
    • List all startup scripts
    • Create a startup script
    • Get startup script details
    • Update a startup script
    • Delete a startup script
    • Delete multiple startup scripts
  • Firewalls
    • List firewalls
    • Get firewall details
    • Attach firewall to instances
    • Get firewalls attached to instance
    • Delete firewall
    • Remove firewall rule
    • Add firewall rule
    • Create firewall
    • Get supported protocols
    • List instances available for firewall attachment
    • List instances available for firewall attachment
  • Snapshots
    • List snapshots
    • Get snapshot billing
    • List Instance eligible for snapshot creation
    • Get snapshot details
    • Delete snapshot
    • Restore snapshot
    • Create snapshot
    • Create snapshot
    • Get snapshot billing
  • Images
    • List custom images
    • Get image details
    • Delete custom image
    • Create image from snapshot
    • Get snapshot-image relationship
    • Get snapshot-image relationship list
  • AI Chat
    • Chat with AI
    • Get AI usage summary
    • Get AI usage history
    • Get available AI models
  • Volumes
    • Attach volumes to instance
    • Detach volumes from instance
    • Clone volume
    • Resize volume
    • Get volume billing
    • List available volume types
    • List volumes
    • Create volume
    • Get volume details
    • Delete volume
  • Virtual Machines
    • Get firewalls attached to instance
    • Remove instance security rule
    • List Instance eligible for snapshot creation
  • Schemas
    • AITransaction
    • AddFirewallRuleRequest
    • AddFirewallRuleResponse
    • AddVMSecurityRuleResponse
    • AttachFirewallRequest
    • AggregatedBillingResponse
    • AttachFirewallResponse
    • AttachVolumesRequest
    • AttachVolumesResponse
    • AttachedFirewall
    • BatchSnapshotImageRelationshipResponse
    • Balance
    • Billing
    • ChatCompletionsRequest
    • ChatCompletionsResponse
    • CloneVolumeRequest
    • BillingRecord
    • CloneVolumeResponse
    • BillingSummary
    • CreateFirewallRequest
    • CreateFirewallResponse
    • CreateImageFromSnapshotRequest
    • CreateSSHKeyRequest
    • CreateScriptRequest
    • CreateSnapshotRequest
    • CreateSnapshotResponse
    • CreateSSHKeyResponse
    • CurrencyEnum
    • Data
    • CreditBalanceResponse
    • DeleteFirewallResponse
    • CreateVolumeRequest
    • DeleteSnapshotResponse
    • CreateVolumeResponse
    • DeleteVMResponse
    • DetachVolumesRequest
    • DetachVolumesResponse
    • DeploymentRequest
    • DirectionEnum
    • DeploymentResponse
    • EthertypeEnum
    • ErrorResponse
    • FirewallAttachment
    • DeleteVolumeResponse
    • DeleteSSHKeyResponse
    • FirewallEnvironment
    • FirewallResponse
    • FirewallRule
    • FirewallVM
    • GetBatchSnapshotImageRelationshipsRequest
    • GetFirewallDetailsResponse
    • GPUStockConfiguration
    • GPUSpec
    • GetHibernatedVMsResponse
    • GPUStockItem
    • GPUSpecsResponse
    • GetSupportedProtocolsResponse
    • GPUStocksResponse
    • GetVMAttachedFirewallsResponse
    • GetVolumeTypesResponse
    • HibernateVMResponse
    • HibernationBillingMetrics
    • ListFirewallsResponse
    • ListUserVMsResponse
    • ListVMsResponse
    • ModelsResponse
    • GetSSHKeysResponse
    • Pagination
    • PricingRequest
    • OSImage
    • PricingResponse
    • OSImagesResponse
    • Protocol
    • GpuCountEnum
    • ProtocolEnum
    • Image
    • GpuModelEnum
    • GetVolumeDetailsResponse
    • RebootVMResponse
    • ImageCreateResponse
    • RecentHibernation
    • ImageDeleteResponse
    • GetVolumesWithNextNameResponse
    • RemoveFirewallRuleResponse
    • ImageDetailResponse
    • RemoveVMSecurityRuleResponse
    • Region
    • ImageListResponse
    • ResizeVolumeRequest
    • RegionsResponse
    • Price
    • ResizeVolumeResponse
    • ResourceTypeEnum
    • RestoreSnapshotRequest
    • RestoreSnapshotResponse
    • RestoreVMResponse
    • Snapshot
    • SnapshotImageRelationshipResponse
    • Specs
    • StartVMResponse
    • StopVMResponse
    • TierEnum
    • UpdateScriptRequest
    • UsageHistoryResponse
    • UsageSummaryResponse
    • RegionEnum
    • UserVM
    • VMDetailsResponse
    • VMFlavor
    • VMImage
    • VMInstance
    • VMResponse
    • SpecsMetadata
    • VMSecurityRule
    • VMSecurityRuleRequest
    • VMStatus
    • VMVolumeAttachment
    • Script
    • VolumeTypeEnum
    • SSHKeyResponse
    • ScriptListResponse
    • ToggleVMPublicIPResponse
    • VolumeBillingRecord
    • VolumeBillingSummary
    • VolumeHourlyBillingResponse
    • VolumeResponse
  1. vm

"Advanced Configuration"

Configure additional options for your virtual machine to enhance security, access, and initial setup capabilities.
Control whether your VM has internet connectivity and public accessibility.
Enable Public IP
Internet Connectivity
VM receives a publicly accessible IP address
Full internet access for downloads and updates
Accessible from anywhere on the internet
Required for remote access and most applications
Disable Public IP
Internal Network Only
VM accessible only within internal network
Enhanced security through network isolation
No direct internet access
Requires VPN or bastion host for access

Public IP Security Considerations#

Public IP Use Cases#

Development & Testing
Production Workloads
High Security Environments
Recommended: Enable Public IP
Easy remote access for development
Internet access for package installations
Simple collaboration with team members
Direct access to web services and APIs

Security Rules Configuration#

Configure firewall rules through the integrated interface to protect your virtual machine.

Firewall Integration#

1
Access Security Rules
Security rules are configured during VM deployment or through the security management interface
2
Define Rule Types
Add rules for specific protocols:
TCP: Web services, databases, custom applications
UDP: DNS, video streaming, custom protocols
ICMP: Ping, network diagnostics
3
Configure Access
Define allowed sources and destinations:
IP Ranges: Specific networks or addresses in CIDR notation
Port Restrictions: Specific ports or port ranges
Direction: Ingress (incoming) or Egress (outgoing) traffic
4
Apply Rules
Rules are applied automatically after VM becomes active:
Real-time rule validation
Automatic conflict detection
Progressive rule application

Common Security Rule Examples#

SSH Access
Web Services
Custom Applications
Database Access

Security Rule Best Practices#

Principle of Least Privilege
Minimize Access
Only open ports that are actively needed
Restrict source IP ranges to minimum required
Regularly audit and remove unnecessary rules
Use specific ports instead of ranges when possible
Defense in Depth
Multiple Security Layers
Combine firewall rules with application security
Use both network and host-based firewalls
Implement monitoring and intrusion detection
Regular security assessments and updates

Jupyter Notebook Configuration#

Optionally enable Jupyter Notebook server for interactive computing and data science workflows.

Jupyter Setup Process#

1
Enable Jupyter
Toggle the Jupyter Notebook option during VM configuration
2
Set Password
Configure a secure password for Jupyter access:
Minimum 8 characters required
Password strength validation (weak/medium/strong)
Strong passwords recommended for security
3
Access Jupyter
After VM deployment, access via browser:
http://<vm-ip>:8888
4
Login
Use the configured password to access the Jupyter interface

Password Requirements#

Minimum Requirements
Strong Password
Password Strength Indicator
Basic Security
At least 8 characters
No common dictionary words
Not easily guessable

Jupyter Security Considerations#

Jupyter Use Cases#

Data Science Development
Educational Environments
Prototyping and Experimentation

Cloud-Init Script Configuration#

Add custom initialization scripts to configure your VM environment at first boot.

Cloud-Init Overview#

Automatic Configuration
System Initialization
Runs during first boot process
Configures system before user access
Automates software installation
Sets up custom environments
Script Flexibility
Custom Scripting
Bash shell scripts supported
Package installation commands
Configuration file modifications
Service setup and management

Cloud-Init Script Limitations#

Common Cloud-Init Examples#

Package Installation
System Configuration
User Setup
Application Setup
Install Additional Software

Cloud-Init Best Practices#

Script Reliability
Resource Management
Security Considerations
Testing and Validation

Cloud-Init Troubleshooting#

1
Check Execution Logs
View cloud-init logs on the VM:
2
Verify Script Status
Check cloud-init status:
3
Manual Script Testing
Test script components manually:
4
Debug and Iterate
Fix identified issues
Test updated script on new VM
Document working configurations
Share successful scripts with team

Advanced Configuration Integration#

Configuration Workflow#

1
Plan Configuration
Determine public IP requirements
Design security rule strategy
Plan application requirements (Jupyter, etc.)
Prepare cloud-init scripts
2
Configure During Deployment
Set public IP preferences
Configure initial security rules
Enable and configure Jupyter if needed
Add cloud-init script
3
Validate Configuration
Test connectivity and access
Verify security rules are working
Check application functionality
Monitor cloud-init script execution
4
Refine and Optimize
Adjust security rules as needed
Optimize cloud-init scripts
Document working configurations
Plan for configuration updates

Configuration Templates#

Create reusable configuration templates for common deployment scenarios:
Development Environment
Production Web Server
Secure Computing
Development VM Configuration
Public IP: Enabled
Security Rules: SSH (22), Jupyter (8888), Custom app ports
Jupyter: Enabled with strong password
Cloud-Init: Development tools installation
Previous
"Troubleshooting"
Next
"Boot Source Configuration"
Built with