Back to Cloud VPS Documentation

    API Access

    Programmatic control of your cloud infrastructure via OpenStack API

    RamNode Cloud is built on OpenStack, providing full API access for programmatic management of your cloud resources. This enables automation, scripting, and integration with third-party tools.

    Getting API Credentials

    1. Log into the Cloud Control Panel
    2. Click on your username in the top right
    3. Select OpenStack RC File from the dropdown
    4. Choose your preferred format:
      • OpenStack RC File (Identity API v3) - Recommended
      • OpenStack RC File (Identity API v2.0) - Legacy
    5. Download the RC file

    ✓ Recommended: Always use Identity API v3 for the latest features and better security.

    Setting Up CLI Access

    Install OpenStack CLI Tools

    Ubuntu/Debian:

    apt update\napt install python3-openstackclient

    CentOS/Rocky/Alma:

    yum install python3-openstackclient

    macOS:

    pip3 install python-openstackclient

    Load Your Credentials

    # Source the RC file
    source ~/Downloads/openrc.sh
    
    # You'll be prompted for your password
    # Enter your Cloud Control Panel password

    Common CLI Commands

    List Instances

    openstack server list

    Create Instance

    openstack server create \
      --flavor m1.small \
      --image "Ubuntu 22.04" \
      --key-name my-key \
      --network public \
      my-instance-name

    List Flavors (Plans)

    openstack flavor list

    List Images

    openstack image list

    Create Snapshot

    openstack server image create --name my-snapshot my-instance-name

    Manage Floating IPs

    # List floating IPs
    openstack floating ip list
    
    # Create floating IP
    openstack floating ip create public
    
    # Assign to instance
    openstack server add floating ip my-instance-name 198.51.100.10

    Using the REST API

    You can also interact directly with the REST API for custom integrations.

    API Endpoints

    • Identity (Keystone) - Authentication and authorization
    • Compute (Nova) - Instance management
    • Image (Glance) - Image management
    • Network (Neutron) - Network and security group management
    • Volume (Cinder) - Block storage management

    Get Authentication Token

    curl -X POST https://cloud.ramnode.com:5000/v3/auth/tokens \
      -H "Content-Type: application/json" \
      -d '{
        "auth": {
          "identity": {
            "methods": ["password"],
            "password": {
              "user": {
                "name": "your-email",
                "domain": {"name": "Default"},
                "password": "your-password"
              }
            }
          },
          "scope": {
            "project": {
              "name": "your-project",
              "domain": {"name": "Default"}
            }
          }
        }
      }'

    Automation Tools

    Popular tools that work with OpenStack:

    Terraform

    Infrastructure as Code

    Ansible

    Configuration management and orchestration

    Python SDK

    OpenStack SDK for Python

    Go SDK

    Gophercloud for Go applications

    Terraform Example

    terraform {
      required_providers {
        openstack = {
          source = "terraform-provider-openstack/openstack"
        }
      }
    }
    
    provider "openstack" {
      auth_url    = "https://cloud.ramnode.com:5000/v3"
      user_name   = "your-email"
      password    = "your-password"
      tenant_name = "your-project"
      domain_name = "Default"
    }
    
    resource "openstack_compute_instance_v2" "basic" {
      name            = "basic-instance"
      image_name      = "Ubuntu 22.04"
      flavor_name     = "m1.small"
      key_pair        = "my-key"
      security_groups = ["default"]
    }

    Security Best Practices

    • Never commit credentials - Don't put passwords in version control
    • Use application credentials - Create app-specific credentials when possible
    • Rotate credentials - Regularly update your passwords
    • Limit permissions - Use project-specific credentials when possible
    • Secure RC files - Set proper permissions: chmod 600 openrc.sh

    📚 Documentation: For complete API documentation, visit the OpenStack API Documentation. Our implementation is fully compatible with standard OpenStack APIs.