Creating a VM template (with the stc utility)
Раздел «For platform administrators»: быстрый переход по подразделам
На этой странице
Create a virtual machine to build the template.
Installing stc
Note! Run STC on a workstation (not on a cluster host) with Linux. If you use a mirror, specify the mirror name (registry) the same way you did when deploying the platform.
Run the command to download the binary:
Command
wget URL -O stc
Replace URL with the link for the required version:
- https://public.shturval.tech/stc-2.12.0
- https://public.shturval.tech/stc-2.12.1
- https://public.shturval.tech/stc-2.13.0
- https://public.shturval.tech/stc-2.13.1
Make the downloaded file executable:
Command
chmod +x ./stc
Run the stc template command with your parameter values.
All available stc template command parameters
| Parameter | Required | Description |
|---|---|---|
--license | yes | License key for downloading packages |
--registry | no | Image registry and package repository address. Default is r.shturval.tech. Specify the registry used to install the Shturval platform |
--platform-version | no | Shturval platform version. See the Shturval release and Kubernetes version mapping |
--keep-cloud-init | no | Keep installed cloud-init. Required when creating a Yandex Cloud provider template. Default is false |
Template creation examples
1. Example: create a template using the public Shturval repository
./stc-2.13.0 template --license="ENTER-YOUR-LICENSE"
2. Example: create a template using a mirror
./stc-2.13.0 template --license="ENTER-YOUR-LICENSE" --registry="ENTER-YOUR-REGISTRY-ADDRESS"
In --registry, specify the registry used when installing the Shturval platform.
3. Example: create a template and keep installed cloud-init
./stc-2.13.0 template --license="ENTER-YOUR-LICENSE" --keep-cloud-init
Shut down the virtual machine in the virtualization platform. After the VM status becomes Powered off, create a template from it. The template will be available for adding to provider configuration.