क्या आप सीखना चाहेंगे कि उबंटू लिनक्स पर टेराफॉर्म इंस्टॉलेशन कैसे करें? इस ट्यूटोरियल में, हम आपको दिखाने जा रहे हैं कि लिनक्स पर टेराफॉर्म को कैसे स्थापित किया जाए।

Terraform क्या है?

टेराफॉर्म, HashiCorp द्वारा विकसित और गो भाषा में लिखा एक बुनियादी ढांचा-जैसा-कोड सॉफ्टवेयर है।

यह एक उपयोगकर्ता को एक कॉन्फ़िगरेशन फ़ाइल बनाने की अनुमति देता है जो कई क्लाउड प्रदाताओं से कनेक्ट हो सकता है और संपूर्ण बुनियादी ढांचे को बना या अपडेट कर सकता है।

एक उदाहरण के रूप में, एक प्रशासक एक कॉन्फ़िगरेशन फ़ाइल बना सकता है जो अमेज़ॅन एडब्ल्यूएस क्लाउड में उबंटू लिनक्स का उपयोग करके स्वचालित रूप से 10 आभासी मशीनें बनाएगा और एज़्योर क्लाउड से कनेक्ट होगा और विंडोज़ चलाने वाली एक वर्चुअल मशीन बनाएगा।

टेराफॉर्म ट्यूटोरियल:

इस पृष्ठ पर, हम टेराफॉर्म से संबंधित ट्यूटोरियल की एक सूची तक त्वरित पहुंच प्रदान करते हैं।

ट्यूटोरियल - टेराफॉर्म इंस्टॉलेशन

लिनक्स कंसोल पर, आवश्यक सॉफ़्टवेयर स्थापित करने के लिए निम्न कमांड का उपयोग करें।

# apt-get update
# apt-get install wget unzip

तक पहुंच Terraform डाउनलोड पेज और अपने वातावरण के साथ संगत लिनक्स संस्करण प्राप्त करें।

Terraform Download

हम टेराफॉर्म सॉफ्टवेयर डाउनलोड करने के लिए WGET कमांड का उपयोग करने जा रहे हैं।

# mkdir /downloads/terraform -p
# cd /downloads/terraform
# wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip

टेराफॉर्म डाउनलोड को समाप्त करने के बाद, टेराफॉर्म इंस्टॉलेशन पैकेज को निकालें।

# unzip terraform_0.11.13_linux_amd64.zip

Archive: terraform_0.11.13_linux_amd64.zip
inflating: terraform

निम्नलिखित कमांड का उपयोग करके Ubuntu पर Terraform कमांड स्थापित करें:

# install terraform /usr/local/bin/

निम्न आदेशों का उपयोग करते हुए टेराफॉर्म इंस्टॉलेशन को सत्यापित करें:

# terraform -version
# terraform

आपको निम्न आउटपुट देखना चाहिए।

Usage: terraform [-version] [-help] <command> [args]

The available commands for execution are listed below.
The most common, useful commands are shown first, followed by
less common or more advanced commands. If you're just getting
started with Terraform, stick with the common commands. For the
other commands, please read the help and docs before usage.

Common commands:
apply Builds or changes infrastructure
console Interactive console for Terraform interpolations
destroy Destroy Terraform-managed infrastructure
env Workspace management
fmt Rewrites config files to canonical format
get Download and install modules for the configuration
graph Create a visual graph of Terraform resources
import Import existing infrastructure into Terraform
init Initialize a Terraform working directory
output Read an output from a state file
plan Generate and show an execution plan
providers Prints a tree of the providers used in the configuration
push Upload this Terraform module to Atlas to run
refresh Update local state file against real resources
show Inspect Terraform state or plan
taint Manually mark a resource for recreation
untaint Manually unmark a resource as tainted
validate Validates the Terraform files
version Prints the Terraform version
workspace Workspace management

All other commands:

बधाई हो! आप Ubuntu Linux पर Terraform स्थापित करने में सक्षम थे।

टेराफॉर्म बनाम Ansible

दोनों कोड के रूप में बुनियादी ढाँचे बनाने के लिए महान उत्पाद हैं।

दोनों उत्पादों का उपयोग जटिल आवश्यकताओं के साथ नेटवर्क वातावरण को तैनात करने के लिए किया जा सकता है।

एक सरल सादृश्य बनाने के लिए, हम कह सकते हैं कि एंसिबल एक आईटी स्वचालन उपकरण है, जबकि टेराफॉर्म का उपयोग करते हुए आपका एक कोड समाधान के रूप में अपने बुनियादी ढांचे का उपयोग करके एक संपूर्ण बुनियादी ढांचा तैयार किया जा सकता है, इसका मतलब है कि आप एक संपूर्ण नेटवर्क वातावरण बना सकते हैं जो कई क्लाउड में फैला है। अमेज़ॅन AWS, Google, Azure और अन्य जो एक साधारण कॉन्फ़िगरेशन फ़ाइल का उपयोग कर रहे हैं।

यहाँ एक बेहतर तुलना के बीच की कड़ी है Terraform vs Ansible.