Deploying a Virtual Machine on CloudRaya

How can we help?
< All Topics
Print

Deploying a Virtual Machine on CloudRaya

Deploying a Virtual Machine (VM) on CloudRaya is remarkably straightforward. There are two methods available for doing so: through the “User Control Panel” or via the “API.” This is possible because CloudRaya is one of the Public Cloud providers that already offers API features for automation.

Deploying a Virtual Machine Via User Control Panel

Once you are logged into the CloudRaya User panel, navigate to the ‘Add VM‘ menu.

Next, you will be taken to the ‘Add VM‘ page. There are 4 straightforward steps to begin deploying your first VM on CloudRaya.

Step 1 - Server Configurations

In Step 1, you will start by configuring the server. There are 5 things to be done in this step:

  • Location: Choose the location where you want to deploy your VM. Currently, the available regions in CloudRaya are Jakarta, Surabaya, and Seattle US.

  • Hostname: Please enter the desired name for your VM. Make sure that the name consists of only letters, numbers, and hyphens (“-“).

  • Project Tag: This is useful for grouping your VMs to make billing reports more efficient. In short, the Project Tag helps you differentiate the billing for each VM based on the tags used. For more details, refer to Project Tag.

  • Image: Please select the Image or Operating System that suits your project’s needs. Using a Windows operating system in a virtual machine (VM) will incur licensing costs that will be deducted from your balance while the VM is deployed. However, if you choose a Linux operating system, there will be no additional charges.

  • SSH Key: At the bottom, you can choose whether to use an SSH Key when accessing your VM. An SSH Key enhances security by allowing you to access your Linux VM without repeatedly entering the root password. This is especially important when accessing your VM from potentially less secure public networks, as it reduces the risk of unauthorized access and boosts overall security. For more details, refer to SSH Key.

Step 2 - Package

In Step 2, we specify the package or specifications for the VM we intend to deploy.

Complete information regarding the number of CPUs, RAM memory, Bandwidth, Disk Size, options for using a Public IP, and the monthly cost will be displayed here.

If you feel like you need specifications that better match your requirements, you can also go for the Custom Package.

Step 3 - Network Configurations

In Step 3, we will configure the network for this VM using a Virtual Private Cloud (VPC). A VPC is a feature that allows users to create and manage advanced and isolated virtual networks within the public cloud. For a complete explanation of VPC, please refer to VPC (Virtual Private Cloud.)

Step 4 - Overview

Step 4 is for reviewing our previous choices. After reviewing the summary, you can either create the VM immediately or schedule its creation. When ready, just click the Create VM button.

Via API

You may need to automate a build of a VM from your own platform. In this case, you may use our robust and simple API to build the VM.

Step 1 - Generating Account API Key

Before using the API, you must enable and generate an API key for your account to authenticate API activities. Please follow this guideline here.

Step 2 - Acquiring the Required Parameters

You will need the following items:

  1. “Location name” – by calling the following API
    https://api.cloudraya.com/v1/api/gateway/user/location-group-by-country
  2. “Package ID” – by calling the following API
    https://api.cloudraya.com/v1/api/gateway/user/packages/list 
  3. “VPC Network ID” – by calling the following API
    https://api.cloudraya.com/v1/api/gateway/user/vpc 
  4. “Storage ID” – by calling the following API
    https://api.cloudraya.com/v1/api/gateway/user/storagetype/list

  5. “Template ID” (the operating system) – by calling the following API
    https://api.cloudraya.com/v1/api/gateway/user/templates/list 

Step 3 - Creating JSON Request for VM Deployment

By compiling all of the above items into one raw JSON format body, example as followed:

				{
    "location": "Surabaya",
    "package_id": 1,
    "hostname": "VM-NGINX",
    "vpc_network_id" : 428,
    "public_ip_id": "automatic",
    "disk_id": 18,
    "schedule_type": "instant",
    "template_id": "de5e3077-4881-451d-8dca-159c03ccb536"
}
			

You will receive a response of your new VM ID.

Conclusion

You can learn more about operating CloudRaya through the API in the following guides. Alternatively, you can find additional API information in the CloudRaya API Docs.

Table of Contents

Ready, Set, Cloud

Ready, Set, Cloud