Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 4.58 KB

stackit_server_create.md

File metadata and controls

76 lines (57 loc) · 4.58 KB

stackit server create

Creates a server

Synopsis

Creates a server.

stackit server create [flags]

Examples

  Create a server with a boot volume with source type image
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64

  Create a server with a boot volume from an existing volume
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type volume

  Create a server with a keypair
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --keypair-name example

  Create a server with a network interface
  $ stackit server create --machine-type g2i.1 --name server1 --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --network-interface-ids yyy

  Create a server with an attached volume
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --volumes zzz

  Create a server with user data (cloud-init)
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --user-data @path/to/file.yaml

  Create a server with provisioned agent
  $ stackit server create --machine-type g2i.1 --name server1 --network-id yyy --boot-volume-source-id xxx --boot-volume-source-type image --boot-volume-size 64 --agent-provisioning-policy ALWAYS

Options

      --affinity-group string                            The affinity group the server is assigned to
      --agent-provisioning-policy string                 Whether to provision an agent on server creation, (one of: [ALWAYS, NEVER, INHERIT]) (default "INHERIT")
      --availability-zone string                         The availability zone of the server
      --boot-volume-delete-on-termination[=true|false]   Delete the volume during the termination of the server. Defaults to false
      --boot-volume-performance-class string             Boot volume performance class
      --boot-volume-size int                             The size of the boot volume in GB. Must be provided when 'boot-volume-source-type' is 'image'
      --boot-volume-source-id string                     ID of the source object of boot volume. It can be either an image or volume ID
      --boot-volume-source-type string                   Type of the source object of boot volume. It can be either  'image' or 'volume'
  -h, --help[=true|false]                                Help for "stackit server create"
      --keypair-name string                              The name of the SSH keypair used during the server creation
      --labels stringToString                            Labels are key-value string pairs which can be attached to a server. E.g. '--labels key1=value1,key2=value2,...' (default [])
      --machine-type string                              Name of the type of the machine for the server. Possible values are documented in https://docs.stackit.cloud/products/compute-engine/server/basics/machine-types/
  -n, --name string                                      Server name
      --network-id string                                ID of the network for the initial networking setup for the server creation
      --network-interface-ids strings                    List of network interface IDs for the initial networking setup for the server creation
      --security-groups strings                          The initial security groups for the server creation
      --service-account-emails strings                   List of the service account mails
      --user-data string                                 User data that is passed via cloud-init to the server
      --volumes strings                                  The list of volumes attached to the server

Options inherited from parent commands

  -y, --assume-yes[=true|false]   If set, skips all confirmation prompts
      --async[=true|false]        If set, runs the command asynchronously
  -o, --output-format string      Output format, (one of: [json, pretty, none, yaml])
  -p, --project-id string         Project ID
      --region string             Target region for region-specific requests
      --verbosity string          Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")

SEE ALSO