Can Terraform be used to provision on-premises servers?

前端 未结 3 1592
后悔当初
后悔当初 2021-02-02 10:06

I\'m new to Terraform, but how to say run it on a regular server? Is it possible? I am talking - regular on premises machine

相关标签:
3条回答
  • 2021-02-02 10:19

    By default, Terraform does not support bare metal provisioning services for on-prem equipment. However, the Open Source project; Digital Rebar Provision (DRP), has a Terraform Provider that allows the Terraform DSL to operate in conjunction with DRP. The Provider enables full support of bare metal provisioning by use of the Terraform DSL which drives the API of DRP to enable provisioning of bare metal.

    The Digital Rebar Provision Terraform Provider is written and supported by RackN. You will need to install the DRP service on-prem, and configure it to enable provisioning workflows that are appropriate for your needs. Once this is done, the Terraform Provider then enables "ready state" infrastructure access to request Machines from the "terraform ready" pool of servers. The servers are then driven through the requested Workflow to configure it according to the operators needs.

    On "destroy", the machine is cleaned, and returned back to the "terraform ready" pool of servers again. You can find "quickstart" information on getting DRP up and running by visiting the RackN hosted Portal.

    As has been pointed out by @Martin Atkins; terraform drives other infrastructure or cloud resources via APIs. This is true also for Digital Rebar Provision. Terraform itself does not know how to interact with bare metal infrastructure. Use of a control or orchestration engine that understands how to address physical systems is required. In this solution - Terraform drives the Digital Rebar Provision service via the DSL, thus enabling provisioning activities of physical server systems on-prem.

    For full disclosure - I work for RackN - which fosters and supports the Digital Rebar Provision service and capability.

    0 讨论(0)
  • 2021-02-02 10:23

    Terraform operates by calling into the APIs of various service providers and systems. Thus in principle Terraform can manage anything that has an API, and in practice it has existing support for a few different on-premises-capable systems, including:

    • OpenStack
    • VMWare vSphere
    • CloudStack

    If the compute resources in your existing datacenter infrastructure are already managed with one of these systems, or if you are willing to install them, then Terraform can be used to manage at least parts of these systems. (For full details, see the documentation for each provider linked above.)

    Terraform's plugin architecture allows support for other systems to be developed, so other API-driven datacenter management systems such as The Foreman could be supported by Terraform, and indeed third parties have developed integrations with others that are distributed outside of the "official set" that HashiCorp hosts.

    0 讨论(0)
  • 2021-02-02 10:25

    The question is vaguely understandable but,

    If it means that you want to write Infrastructure-as-Code for your personal on premises servers the answer is NO. Refer to Martin Atkins' answer.

    If it means that you want to ssh into your on premises servers and execute terraform routines (plan, apply, destroy etc.), the answer is YES.

    Download the suitable binary into your server operating system from here.

    0 讨论(0)
提交回复
热议问题