هل ترغب في معرفة كيفية إجراء تثبيت Terraform على Ubuntu Linux؟ سنشرح لك في هذا البرنامج التعليمي كيفية تثبيت Terraform على نظام Linux.

ما هو Terraform؟

Terraform هو برنامج للبنية التحتية كرمز تم تطويره بواسطة HashiCorp ومكتوب بلغة GO.

يسمح للمستخدم بإنشاء ملف تكوين قد يتصل بمزودي خدمات سحابية متعددة وإنشاء أو تحديث بنية أساسية بأكملها.

على سبيل المثال ، يمكن للمسؤول إنشاء ملف تكوين يقوم تلقائيًا بإنشاء 10 أجهزة افتراضية باستخدام Ubuntu Linux في Amazon AWS cloud والاتصال بسحابة Azure وإنشاء جهاز ظاهري يعمل بنظام Windows.

تعليمي Terraform:

في هذه الصفحة ، نقدم وصولاً سريعًا إلى قائمة البرامج التعليمية المتعلقة بـ Terraform.

البرنامج التعليمي - Terraform التثبيت

على وحدة التحكم Linux ، استخدم الأوامر التالية لتثبيت البرنامج المطلوب.

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

الوصول إلىTerraform صفحة التحميل واحصل على إصدار Linux متوافق مع بيئتك.

Terraform Download

سنستخدم الأمر WGET لإجراء تنزيل برنامج Terraform.

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

بعد الانتهاء من تنزيل Terraform ، قم باستخراج حزمة تثبيت Terraform.

# unzip terraform_0.11.13_linux_amd64.zip

Archive: terraform_0.11.13_linux_amd64.zip
inflating: terraform

قم بتثبيت أمر Terraform على أوبونتو باستخدام الأمر التالي:

# install terraform /usr/local/bin/

تحقق من تثبيت Terraform باستخدام الأوامر التالية:

# terraform -version
# terraform

يجب أن تشاهد الإخراج التالي.

Usage: terraform [-version] [-help] [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:

تهانينا! لقد تمكنت من تثبيت Terraform على نظام Ubuntu Linux.

Terraform مقابل Ansible

كلاهما منتجات رائعة لإنشاء البنية التحتية كرمز.

يمكن استخدام كلا المنتجين لنشر بيئات الشبكة ذات المتطلبات المعقدة.

لإجراء تشبيه بسيط ، يمكننا أن نقول أن Ansible هي أداة للتشغيل الآلي لتقنية المعلومات أثناء استخدام Terraform your يمكن أن تنشئ بنية تحتية كاملة باستخدام بنيتها التحتية كحل ، وهذا يعني أنه يمكنك إنشاء بيئة شبكة كاملة تمتد عبر سحابة متعددة توفر الأمازون AWS ، جوجل ، أزور وغيرها باستخدام ملف التكوين بسيط.

هنا رابط لمقارنة أفضل بين Terraform مقابل Ansible.