arvan_provision_server
Automate server creation and initial setup on ArvanCloud with cloud-init, package installs, Docker, and custom scripts in one call.
Instructions
Provision a server and (optionally) configure it, in one call.
Supports several configuration methods (combine as needed):
init_script— cloud-init that runs at first boot (no SSH needed).packages/install_docker/setup_script— run over SSH after boot (builds and runs abashscript). For Terraform-based provisioning use thearvan_iac_terraform_*tools; for Kubernetes use thearvan_k8s_*/arvan_helm_*tools.
Steps: register/generate an SSH key, create the server (optionally with
cloud-init), wait for boot, detect its public IP, then SSH in and run the
install script built from packages / install_docker / setup_script.
Args:
name: Server name.
flavor_id: Plan id (see arvan_list_plans).
image_id: Image id (see arvan_list_images).
region: Region; defaults to ARVAN_DEFAULT_REGION.
disk_size: Root disk size (GB).
networks: Network ids to attach (include a public network for SSH).
security_group_names: Security groups to apply.
ssh_public_key: Existing public key to inject. If omitted and
generate_ssh_key is true, a new ed25519 keypair is generated
and the private key is returned (store it securely!).
ssh_key_name: Name to register the key under (default <name>-key).
generate_ssh_key: Generate a keypair when no public key is given.
ssh_user: SSH user for the install step (default ARVAN_SSH_USER/root).
ssh_password: Use password auth for the install step instead of a key.
packages: apt packages to install.
install_docker: Install Docker via get.docker.com.
setup_script: Extra shell commands to run after package install.
wait_timeout: Max seconds to wait for boot + SSH availability.
host_override: Use this IP/host for SSH instead of auto-detection.
Returns a summary with the server details, public IP, SSH info (incl. any generated private key), and install output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| flavor_id | Yes | ||
| image_id | Yes | ||
| region | No | ||
| disk_size | No | ||
| networks | No | ||
| security_group_names | No | ||
| ssh_public_key | No | ||
| ssh_key_name | No | ||
| generate_ssh_key | No | ||
| ssh_user | No | ||
| ssh_password | No | ||
| packages | No | ||
| install_docker | No | ||
| setup_script | No | ||
| init_script | No | ||
| wait_timeout | No | ||
| host_override | No |