Repository navigation
Expand file tree
/
Copy pathtemplate.yaml
More file actions
124 lines (121 loc) · 3.79 KB
/
Copy pathtemplate.yaml
File metadata and controls
124 lines (121 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: noderings-vm
title: NodeRings server
description: Order a NodeRings Compute Instance (billed) and register it in the catalog.
tags:
- noderings
- vps
- infrastructure
spec:
owner: guests
type: resource
parameters:
- title: Server
required: [hostname, planId, regionId, distro, sshKeyId]
properties:
hostname:
title: Hostname
type: string
pattern: '^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$'
description: Lowercase letters, digits and hyphens, at most 63 characters.
ui:autofocus: true
planId:
title: Plan id
type: string
description: The id of a plan from the NodeRings marketplace (https://noderings.com). The server is billed by this plan.
regionId:
title: Region id
type: string
description: A region the plan is offered in.
distro:
title: Operating system
type: string
default: DISTRO_UBUNTU_24_04
enum:
- DISTRO_UBUNTU_24_04
- DISTRO_UBUNTU_26_04
- DISTRO_UBUNTU_22_04
- DISTRO_DEBIAN_13
- DISTRO_DEBIAN_12
- DISTRO_FEDORA_44
- DISTRO_FEDORA_43
- DISTRO_ROCKY_10
- DISTRO_ROCKY_9
- DISTRO_ALMALINUX_10
- DISTRO_ALMALINUX_9
- DISTRO_CENTOS_10
- DISTRO_CENTOS_9
enumNames:
- Ubuntu 24.04
- Ubuntu 26.04
- Ubuntu 22.04
- Debian 13
- Debian 12
- Fedora 44
- Fedora 43
- Rocky Linux 10
- Rocky Linux 9
- AlmaLinux 10
- AlmaLinux 9
- CentOS Stream 10
- CentOS Stream 9
sshKeyId:
title: SSH key id
type: string
description: The id of an SSH key in your NodeRings organization.
- title: Ownership
required: [owner]
properties:
owner:
title: Owner
type: string
ui:field: OwnerPicker
ui:options:
catalogFilter:
kind: Group
steps:
- id: create-vm
name: Order NodeRings server
action: noderings:vm:create
input:
hostname: ${{ parameters.hostname }}
planId: ${{ parameters.planId }}
regionId: ${{ parameters.regionId }}
distro: ${{ parameters.distro }}
sshKeyIds:
- ${{ parameters.sshKeyId }}
entityRef: resource:default/${{ parameters.hostname }}
- id: fetch
name: Write catalog-info.yaml
action: fetch:template
input:
url: ./content
values:
name: ${{ parameters.hostname }}
owner: ${{ parameters.owner }}
tag: ${{ steps['create-vm'].output.tag }}
vmId: ${{ steps['create-vm'].output.vmId }}
ipv4: ${{ steps['create-vm'].output.ipv4 }}
# Publish the catalog-info.yaml where your catalog reads it, for example:
# - id: publish
# name: Publish
# action: publish:github
# input:
# repoUrl: github.com?owner=my-org&repo=${{ parameters.hostname }}-infra
# description: NodeRings server ${{ parameters.hostname }}
#
# - id: register
# name: Register
# action: catalog:register
# input:
# repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
# catalogInfoPath: /catalog-info.yaml
output:
text:
- title: Server
content: |
**${{ parameters.hostname }}** (`${{ steps['create-vm'].output.vmId }}`) is
`${{ steps['create-vm'].output.status }}` at `${{ steps['create-vm'].output.ipv4 }}`.
Tag: `${{ steps['create-vm'].output.tag }}`.