Using User Data

User Data represents a script that gets passed to an instance at creation time. This script enables automated installation of software and service configuration and environment variable setup while eliminating the requirement to use manual SSH access. [ Read more here User Data (Add link)]

Prerequisites

  • Access to the Qumulus Cloud platform.​

  • Basic understanding of cloud instance configurations.​

Follow the steps below to launch a new compute instance using User :

1. Navigate to Compute > Instances

2. Click on the Get Started and Create Instance Button

  • Entre Instance Details

  • Select Image

  • Configure Storage

  • Choose Instance Type

  • Networking & Security ( Defaults Applied )

  • Configure Authentication

4. User Data (Optional)

User Data allows you to run scripts during the initial launch of your instance, automating tasks such as software installation, updates, or setting environment variables.​

Example for Apache Installation on Ubuntu:

To automate the installation and setup of Apache, input the following script in the User Data field:​

#!/bin/bash
# Redirect output to log file & console
exec > >(tee /var/log/user-data.log | tee /dev/ttyS0) 2>&1

# Update package list
echo "Updating package list..."
apt-get update -y

# Install Apache Web Server
echo "Installing Apache Web Server..."
apt-get install -y apache2

# Enable Apache to start on boot
echo "Enabling Apache to start on boot..."
systemctl enable apache2

# Start Apache service
echo "Starting Apache Web Server..."
systemctl start apache2

# Create a simple HTML page
echo "Creating a default web page..."
echo "<h1>Welcome to Qumulus Cloud</h1>" > /var/www/html/index.html

echo "User data script execution completed successfully!"
  • A User Data script should not exceed 64 KB

  • User Data should not include sensitive data such as passwords, API keys, or private keys, because this data remains accessible through instance metadata which runs through logs and metadata services.

5. Review and Launch

  • Review the Instance Summary displayed on the right.

  • Click on launch Instance to create the Instance.

6. Viewing Console Logs

Qumulus instances enable users to observe system messages and debug information directly from the instance console without requiring SSH access.

Drawing

You can deploy instances rapidly through this streamlined procedure that delivers necessary configuration needs. Enjoy the flexibility and efficiency of Qumulus!

Last updated