- عنوان کتاب: Terraform at Scale -Patterns, Practices, and Pitfalls of Enterprise Terraform and OpenTofu Development
- نویسنده: Robert Glenn
- حوزه: Terraform
- تعداد صفحه: 688
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 6.39 مگابایت
این کتاب قرار است یک راهنمای میدانی باشد که بر آنچه ممکن است برای انجام کار خود در حال حاضر نیاز داشته باشید، تمرکز کند. با این حال، قبل از اینکه وارد بحث شویم، میخواهم لحظهای را صرف کنم تا به طور خلاصه شما را در جریان چگونگی رسیدن به اینجا قرار دهم. در گذشتهای نه چندان دور، مدیریت سیستم نیاز به تعامل فیزیکی با سرورهای مجزا و استفاده از اسکریپتهای پوسته برای پیکربندی وضعیت هر دستگاه داشت. ظهور مجازیسازی و ابرهای خصوصی اولیه با اجازه دادن به مدیران سیستم (sysadmins) برای کار از راه دور و استانداردسازی تصاویر ماشین مجازی (VM) و کاهش تنوع نامعتبر، این فرآیند را بهبود بخشید. این تکامل توسط ارائه دهندگان خدمات ابری عمومی (CSPs) مانند خدمات وب آمازون (AWS) تسریع و دموکراتیزه شد، که قدرت محاسباتی را به کالایی تبدیل کردند: به جای خرید مستقیم کامپیوترها، و در نتیجه متحمل شدن از چالشهای دوگانه پیمایش تخفیف عمده و استهلاک قابل توجه (که هر دو نیاز به پیشبینی دارند و هیچ یک از آنها مستقیماً با درآمد متناسب نیستند)، شرکتها میتوانستند قدرت مورد نیاز خود را اجاره کنند. این امر یک هزینه سرمایهای قابل توجه را به یک هزینه عملیاتی تبدیل کرد، که به معنای بازههای زمانی بسیار کوتاهتر برای پیشبینی و هزینههایی بود که بسیار بیشتر به خروجی موجود و در نتیجه درآمد مرتبط بودند. با این حال، علیرغم این پیشرفتها، مدیران سیستم هنوز هم به اسکریپتهای شلِ گاهی شکننده و عمدتاً رویهای، به ویژه برای تأمین آخرین مایل (و گاهی برای اصلاح) متکی بودند. از آنجا که مجموعه کامل اسکریپتها معمولاً فقط در زمان تأمین و توسط اپراتورهای ممتاز اجرا میشد، جلوگیری از رانش وضعیت یا مدیریت کارآمد محیطهای تکراری متعدد – که اغلب از نظر طراحی کاملاً یکسان نبودند – مورد نیاز توسعه نرمافزار چابک دشوار بود. اگرچه این به معنای کار ثابت و بسیار محترم برای مدیران سیستم محترم بود، اما به هیچ وجه یک کار بدون ریسک یا استرس (یا ثابت، از نظر حجم کار) نبود. برای پرداختن بهتر به این چالشهای رو به رشد، زیرساخت خودتوان به عنوان کد (IaC) معرفی شد. IaC به مدیران سیستم اجازه میدهد تا انبوه اسکریپتهای شلِ بسیار متراکم و غیرمستمر را با پیکربندیهای خودسازگار و تکرارپذیر جایگزین کنند که میتوانند یک سیستم را به حالت مطلوب همگرا کنند. این رویکرد به ویژه در محیطهای چندابری و ابری-ترکیبی ارزشمند است و امکان استقرار قابل اعتماد را فراهم میکند و در عین حال هزینه تغییر زمینه در پلتفرمهای مختلف را کاهش میدهد. در نتیجه، نقش مدیر سیستم به مهندس نرمافزار زیرساخت تبدیل شده است که اکنون پیکربندیها را با زبانهای خاص دامنه (DSL) مانند زبان پیکربندی HashiCorp (HCL) مینویسد. با این حال، از آنجا که HCL به شدت تفسیر شده و قالببندی آزادانهای دارد، سازمانها اغلب “گویشهای” متمایزی از کد را توسعه میدهند – گاهی اوقات بیش از یک و اغلب هیچ کدام به طور قابل توجهی معتبرتر از بقیه نیستند. این امر، اعمال کیفیت و سازگاری در مقیاس، یا ایجاد بهترین شیوههای قطعی که حداکثر مناسب برای هر موقعیتی باشند را دشوار میکند. در نهایت، پیادهسازی Terraform و OpenTofu (یک انشعاب متنباز از Terraform نسخه ۱.۵.۶ که عمدتاً به عنوان یک پروژه موازی عمل میکند) نیازمند انتخابهای طراحی متفکرانه و سیستماتیک است زیرا چالشهای زیرساختی را نمیتوان صرفاً با اضافه کردن مهندسان بیشتر یا اتوماسیون حل کرد.
This book is intended to be a field guide focusing on what you might need to do your job now. However, before we dive in, I want to spend a moment to briefly walk you through how we got here. Not so long ago as to evade memory for many, system administration required physical interaction with individual servers and the use of shell scripts to configure each machine’s state. The advent of virtualization and early private clouds improved this process by allowing system administrators (sysadmins) to operate remotely and standardize virtual machine (VM) images, reducing invalid variability. This evolution was accelerated and democratized by public cloud service providers (CSPs) such as Amazon Web Services (AWS), which commodified compute power: rather than buying computers directly, and thus suffering from the dual challenges of navigating bulk discounting and significant depreciation (both of which require foresight and neither of which are directly proportional to revenue), companies could rent the power they needed. This turned a significant capital expense into an operating expense, which meant much shorter time frames to forecast and costs that were much more related to existing output and thus revenue. However, despite these advancements, sysadmins still relied on sometimes brittle, largely procedural shell scripts, especially for last-mile provisioning (and sometimes for remediation). Because the full battery of scripts was typically run only at time of provisioning, and by privileged operators, it was difficult to prevent state drift or efficiently manage the multiple duplicate — often not perfectly identical, by design — environments required by agile software development. Although this meant steady, highly revered work for the venerable sysadmins, it was by no means a risk- or stress-free (or steady, in terms of workload) job. To better address these ever-growing challenges, idempotent infrastructure as code (IaC) was introduced. IaC allows sysadmins to replace the multitude of circuitous, highly dense shell scripts with self-consistent, repeatable configurations that can converge a system to a desired state. This approach is especially valuable in multicloud and hybrid-cloud environments, enabling reliable deployments while reducing the cost of context-switching across disparate platforms. Consequently, the role of the sysadmin has morphed into the infrastructure software engineer who now writes configurations in Domain-Specific Languages (DSLs) such as HashiCorp Configuration Language (HCL). However, because HCL is heavily interpreted and loosely formatted, organizations often develop distinct “dialects” of code — sometimes more than one and often none significantly more valid than the rest. This makes it difficult to enforce quality and consistency at scale, or to construct definitive best practices that are maximally appropriate to every situation. Ultimately, implementing Terraform and OpenTofu (an open source fork of Terraform v1.5.6, largely operating as a parallel project) requires thoughtful, systemic design choices because infrastructure challenges cannot be solved simply by adding more engineers or automation.
این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:
Download: Terraform at Scale





نظرات کاربران