Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions src/content/docs/demos/01-virtual-machine.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
title: Virtual Machine
description: Create and provision a Virtual Machine within the OtterScale cluster.
---

import { Steps, Aside, LinkCard } from '@astrojs/starlight/components';

This guide demonstrates how to create and provision a Virtual Machine (VM) within the OtterScale cluster for running workloads.

## Create a Virtual Machine

<Aside type="tip">
Virtual Machines allow you to provision compute instances within your OtterScale cluster. You can configure hardware profiles, attach storage volumes, and customize network ports to meet your specific needs.
</Aside>

<Steps>

1. Navigate to the Compute section:

Open your browser and go to:
```
<url>/scope/<scope-name>/compute
```

2. Create a new Virtual Machine:

- Click the **Create** button (plus icon) at the top of the Compute page
- A modal window titled "Create Virtual Machine" will appear

3. Configure Basic Settings:

- **Name**: Enter a unique name for the VM (e.g., `my-demo-vm`)
- **Namespace**: Specify the Kubernetes namespace (defaults to `default`)
- **Instance Type**: Select a hardware profile from the dropdown list (displays CPU cores and Memory size)
- **Data Volume**: Select the bootable Data Volume (PVC) to use as the OS disk

4. Configure Advanced Settings (Optional):

- Expand the "Advanced" section to configure a **Startup Script** (Cloud-Init user data)
- This allows you to bootstrap the instance with custom initialization commands
- Example configuration for user setup and SSH access:

```
#cloud-config
users:
- name: phison
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: sudo
shell: /bin/bash
chpasswd:
list: |
phison:phison_8299
expire: false
ssh_pwauth: true
Comment on lines +44 to +54

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The cloud-config example contains a hardcoded weak password (phison_8299) and grants passwordless sudo (NOPASSWD:ALL). This is a significant security risk and promotes insecure practices, even in a demo environment.

Please update this section to guide users to create a strong password and to remove passwordless sudo. I've provided a suggestion to fix this. It's also good practice to add a note recommending SSH keys for production environments.

#cloud-config
users:
  - name: phison
    sudo: ['ALL=(ALL) ALL'] # Require password for sudo
    groups: sudo
    shell: /bin/bash
chpasswd:
  list: |
    phison:<YOUR_STRONG_PASSWORD> # Replace with a strong password
  expire: false
ssh_pwauth: true

```

Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cloud-init configuration includes hardcoded credentials with passwordless sudo access. Consider adding a warning similar to the one in the JupyterHub demo (line 53 in 03-jupyterhub.mdx) that recommends changing these credentials for production environments. This is especially important since SSH access is being exposed externally via NodePort.

Suggested change
<Aside type="warning">
This example uses hardcoded credentials and passwordless sudo for demonstration purposes only. For any production or externally accessible environment, configure unique strong credentials (or SSH key-based authentication), restrict or remove passwordless sudo, and review SSH exposure (for example, NodePort access) to meet your security requirements.
</Aside>

Copilot uses AI. Check for mistakes.
5. Review and Confirm:

- Review all the configuration settings
- Click **Confirm** to launch the Virtual Machine

6. Wait for VM Initialization:

- The VM will begin provisioning and cloning a Data Volume for its use
- Monitor the **Status** column to track the initialization progress
- Wait until the status changes to **Running**

</Steps>

## Monitor the Virtual Machine

Once the VM is created, you can monitor its status in the Compute page:

<Steps>

1. View the VM in the Compute list:

- Locate your newly created VM by name in the table
- Check the **Status** column to see the current state (e.g., Running, Stopped)

2. Access VM resources:

- **Machine**: Click to view which physical node is hosting your VM
- **Disk**: Expand to view and manage attached storage volumes
- **Ports**: Expand to view and manage network port configurations
- **Metrics**: Monitor real-time CPU, Memory, and Storage usage
- **VNC**: Access the VM console directly through VNC

</Steps>

## Configure Service for VM Access

To enable external access to your Virtual Machine, configure a service to expose its ports:

<Steps>

1. Add a service port for SSH access:

- In the Compute page, locate your VM in the table
- Click on the **Ports** column to expand the port management section
- Click **Add Port** to create a new service port
- Configure the port settings:
- **Protocol**: `tcp`
- **Port**: `22` (SSH service port on the VM)
- **NodePort**: (leave empty for automatic assignment or specify a fixed port)
- The system will automatically assign a NodePort (e.g., `30022`) for external access

2. Note the NodePort:

- Record the assigned NodePort from the Ports section
- This is the port you'll use to connect to the VM from outside the cluster

</Steps>

## Access Your Virtual Machine

Once the VM is running, fully initialized, and the service port is configured:

<Steps>

1. Wait for cloud-init initialization:

- The VM will automatically execute the cloud-init configuration
- The system user `phison` will be created with sudo privileges
- The password will be set as configured in the cloud-config

2. Connect to the VM:

- Use SSH to connect to your VM from external hosts
- Connection example:
```
ssh -p <NodePort> phison@<cluster-host>
```
- Or use VNC to connect directly through the web interface
- Login credentials:
- **Username**: `phison`
- **Password**: `phison_8299`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Hardcoding credentials, even in documentation for a demo, is a security anti-pattern. It's better to refer to the password the user has set up themselves, reinforcing good security practices.

     - **Password**: The password you configured in the startup script.


3. Start using your VM:

- You now have full access to configure and use the Virtual Machine
- The user has sudo privileges for system administration tasks

</Steps>


## Next Steps

Explore other demo applications and services to enhance your infrastructure:

<LinkCard title="Coder Demo" href="/demos/02-coder/" description="Deploy Coder for cloud-based VS Code IDE environments." />
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LinkCard title is inconsistent with the actual page title. Since the page title was changed to "Coder" (without " Demo"), this LinkCard title should also be "Coder" for consistency.

Suggested change
<LinkCard title="Coder Demo" href="/demos/02-coder/" description="Deploy Coder for cloud-based VS Code IDE environments." />
<LinkCard title="Coder" href="/demos/02-coder/" description="Deploy Coder for cloud-based VS Code IDE environments." />

Copilot uses AI. Check for mistakes.

<LinkCard title="JupyterHub Demo" href="/demos/03-jupyterhub/" description="Learn how to deploy JupyterHub for collaborative Jupyter notebook environments." />
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LinkCard title is inconsistent with the actual page title. Since the page title was changed to "JupyterHub" (without " Demo"), this LinkCard title should also be "JupyterHub" for consistency.

Suggested change
<LinkCard title="JupyterHub Demo" href="/demos/03-jupyterhub/" description="Learn how to deploy JupyterHub for collaborative Jupyter notebook environments." />
<LinkCard title="JupyterHub" href="/demos/03-jupyterhub/" description="Learn how to deploy JupyterHub for collaborative Jupyter notebook environments." />

Copilot uses AI. Check for mistakes.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Coder Demo
title: Coder
description: Deploy Coder for cloud-based VS Code IDE environments with support for both Go and Python backends.
---

Expand Down Expand Up @@ -65,6 +65,6 @@ Once Coder is deployed and running:

Explore other demo applications to enhance your infrastructure:

<LinkCard title="PostgreSQL Demo" href="/demos/03-postgres/" description="Learn how to deploy PostgreSQL database and test read/write operations with Python." />
<LinkCard title="PostgreSQL Demo" href="/demos/04-postgres/" description="Learn how to deploy PostgreSQL database and test read/write operations with Python." />

<LinkCard title="LLM Model Demo" href="/demos/04-llm-model/" description="Learn how to deploy and configure language model applications." />
<LinkCard title="LLM Model Demo" href="/demos/05-llm-model/" description="Learn how to deploy and configure language model applications." />
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: JupyterHub Demo
title: JupyterHub
description: Deploy JupyterHub for multi-user Jupyter notebook environments.
---

Expand Down Expand Up @@ -68,6 +68,6 @@ Once JupyterHub is deployed and running:

Explore other demo applications to enhance your infrastructure:

<LinkCard title="PostgreSQL Demo" href="/demos/03-postgres/" description="Learn how to deploy PostgreSQL database and test read/write operations with Python." />
<LinkCard title="PostgreSQL Demo" href="/demos/04-postgres/" description="Learn how to deploy PostgreSQL database and test read/write operations with Python." />

<LinkCard title="LLM Model Demo" href="/demos/04-llm-model/" description="Learn how to deploy and configure language model applications." />
<LinkCard title="LLM Model Demo" href="/demos/05-llm-model/" description="Learn how to deploy and configure language model applications." />
2 changes: 1 addition & 1 deletion src/content/docs/demos/04-llm-model.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: LLM Model Demo
title: LLM Model
description: Deploy and test LLM models integrated with OpenAI API.
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: PostgreSQL Demo
title: PostgreSQL
description: Deploy PostgreSQL database using Helm charts from the registry.
---

Expand Down
Loading