2 Creating and Deploying Ravello Applications to Cloud
Learn how to create and design a new Ravello application for your VMs and deploy it to cloud.
Installing the VM Import Tool
You can import your virtual machines (VMs) or disk images either by using the Ravello Import Tool or command line interface (CLI) Import Tool. The CLI allows you to import your VMs and will give you the flexibility of automating the import process.
Download the tool from the Ravello VM Import Tool page and import your VMs using the Ravello console. You can install the VM Import Tool on a Windows, Linux, or Mac OS X host.
-
Select the Library > Disk Images page, click + Import Disk Image. If the VM Import Tool has not yet been installed, the following web page is displayed: “Unable to connect to the Ravello VM Import Tool” with the options for downloading the tool.
-
Select the Library > VMs page, click + Import VM. If the Import Tool has not yet been installed, the following web page is displayed: “Unable to connect to the Ravello VM Import Tool” with the options for downloading the tool.
Downloading the GUI VM Import Tool
If you select Download GUI VM Import Tool, then you can import VMs from within the Ravello user interface.-
For a Windows operating system, follow the on-screen instructions to download and install the utility.
-
For a Mac operating system, double-click the
ravello_mac.dmg
file and drag it into the installation folder. -
For a Linux operating system, download and extract the
ravello_linux.tar.gz
installation file. This will automatically creates the Ravello folder in your system. Run theRavello\installer.sh
file to install the utility. If any dependency file is missing, follow the on-screen instructions to install the missing files.
Downloading the CLI VM Import Tool on a Windows Host
The CLI method allows you to import your VMs offline and will give the flexibility of automating the import process. If you select Download CLI VM Import Tool, then extract the file provided and use the CLI method to import your VMs.-
Select Download CLI VM Import Tool and download the zip file.
-
Extract the zip file from the downloaded location and run the executable file.
Note:
If a problem occurs, follow the instructions contained in the README file to install the CLI using a python script.
Locating and Verifying the VM Import Tool Installation
All the installation files are saved underC:\Program Files (x86)\Ravello Systems
. When you download the Ravello VM Import Tool, an icon will appear on the taskbar to notify you that the task is running. If it is not running, then on the Windows machine, run the executable file from C:\Program Files (x86)\Ravello Systems\Ravello import utility\ravello_vm_import_server.exe
.
Downloading the CLI VM Import Tool on a Linux or Mac OS X Host
The CLI method allows you to import your VMs offline and will give the flexibility of automating the import process. If you select Download CLI VM Import Tool, then extract the file provided and use the CLI method to import your VMs.-
Select Download CLI VM Import Tool and download the zip file.
-
Extract the zip file from the downloaded location.
-
Run the command
./install.sh
.
Identifying and Importing the VMs and Disk Images That Make Up Your Application
You can use a set of predefined VMs or disk images, or you can import VMs to create your application.
You can import VMs or disk images as a separate action or you can import them while creating an application instance. Imported VMs are managed on the Library > VMs page and are used to create application instances. For disk images, go to Library > Disk Images.
Note:
Before you import your VM or disk images, download and install the VM Import tool. See Installing the VM Import Tool.Extracting and Uploading VMs from vCenter, vSphere, or ESX Server
If your virtual machine is running on a vCenter, vSphere or ESX, then it is recommended that you extract it directly from those servers.
To extract and upload VMs from vCenter, vSphere, or an ESX server:
Uploading a VM from a File
You can upload a VM from an Open Virtualization Format (OVF), Open Virtual Appliance (OVA), or Ravello export file.
Creating a VM by Uploading Existing Disk Files
You can upload your existing disk files that are in VMDK and QCOW formats and create a VM. A new VM is added to the library containing the disk images that are selected to be imported.
Uploading a Single Disk Image
You can upload a single disk image in ISO, VMDK, or QCOW format.
Importing VMs Using CLI
Another way to upload your VMs into Ravello are by using the Command Line Interface (CLI).
- Open CLI and type
ravello upload -- disk_file = path to the VM image -u user@ravello.com --namename of the VM
- When prompted, enter your password.
- When the summary appears, verify the information that it contains, and type Yes. The upload is initialized.
Verifying Imported VMs
Imported VMs are automatically added to the Ravello VM Library with an initial status of Pending verification. An imported VM or disk image cannot be used in an application before its configuration is verified.
Uploading and Using an ISO Image
You can upload an ISO file using the GUI or CLI Ravello Import tool and then use the ISO image to set it up as a CD-ROM image.
Related Topics
Creating a Ravello Application
You can create a new application instance based on your imported VMs or use an existing blueprint to modify your application.
Note:
If you are creating this application based on a blueprint, then select From Blueprint in the Applications page and choose a blueprint from the drop-down list. If you select Create Application from the Library > Blueprints design workspace, then the blueprint is selected for you by default.
If you are creating an application based on a public VM, then select an existing key pair from the Key Pair drop-down list or click to add a new key pair. For details on generating and importing key pairs, see Working With Key Pairs.Working With Key Pairs
When working with generic or public VM templates, you can connect to VMs using predefined Secure Shell (SSH) key pairs. The use of SSH gives you the option of connecting to public VMs using key pairs instead of a user name and password. Each key pair contains a public and a private key and can be generated or imported into Ravello. The public key that is generated will be saved in Ravello, while the private key must be saved on your machine.
Key pairs are managed on the Library > Key Pairs page, however, you can also add or import key pairs while creating a new application that is based on a public blueprint. Similarly, you can access key pair functionality from the General tab of the Details pane when a public VM is selected on the canvas (for applications or blueprints).
Note:
The Key Pairs login is available only for VMs that support Cloud-init.Generating or Importing Key Pairs
The key pairs generated by Ravello are compatible with Linux and Mac platforms. If you are using a Windows machine to connect to a Linux guest VM, use PuTTY or any other similar client to connect using SSH.
Connecting to a Linux or Mac Instance Using SSH Key Pairs
If you’ve created your instance using one of the publicly shared disk images or blueprints from Oracle Cloud Infrastructure Ravello Service, then you can use SSH to access your Linux or Mac instance.
-
Generate an SSH key pair before connecting to a Linux or Mac instance. See Generating or Importing Key Pairs.
-
Create an external supplied service on the VM, with port 22 open. See Adding and Connecting Service Interfaces.
-
Ensure that the SSH private key corresponding to the public key that you associated with your instance while creating it is available on the host from which you want to SSH to the instance.
-
Ensure that the instance has a public IP address.
-
Make sure that you have enabled the SSH access option on the VM before using SSH.
- Open an SSH client
- Locate your private key file (for example,
ravelloDevKey.pem
). The wizard automatically detects the key you used to launch the instance. - To verify that the key permissions of the private key correct, run this command:
chmod 400 <private key filename>
. For example,chmod 400 ravelloDevKey.pem
. - Connect to your VM using the following command:
ssh -i <private key filename> root@<EIPof VM>
. For example,ssh -i ravelloDevKey.pem root@<EIPof VM>
Using SSH Key Pairs from a Windows Machine
You can use PuTTY or any other similar client to connect to your Linux guest VM from your Windows machine using SSH key pairs. This section assumes that you are using PuTTY to connect to your instance.
-
Download a PuTTygen tool and select File > Load Private Key.
-
Browse to open the *pem file that contains the key you want to convert.
Note:
By default, PuTTYGen displays only the files with extension .ppk. Select All Files from the drop-down list to view all file types. -
Save the Private Key. When prompted to indicate whether you want to save the key without a pass phrase, click Yes. The key is saved in the
.ppk
format and can be used to connect to your VM using PuTTy SSH.
-
PuTTY is installed on your Windows machine. To download PuTTY, go to http://www.putty.org/.
-
instance has a public IP address.
-
SSH is enabled on the Windows machine.
Designing or Editing a Ravello Application (Optional)
If you want to modify your application, for example, if you want to add another application server or configure a service, then you can edit or design your application accordingly.
Note:
When you update, the entire instance will not be republished. Only the relevant changes will be updated. In some cases, a published virtual machine will be rebooted as part of the process.Adding and Connecting Service Interfaces
You can manually add the supplied and required service interfaces to the VM images to provide entry points for accessing the application functionality.
Adding User Data Scripts
You can add user data scripts to your instance which can be used for automated configuration tasks.
- Open your application and select the VM.
- On the right side, select General.
- Under Cloud Init Configuration, select Cloud-init is installed on this VM.
- Add your script in the User Data Script field and save the configuration. Your script will be executed when the machine is booted.
#!/bin/sh
echo ‘my_script' > /tmp/my_script
#cloud-config
ssh_import_id: [smoser]
apt_sources:
- source: "ppa:smoser/ppa”
Viewing the Network Architecture
Verify your network architecture for your application or blueprint on the Network tab of the Application page.
Oracle Cloud Infrastructure Ravello Service allow you to run existing multi-VM applications without any modifications in the cloud. When you drag and drop a VM into the Ravello Canvas, network details including subnets, routers, and supplemental services such as dynamic host configuration protocol (DHCP), domain name service (DNS) servers, and firewalls are automatically updated. The virtual network will look exactly like your data center network.
Setting up VM Properties
This section provides a few quick tips to make changes to your network.
IP Configuration
-
In the Ravello application, select your VM and on the NICs tab click Add IP under IP Configuration.
-
Select one of the options: DHCP or Static IP, and enter the IP configuration details.
-
Select Public IP, Elastic IP, or Port Forwarding and save the configuration.
IP Filter
-
In the Network tab, navigate to IP Filtering.
-
Go to Properties to Enable Security Rules. By default, it is disabled to allow traffic from all IP addresses.
-
Click Security Rules and create rules either to allow or deny the traffic.
-
Enter the IP address and subnet mask in the mandatory fields and save the configuration.
click the IP Filtering icon on the Canvas page. To allow network traffic only from the specific IP addresses, select Is Active in the IP Filter Properties pane.
Alternatively, you can disable the IP filter and allow traffic from all IP addresses.
Setting anti-affinity rules
-
In the Ravello application, select your VM.
-
To assign a group to the VM, on the General tab, select a group in the Availability Group drop-down list.
Tip:
For example, if you want to implement your HA cluster with or without a load balancer, then select one node on Ravello Availability Group 1 and the other node on Ravello Availability Group 2. -
Save the configuration.
Note:
Once the VM is published, you will not be able to change the availability group.
Publishing Your Application
After you create and validate your application, you can publish your application to cloud.