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
73 changes: 73 additions & 0 deletions docs/PodsAndPodTemplates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Pods and Pod Templates

## Terminology
List of common terms that will be used throughout this guide.
- **Pod**: Virtual machine environment that is cloned and users have hands on access to.
- **Pod Template**: Baseline configuration for a pod stored both on Proxmox and Kamino.
- **Template Pool**: Where pod templates are stored and configured on Proxmox.
- **Virtual Machine Template**: Pre-installed virtual machine from an ISO image that is then turned into a template to be easily cloned and edited.

## Workflow
These are the steps to create, configure, and publish your own Pod Template in Kamino.
1. **Create Template Pool**: Use the Create Template wizard to create your new template pool in Proxmox.
2. **Configure Template Pool**: Make any configurations or additions to the virtual machines in the template pool.
3. **Publish Pod Template**: Publish a new Pod Template in Kamino by using the Publish Template wizard.
4. **Clone Pod Template**: Clone the Pod Template to create a new Pod.

<br>

### **1. Create Template Pool**
This is where you will follow the steps outlined in the **Create Template** wizard to create your new template pool in Proxmox.

#### 1.1 Template Name
Define a unique name for your template pool. EX: *CIS4670_01_Lab1*

#### 1.2 Router Option
Select whether to automatically create and configure a router for your template pool.
- If **Yes**, all of the VMs will be connected to the router with 1:1 NATing.
- If **No**, you will need to manually configure networking for each VM.

#### 1.3 Select VMs
Select virtual machines from a list of pre-installed virtual machine templates in Proxmox to be automatically added to your template pool.

#### 1.4 Review
Review your template pool configuration and make any necessary changes including naming the virtual machines.

<br>

### **2. Configure Template Pool**
Make any configurations or additions to the virtual machines in the template pool in Proxmox.

#### 2.1 Select Template Pool
Select the template pool you created in the previous step.

#### 2.2 Configure VMs
Configure or create virtual machines in the template pool as needed.

<br>

### **3. Publish Pod Template**
Publish a new Pod Template in Kamino by using the Publish Template wizard.

#### 3.1 Select Template Pool
Select the template pool from the dropdown menu that you created in the first step.

#### 3.2 Configure Details
Add a description, list of authors, number of VMs, and an image to your template. Note: The description is the only required field.

#### 3.3 Review
Review your personalization settings with a preview of the template in the Kamino interface in addition to determining the visibility of the template.

- **Visible**: Template is able to be cloned by any user using Kamino.
- **Hidden**: Template is only visible and able to be cloned by Administrators.

<br>

### **4. Clone Pod Template**
Templates can be cloned in two main ways.

#### 4.1 User Clone
General users will login to Kamino and see all visible templates. They can clone these templates to create their own Pod to interact with.

#### 4.2 Administrator Clone
Administrators can clone templates from the Kamino interface. They can clone any amount of pods on behalf of other users or groups.
92 changes: 54 additions & 38 deletions my-app/app/admin/admin-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client"
"use client";

import * as React from "react"
import Image from "next/image"
import { NavUser } from "@/components/nav-user"
import { useAuth } from "@/contexts/auth-context"
import * as React from "react";
import Image from "next/image";
import { NavUser } from "@/components/nav-user";
import { useAuth } from "@/contexts/auth-context";
import {
Sidebar,
SidebarContent,
Expand All @@ -15,9 +15,17 @@ import {
SidebarMenuButton,
SidebarMenuItem,
SidebarFooter,
} from "@/components/ui/sidebar"
import { Copy, CopyPlusIcon, Edit, LayoutDashboard, Rocket, Server, User } from "lucide-react"
import { IconUsersGroup } from "@tabler/icons-react"
} from "@/components/ui/sidebar";
import {
Copy,
CopyPlusIcon,
Edit,
LayoutDashboard,
Rocket,
Server,
User,
} from "lucide-react";
import { IconUsersGroup } from "@tabler/icons-react";

const data = {
navMain: [
Expand All @@ -29,8 +37,8 @@ const data = {
title: "User Panel",
url: "/",
isActive: false,
icon: LayoutDashboard
}
icon: LayoutDashboard,
},
],
},
{
Expand All @@ -41,19 +49,19 @@ const data = {
title: "Users",
url: "/admin/users",
isActive: false,
icon: User
icon: User,
},
{
title: "Groups",
url: "/admin/groups",
isActive: false,
icon: IconUsersGroup
icon: IconUsersGroup,
},
{
title: "Deployed Pods",
url: "/admin/pods/deployed",
isActive: false,
icon: Rocket
icon: Rocket,
},
// {
// title: "Pod Templates",
Expand All @@ -65,8 +73,8 @@ const data = {
title: "Virtual Machines",
url: "/admin/vms",
isActive: false,
icon: Server
}
icon: Server,
},
],
},
{
Expand All @@ -77,45 +85,39 @@ const data = {
title: "All Templates",
url: "/admin/pods/templates",
isActive: false,
icon: Copy
icon: Copy,
},
{
title: "Publish Templates",
title: "Publish Template",
url: "/admin/pods/templates/publish",
isActive: false,
icon: Edit
icon: Edit,
},
{
title: "Create Templates",
title: "Create Template",
url: "/admin/pods/templates/create",
isActive: false,
icon: CopyPlusIcon
}
icon: CopyPlusIcon,
},
],
},
{
title: "Guides",
url: "#",
items: [
{
title: "Templates",
url: "/admin/guides/templates",
title: "Pods & Pod Templates",
url: "https://github.com/cpp-cyber/kamino-frontend/blob/main/docs/PodsAndPodTemplates.md",
isActive: false,
icon: Copy
},
{
title: "Users & Groups",
url: "/admin/guides/users",
isActive: false,
icon: User
icon: Copy,
},
],
}
},
],
}
};

export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
const { authState } = useAuth()
const { authState } = useAuth();

return (
<Sidebar variant="floating" {...props}>
Expand All @@ -124,10 +126,18 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
<SidebarMenuItem>
<SidebarMenuButton size="lg" className="h-15 pb-3 mb-3" asChild>
<a href="/admin/dashboard">
<Image src="/kaminoLogo.svg" alt="Logo" width={40} height={40} className="size-10" />
<Image
src="/kaminoLogo.svg"
alt="Logo"
width={40}
height={40}
className="size-10"
/>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate text-lg font-bold">Kamino</span>
<span className="truncate text-xs text-muted-foreground">Admin Dashboard</span>
<span className="truncate text-xs text-muted-foreground">
Admin Dashboard
</span>
</div>
</a>
</SidebarMenuButton>
Expand All @@ -137,7 +147,9 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
<SidebarContent>
{data.navMain.map((item) => (
<SidebarGroup key={item.title}>
<SidebarGroupLabel className="text-lg text-muted-foreground">{item.title}</SidebarGroupLabel>
<SidebarGroupLabel className="text-lg text-muted-foreground">
{item.title}
</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{item.items?.map((item) => (
Expand All @@ -156,8 +168,12 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
))}
</SidebarContent>
<SidebarFooter>
{authState.username && <NavUser user={{ name: authState.username, isAdmin: authState.isAdmin }} />}
{authState.username && (
<NavUser
user={{ name: authState.username, isAdmin: authState.isAdmin }}
/>
)}
</SidebarFooter>
</Sidebar>
)
);
}
29 changes: 0 additions & 29 deletions my-app/app/admin/guides/snapshots/page.tsx

This file was deleted.

Loading