Skip to content

Commit

Permalink
fix: naively updated template ID refs
Browse files Browse the repository at this point in the history
  • Loading branch information
lewistorrington committed Jul 12, 2024
1 parent 994d353 commit 9f5891e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ cluster = {
# OS: template storage UUID, all available os templates can be retrieved by calling manager.get_templates()
# Note: the storage os template uuid:s will change when OS is updated. So check that the UUID is correct
# default tier: maxIOPS, the 100k IOPS storage backend
Storage(os='01000000-0000-4000-8000-000030200200', size=10),
Storage(os='01000000-0000-4000-8000-000030240200', size=10),
# secondary storage, hdd for reduced speed & cost
Storage(size=100, tier='hdd')
],
Expand All @@ -81,7 +81,7 @@ cluster = {
hostname='web2.example.com',
zone='uk-lon1',
storage_devices=[
Storage(os='01000000-0000-4000-8000-000030200200', size=10),
Storage(os='01000000-0000-4000-8000-000030240200', size=10),
Storage(size=100, tier='hdd'),
],
login_user=login_user
Expand All @@ -93,7 +93,7 @@ cluster = {
hostname='db.example.com',
zone='uk-lon1',
storage_devices=[
Storage(os='01000000-0000-4000-8000-000030200200', size=10),
Storage(os='01000000-0000-4000-8000-000030240200', size=10),
Storage(size=100),
],
login_user=login_user
Expand All @@ -103,7 +103,7 @@ cluster = {
hostname='balancer.example.com',
zone='uk-lon1',
storage_devices=[
Storage(os='01000000-0000-4000-8000-000030200200', size=10)
Storage(os='01000000-0000-4000-8000-000030240200', size=10)
],
login_user=login_user
)
Expand Down
2 changes: 1 addition & 1 deletion docs/Server.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ server = Server(
hostname = "web1.example.com",
zone = 'uk-lon1',
storage_devices = [
Storage(os = "01000000-0000-4000-8000-000030200200", size=10),
Storage(os = "01000000-0000-4000-8000-000030240200", size=10),
Storage(size=10, tier="hdd")
])

Expand Down
2 changes: 1 addition & 1 deletion docs/Storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Tiers:

### Templates

Public templates such as the 01000000-0000-4000-8000-000030200200 can be cloned by anyone to get a pre-installed
Public templates such as the 01000000-0000-4000-8000-000030240200 can be cloned by anyone to get a pre-installed
server image that is immediately ready to go. A user can also create private templates for themselves out of
any storage. Storages can be cloned from templates during server creation.

Expand Down
11 changes: 6 additions & 5 deletions upcloud_api/cloud_manager/server_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def create_server(self, server: Server) -> Server:
zone = "uk-lon1",
labels = [Label('role', 'example')],
storage_devices = [
Storage(os = "01000000-0000-4000-8000-000030200200", size=10, tier=maxiops, title='Example OS disk'),
Storage(os = "01000000-0000-4000-8000-000030240200", size=10, tier=maxiops, title='Example OS disk'),
Storage(size=10, labels=[Label('usage', 'data_disk')]),
Storage()
title = "My Example Server"
Expand All @@ -107,10 +107,11 @@ def create_server(self, server: Server) -> Server:
(id is a running starting from 1)
- tier defaults to maxiops
- valid operating systems are for example:
* CentOS 8: 01000000-0000-4000-8000-000050010400
* Debian 10: 01000000-0000-4000-8000-000020050100
* Ubuntu 20.04: 01000000-0000-4000-8000-000030200200
* Windows 2019: 01000000-0000-4000-8000-000010070300
* Debian GNU/Linux 12 (Bookworm): 01000000-0000-4000-8000-000020070100
* Ubuntu Server 24.04 LTS (Noble Numbat): 01000000-0000-4000-8000-000030240200
* Rocky Linux 9: 01000000-0000-4000-8000-000150020100
* Windows Server 2022 Standard: 01000000-0000-4000-8000-000010080300
(for a more up-to-date listing, use UpCloud's CLI: `upctl storage list --public --template`.)
"""
if isinstance(server, Server):
Expand Down

0 comments on commit 9f5891e

Please sign in to comment.