types, rough billing draft

This commit is contained in:
niko
2026-07-05 15:56:24 +01:00
parent 204081ce23
commit 6b84d55928
6 changed files with 285 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
# PLANNED - NON FINAL
Pricing based on resource usage.
CPU: cores * 0.50 EUR / month (*2 for dedicated)
RAM: GB * 0.50 EUR / month
Disk: GB * 0.10 EUR / month
Final pricing: ceil((cpu * monthlyPercent) + (ram * monthlyPercent) + disk)
Where monthlyPercent is average usage over the month, expressed as a percentage of the total allocated resources. Therefore, if a user has 16 cores allocated, but only uses 100% on 8 cores on average over the month, the monthlyPercent for CPU would be 50%. This allows for fair pricing based on actual resource consumption rather than just allocated resources.
+52
View File
@@ -0,0 +1,52 @@
# AstraLab Proxmox Cluster: Service Terms & Acceptable Use
Welcome - before you get access to your VM, there are a few ground rules. We presume you have been briefed by the operator who created your account, however even if you have, please read below carefully. It will state what you are and are not allowed to do, and guidelines.
The IP address for the cluster is 81.174.144.35. Unless agreed otherwise, your VM will have outbound traffic routed through servers in Norway (141.98.253.71) or Ireland (TBC). Inbound traffic will have to manually be routed by an operator, therefore for port openings, please contact an operator and provide source domain(s) and port(s).
## Operator Contact Information
- Robyn-Dawn <robyn@astralab.nexus> - Infrastructure Manager
- Alex <alexwi@astralab.nexus> - Junior Infrastructure Engineer
Please contact one of the above if you need a port opening or have any issues.
# Billing and Usage
Your VM(s) will be billed on a monthly basis on the resources used in the calendar month. This includes CPU, RAM, storage and bandwidth, where applicable. If your usage changes, your billing may be adjusted accordingly. Non-payment may result in suspension or removal of your VM and account after a 1 week grace period. If you have financial difficulties, please contact an operator as soon as possible to assist.
## Forbidden Actions
You may not:
- Abuse shared infrastructure (i.e excessive CPU/network abuse, attempt to break out into forbidden systems, etc.)
- Run malicious services (DDoS, botnets, scanning, command and control ['C2'], exploitation, etc.).
- Host content or engage in activity that may violate laws of the United Kingdom of Great Britain and Northern Ireland, the Republic of South Africa, the Republic of Ireland or the Kingdom of Norway.
- Attempt to interfere with other users, VMs or the host system(s).
## Network and Security
- Monitoring of resource usage and VM status is in place to ensure stability and security of the platform.
- You are responsible for securing your own VM. This includes updates, passwords, exposed services, amongst others. Follow basic security procedures that fit your usage.
## Stability
- This is a shared environment, if something you run starts impacting others, it will be throttled, limited or shut down.
- Operators will always try to give a heads-up where possible before this action occurs. However, in extreme cases, this may not be possible.
- This is not a cloud service provider. 100% uptime is not guaranteed. If there are planned (or unplanned) maintenance, an operator will alert the appropriate channels.
## Data & Backups
- Backups are not guaranteed unless explicitly stated.
- Assume you are responsible for your own data safety.
- In the unfortunate event of catastrophic failure, recovery may not be possible.
- We rely on a third-party (remote-backups.com) to handle off-site backups of critical infrastructure to ensure a 3-2-1 backup policy.
## Access and Control
- Your access is limited to your assigned VM(s).
- Proxmox permissions are restricted intentionally - no host-level access will be provided.
## Fair Use and Common Sense Clause
If youre unsure whether something is okay — ask.
If it looks sketchy, it probably is.
## Final Note
This is a privately run service. Things are designed to be reliable, but flexibility and manual intervention are part of the deal.
By continuing, you agree to follow these terms.
If you don't - access may be revoked.
Let's keep it stable, useful, and fun.
Last Modified: 2026-04-08 21:09 UTC by Robyn-Dawn
+50
View File
@@ -0,0 +1,50 @@
{
"name": "pve-guest-dash",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "pve-guest-dash",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"dotenv": "^17.4.2",
"proxmox-api": "^1.1.1"
}
},
"node_modules/dotenv": {
"version": "17.4.2",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
"integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/proxmox-api": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/proxmox-api/-/proxmox-api-1.1.1.tgz",
"integrity": "sha512-2qH7pxKBBHa7WtEBmxPaBY2FZEH2R04hqr9zD9PmErLzJ7RGGcfNcXoS/v5G4vBM2Igmnx0EAYBstPwwfDwHnA==",
"license": "GPL-3.0",
"dependencies": {
"undici": "^6.19.8"
},
"funding": {
"url": "https://github.com/sponsors/urielch"
}
},
"node_modules/undici": {
"version": "6.27.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz",
"integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==",
"license": "MIT",
"engines": {
"node": ">=18.17"
}
}
}
}
+20
View File
@@ -0,0 +1,20 @@
{
"name": "pve-guest-dash",
"version": "1.0.0",
"description": "",
"repository": {
"type": "git",
"url": "https://git.possu.ms/AstraDCTeam/pve-guest-dash"
},
"license": "ISC",
"author": "",
"type": "commonjs",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"dotenv": "^17.4.2",
"proxmox-api": "^1.1.1"
}
}
+44
View File
@@ -0,0 +1,44 @@
{
// Visit https://aka.ms/tsconfig to read more about this file
"compilerOptions": {
// File Layout
// "rootDir": "./src",
// "outDir": "./dist",
// Environment Settings
// See also https://aka.ms/tsconfig/module
"module": "nodenext",
"target": "esnext",
"types": [],
// For nodejs:
// "lib": ["esnext"],
// "types": ["node"],
// and npm install -D @types/node
// Other Outputs
"sourceMap": true,
"declaration": true,
"declarationMap": true,
// Stricter Typechecking Options
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
// Style Options
// "noImplicitReturns": true,
// "noImplicitOverride": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
// "noFallthroughCasesInSwitch": true,
// "noPropertyAccessFromIndexSignature": true,
// Recommended Options
"strict": true,
"jsx": "react-jsx",
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"moduleDetection": "force",
"skipLibCheck": true,
}
}
+108
View File
@@ -0,0 +1,108 @@
export type User = {
username: string;
displayName: string;
email: string;
password: string; // SHOULD BE EXCLUDED FROM ANY API RESPONSE. AND WON'T BE STORED IN PLAINTEXT, I AM NOT STUPID. I THINK.
id: Number;
flags: {
suspended: boolean;
operator: boolean; // This is basically SU. This will be given out by DB access.
};
}
export type Group = {
name: string;
id: Number;
flags: {
suspended: boolean;
};
members: User[];
contacts: {
billing: User[];
support: User[];
technical: User[];
other: User[];
}
billing: {
method: string;
frequency: string;
total: Number;
}
}
export type IP = {
vlan: Number; // 20: Management, 30: Internal, 40: Guest, 99: Unused
subnet: string; // /32, /30, /29, etc. Unlikely to be anything other than /32, but you never know.
device: Number; // 192.168.VLAN.DEVICE/SUBNET
}
export type Node = {
name: string;
id: Number;
status: string;
mgmtIp: IP;
type: string;
cpu: {
cores: Number;
threads: Number;
};
memory: {
total: Number;
};
storage: {
total: Number;
used: Number;
};
}
export type Instance = {
name: string;
id: Number;
status: "running" | "stopped" | "suspended" | "error";
node: Node;
ip: IP;
assigned: User | Group;
pve: {
vmid: Number;
type: "qemu" | "lxc";
};
history: {
suspended: {
reason: string;
actionRequired: boolean | null;
admin: User;
date: Date;
};
unsuspended: {
reason: string;
admin: User;
date: Date;
};
requested: {
action: "creation" | "deletion" | "modification" | null;
date: Date;
completedDate: Date | null;
};
}[];
config: {
cpu: {
cores: Number;
threads: Number;
shared: boolean;
};
memory: {
total: Number; // in MB
};
storage: {
total: Number; // in GB
used: Number; // in GB
host: string; // Will either be local or vaporygon (or whatever storage is added later)
}[];
bandwidth: {
total: Number;
used: Number;
speedCap: Number; // in kbps
};
highAvailability: boolean;
}
}