{"id":37586,"date":"2019-10-31T22:18:27","date_gmt":"2019-10-31T19:18:27","guid":{"rendered":"https:\/\/prohoster.info\/blog\/infrastructure-as-code-pervoe-znakomstvo\/"},"modified":"2019-10-31T22:18:27","modified_gmt":"2019-10-31T19:18:27","slug":"infrastructure-as-code-pervoe-znakomstvo","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/infrastructure-as-code-pervoe-znakomstvo","title":{"rendered":"Infrastruktur\u00eb si kod: prezantimi i par\u00eb","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Ne kemi nj\u00eb proces onboarding t\u00eb ekipit SRE n\u00eb kompanin\u00eb ton\u00eb. Un\u00eb hyra n\u00eb t\u00eb gjith\u00eb k\u00ebt\u00eb histori nga ana e zhvillimit. Gjat\u00eb procesit kam pasur mendime dhe njohuri q\u00eb d\u00ebshiroj t\u00eb ndaja me zhvilluesit e tjer\u00eb. N\u00eb k\u00ebt\u00eb artikull-reflektim, flas p\u00ebr at\u00eb q\u00eb po ndodh, si po ndodh dhe si mundet secili t\u00eb jetoj\u00eb me k\u00ebt\u00eb m\u00eb pas. <\/p>\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/d154a2fbbd0dd846c763db178f02702e.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<blockquote><p><b>Vazhdimi i seris\u00eb s\u00eb artikujve t\u00eb shkruar mbi baz\u00ebn e prezantimeve n\u00eb ngjarjen ton\u00eb t\u00eb brendshme. <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/dodopizzaio\/blog\/462033\/\">DevForum<\/a><\/noindex><\/b>: <\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/dodopizzaio\/blog\/463469\/\">1. Macja e Schr\u00f6dinger-it pa kuti: problemi i konsensusit n\u00eb sistemet e shp\u00ebrndara.<\/a><\/noindex><br \/>\n2. Infrastruktur\u00eb si kod. (Ju jeni k\u00ebtu)<br \/>\n3. Gjenerimi i kontratave Typescript nga modelet c#. (N\u00eb proces&#8230;)<br \/>\n4. Hyrje n\u00eb algoritmin e konsensusit Raft. (N\u00eb proces&#8230;)<br \/>\n\u2026<\/p><\/blockquote>\n<p>\nNe vendos\u00ebm t\u00eb formonim nj\u00eb ekip SRE, duke realizuar idet\u00eb e <noindex><a rel=\"nofollow\" href=\"https:\/\/landing.google.com\/sre\/books\/\">google sre<\/a><\/noindex>. Mblodh\u00ebm programuesit nga zhvilluesit tan\u00eb dhe i d\u00ebrguam ata p\u00ebr t'u trajnuar p\u00ebr disa muaj. <\/p>\n<p>Para ekipit u paraqit\u00ebn k\u00ebto detyra m\u00ebsimore:<\/p>\n<ul>\n<li>T\u00eb p\u00ebrshkruajn\u00eb infrastruktur\u00ebn ton\u00eb, e cila p\u00ebr pjes\u00ebn m\u00eb t\u00eb madhe ndodhet n\u00eb Microsoft Azure, n\u00eb form\u00ebn e kodit (Terraform dhe gjith\u00e7ka n\u00eb lidhje me t\u00eb). <\/li>\n<li>T\u00eb m\u00ebsojn\u00eb zhvilluesit p\u00ebr t\u00eb punuar me infrastruktur\u00ebn. <\/li>\n<li>T\u00eb p\u00ebrgatisin zhvilluesit p\u00ebr turnet.<\/li>\n<\/ul>\n<p><\/p>\n<h2>Po zhvillojm\u00eb konceptin e Infrastruktur\u00ebs si kod.<\/h2>\n<p>\nN\u00eb modelin normal t\u00eb bot\u00ebs (administrimi klasik) njohurit\u00eb mbi infrastruktur\u00ebn ndodhen n\u00eb dy vende:<\/p>\n<ol>\n<li>Ose n\u00eb form\u00ebn e njohurive n\u00eb mendjet e ekspert\u00ebve.<img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/2400dea0a90c24b05c275b709bbd2057.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/li>\n<li>Ose k\u00ebto informacione ndodhen n\u00eb disa makineri, nj\u00eb pjes\u00eb e t\u00eb cilave i din\u00eb ekspert\u00ebt. Por nuk \u00ebsht\u00eb fakt se nj\u00eb person nga jasht\u00eb (n\u00ebse e gjitha ekipi yn\u00eb papritur nd\u00ebrron jet\u00eb) do t\u00eb mund t\u00eb kuptoj\u00eb se \u00e7far\u00eb ndodh. N\u00eb makin\u00eb mund t\u00eb ket\u00eb shum\u00eb informacione: akseset, pun\u00ebt cron, disku i montuar (shih <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Mount_(computing)\">disk mounting<\/a><\/noindex>) dhe nj\u00eb list\u00eb e pafund e asaj q\u00eb mund t\u00eb ndodh\u00eb. \u00cbsht\u00eb e v\u00ebshtir\u00eb t\u00eb kuptohet se \u00e7far\u00eb ka ndodhur n\u00eb t\u00eb v\u00ebrtet\u00eb.<img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/37bafea85a641c48683c35975f67f24d.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/li>\n<\/ol>\n<p>\nN\u00eb t\u00eb dy rastet, ne jemi n\u00eb nj\u00eb grack\u00eb, duke u b\u00ebr\u00eb t\u00eb varur:<\/p>\n<ul>\n<li>ose nga nj\u00eb person, i cili \u00ebsht\u00eb mortal, i ndjesh\u00ebm ndaj s\u00ebmundjeve, dashurive, ndryshimeve t\u00eb humorit dhe thjesht pushimeve nga puna;<\/li>\n<li>ose nga makineria q\u00eb funksionon fizikisht, e cila gjithashtu bie, vjedhet, sjell surpriza dhe shqet\u00ebsime. <\/li>\n<\/ul>\n<p>\nNatyrisht, zgjidhja duket e qart\u00eb, se n\u00eb m\u00ebnyr\u00eb ideale gjith\u00e7ka duhet t\u00eb p\u00ebrkthehet n\u00eb kod t\u00eb lexuesh\u00ebm nga njer\u00ebzit, q\u00eb mir\u00ebmbushet dhe \u00ebsht\u00eb shkruar me cil\u00ebsi. <\/p>\n<p>Pra pasur infrastrukturen si kod (Infrastructure as Code \u2013 IaC) \u00ebsht\u00eb p\u00ebrshkrimi i t\u00ebr\u00eb infrastruktur\u00ebs ekzistuese n\u00eb form\u00eb kodi, si dhe mjetet p\u00ebrkat\u00ebse p\u00ebr pun\u00eb me t\u00eb dhe p\u00ebr realizimin e infrastruktur\u00ebs reale nga ky kod.<\/p>\n<p><b class=\"spoiler_title\">Pse t\u00eb gjitha t\u00eb kalohen n\u00eb kod<\/b>Njer\u00ebzit nuk jan\u00eb makina. Ata nuk mund t\u00eb mbajn\u00eb gjith\u00e7ka mend. Reagimi i nj\u00eb njeriu dhe nj\u00eb makine \u00ebsht\u00eb ndryshe. \u00c7do gj\u00eb automatike potencialisht punon m\u00eb shpejt se \u00e7do gj\u00eb q\u00eb b\u00ebn\u00eb nj\u00eb njeri. M\u00eb e r\u00ebnd\u00ebsishmja \u00ebsht\u00eb burimi i vet\u00ebm i s\u00eb v\u00ebrtet\u00ebs (single source of truth). <\/p>\n<p><b class=\"spoiler_title\">Nga vijn\u00eb inxhinier\u00ebt e rinj SRE<\/b>Pra, ne vendos\u00ebm t\u00eb angazhojm\u00eb inxhinier\u00eb t\u00eb rinj SRE, por nga t\u2019i marrim? Libri me p\u00ebrgjigjet e duhura (<noindex><a rel=\"nofollow\" href=\"https:\/\/landing.google.com\/sre\/books\/\">Google SRE Book<\/a><\/noindex>) na thot\u00eb: nga zhvilluesit. Ata punojn\u00eb me kod, dhe ju arrini t\u00eb gjendeni n\u00eb nj\u00eb gjendje ideale.<\/p>\n<p>Kemi k\u00ebrkuar gjat\u00eb p\u00ebr ta n\u00eb tregun e pun\u00ebs jasht\u00eb kompanis\u00eb son\u00eb. Por e pranojm\u00eb se nuk gjet\u00ebm asnj\u00eb q\u00eb i plot\u00ebson k\u00ebrkesat tona. Duhej t\u00eb k\u00ebrkonim mes t\u00eb tanishm\u00ebve tan\u00eb. <\/p>\n<h2>Problemet e Infrastructure as Code<\/h2>\n<p>\nTani le t\u00eb shohim shembuj se si infrastruktura mund t\u00eb jet\u00eb e inkorporuar n\u00eb kod. Kodi \u00ebsht\u00eb shkruar mir\u00eb, me cil\u00ebsi, me komente dhe hap\u00ebsira. <\/p>\n<p>Shembulli i kodit nga Terraforma.<\/p>\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/1a0bbca47e88fb12e97c0f270efba177.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nShembulli i kodit nga Ansible.<\/p>\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/358fad8f5944bca1b97b2d6e37b2ee5e.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nZot\u00ebrinj, po sikur t\u00eb ishte gjith\u00e7ka kaq e leht\u00eb! Ne jemi n\u00eb nj\u00eb bot\u00eb reale, e cila gjithmon\u00eb \u00ebsht\u00eb gati t\u00eb na befasoj\u00eb, t\u00eb na ofroj\u00eb surpriza, probleme. As k\u00ebtu nuk kemi t\u00eb shmangim problemet.<\/p>\n<p><b>1. Problemi i par\u00eb \u00ebsht\u00eb se n\u00eb shumic\u00ebn e rasteve IaC \u00ebsht\u00eb nj\u00eb lloj dsl.<\/b><\/p>\n<p>Dhe DSL, nga ana e tij, \u00ebsht\u00eb nj\u00eb p\u00ebrshkrim i struktur\u00ebs. M\u00eb sakt\u00eb, \u00e7far\u00eb duhet t\u00eb keni: Json, Yaml, modifikime nga disa kompani t\u00eb m\u00ebdha q\u00eb kan\u00eb shpikur dsl-in e tyre (n\u00eb terraform p\u00ebrdoret HCL). <\/p>\n<p>E keqja \u00ebsht\u00eb se n\u00eb t\u00eb mund t\u00eb mos ket\u00eb leht\u00ebsisht ato gj\u00ebra aq t\u00eb njohura p\u00ebr ne si:<\/p>\n<ul>\n<li>variablat;<\/li>\n<li>kushtet;<\/li>\n<li>ndoshta nuk ka komente, p\u00ebr shembull, n\u00eb Json, p\u00ebr default ato nuk jan\u00eb t\u00eb parashikuara;<\/li>\n<li>funkcionet;<\/li>\n<li>dhe k\u00ebt\u00eb kam th\u00ebn\u00eb pa folur p\u00ebr gj\u00ebra m\u00eb t\u00eb avancuara si klasat, trash\u00ebgimia dhe t\u00eb gjith\u00eb at\u00eb.<\/li>\n<\/ul>\n<p>\n <b>2. Problemi i dyt\u00eb i k\u00ebtij kodi \u00ebsht\u00eb se shpesh her\u00eb \u00ebsht\u00eb nj\u00eb ambient heterogjen<\/b>. Zakonisht ju punoni me C#, pra me nj\u00eb gjuh\u00eb, nj\u00eb stak, nj\u00eb ekosistem. Dhe k\u00ebtu keni nj\u00eb larmi t\u00eb madhe teknologjish. <\/p>\n<p>Nj\u00eb situat\u00eb mjaft e v\u00ebrtet\u00eb \u00ebsht\u00eb kur nj\u00eb bash me Python nis nj\u00eb proces, n\u00eb t\u00eb cilin futet nj\u00eb Json. Ju e analizoni at\u00eb, pastaj nj\u00eb gjenerues tjet\u00ebr prodhon edhe 30 skedare. P\u00ebr t\u00eb gjitha k\u00ebto, hyjn\u00eb variablat nga Azure Key Vault, t\u00eb cilat jan\u00eb marr\u00eb nga plugini p\u00ebr drone.io, i shkruar n\u00eb Go, dhe k\u00ebto variabla kalojn\u00eb p\u00ebrmes yaml, i cili rezultoi nga gjenerimi nga templater jsonnet. Mjaft e v\u00ebshtir\u00eb t\u00eb kesh nj\u00eb kod t\u00eb p\u00ebrshkruar rigorozisht kur ke nj\u00eb ambient kaq t\u00eb larmish\u00ebm. <\/p>\n<p>Zhvillimi tradicional brenda nj\u00eb detyre shkon me nj\u00eb gjuh\u00eb. K\u00ebtu ne punojm\u00eb me nj\u00eb sasi t\u00eb madhe gjuh\u00ebsh. <\/p>\n<p><b>3. Problemi i tret\u00eb \u2013 \u00ebsht\u00eb tooling<\/b>. Jemi t\u00eb zakonsh\u00ebm me redaktor\u00ebt e shk\u00eblqyer (Ms Visual Studio, Jetbrains Rider), t\u00eb cil\u00ebt b\u00ebjn\u00eb gjith\u00e7ka p\u00ebr ne. Dhe madje, edhe n\u00ebse e humbasim fokusin, ata na thon\u00eb se nuk kemi t\u00eb drejt\u00eb. Duket se kjo \u00ebsht\u00eb normale dhe e natyrshme. <\/p>\n<p>Por diku af\u00ebr ka VSCode, i cili ka disa plugina q\u00eb instalohen, mb\u00ebshteten ose nuk mb\u00ebshteten. Dalin versione t\u00eb reja dhe ato nuk mb\u00ebshteten. Nj\u00eb kalim banal n\u00eb implementimin e funksionit (edhe n\u00ebse ekziston) b\u00ebhet nj\u00eb problem i komplikuar dhe jo trivial. Nj\u00eb riemrim i zakonsh\u00ebm i nj\u00eb variabli \u2013 \u00ebsht\u00eb nj\u00eb z\u00ebvend\u00ebsim n\u00eb projekt nga dhjet\u00ebra skedare. Do t\u00eb kesh fat n\u00ebse z\u00ebvend\u00ebson at\u00eb q\u00eb \u00ebsht\u00eb e nevojshme. Sigurisht, ka ndonj\u00ebher\u00eb ndri\u00e7im, ka auto p\u00ebrfundim, diku ka formatim (pavar\u00ebsisht se n\u00eb Terraform timin n\u00eb Windows nuk funksionoi). <\/p>\n<p>N\u00eb momentin q\u00eb po shkruhet ky artikull <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/mauve\/vscode-terraform\">vscode-terraform plugin<\/a><\/noindex> nuk e kan\u00eb l\u00ebshuar ende p\u00ebr mb\u00ebshtetje t\u00eb versionit 0.12, ndon\u00ebse \u00ebsht\u00eb l\u00ebshuar prej 3 muajsh.<\/p>\n<h2>Ka ardhur koha t\u00eb harrojm\u00eb p\u00ebr&#8230;<\/h2>\n<p><\/p>\n<ol>\n<li>Debugging.<\/li>\n<li>Refactoring tool.<\/li>\n<li>Auto completion.<\/li>\n<li>Zbulimi i gabimeve gjat\u00eb kompilimit.<\/li>\n<\/ol>\n<p>\n\u00cbsht\u00eb qesharake, por kjo e rrit koh\u00ebn e zhvillimit dhe rrit numrin e gabimeve q\u00eb ndodhin p\u00ebrher\u00eb. <\/p>\n<p>E frikshmja \u00ebsht\u00eb se ne jemi t\u00eb detyruar t\u00eb mendojm\u00eb jo se si ta projektojm\u00eb, ta rendisim skedarin n\u00eb dosje, ta dekompozojm\u00eb, ta b\u00ebjm\u00eb t\u00eb mb\u00ebshtetur, t\u00eb leht\u00eb p\u00ebr t'u lexuar e k\u00ebshtu me radh\u00eb kodin, por se si t\u00eb shkruaj k\u00ebt\u00eb komand\u00eb si\u00e7 duhet, sepse e kam shkruar ndonj\u00ebher\u00eb gabim. <\/p>\n<p>Si nj\u00eb fillestar, ju p\u00ebrpiqeni t\u00eb kuptoni Terraform, nd\u00ebrsa IDE ju ndihmon fare pak. Kur ka dokumentacion \u2013 hyni, shikoni. Por n\u00ebse do t\u00eb ishit duke u njohur me nj\u00eb gjuh\u00eb programuese t\u00eb re, IDE do t'ju sugjeronte se ka nj\u00eb tip t\u00eb till\u00eb dhe nj\u00eb t\u00eb till\u00eb nuk ka. T\u00eb pakt\u00ebn, n\u00eb nivelin e int ose string. Kjo shpesh \u00ebsht\u00eb e dobishme. <\/p>\n<h2>Por si jan\u00eb testet?<\/h2>\n<p>\nDo you ask: \"What about testing, dear programmers?\" Serious professionals test everything in production, and it\u2019s tough. Here\u2019s an example of a unit test for a Terraform module from the site. <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/ru-ru\/azure\/terraform\/terratest-in-terraform-modules\">Microsoft<\/a><\/noindex>. <\/p>\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/b9391409941e14f7e3cf6f8d964a2668.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nThey have good documentation. I've always liked Microsoft's approach to documentation and training. But you don't have to be Uncle Bob to realize that the code here is not perfect. Pay attention to the validation, moved to the right. <\/p>\n<p>The problem with the unit test is that we can only check the correctness of the JSON output. I input 5 parameters, and it returned a JSON payload with 2000 lines. I can analyze what\u2019s happening here, validate the test result\u2026 <\/p>\n<p>It\u2019s hard to analyze JSON in Go. But you should write in Go because Terraform in Go is a good practice of testing in the language you write. The code organization itself is quite weak. However, it is the best library for testing. <\/p>\n<p>Microsoft itself writes its modules, testing them this way. Of course, this is Open Source. Everything I talk about you can come and fix. I can sit down and fix everything in a week, open-source VS Code plugins, Terraform, make a plugin for Rider. Maybe write a couple of analyzers, attach linters, contribute to the testing library. I can do it all. But I shouldn\u2019t be dealing with this. <\/p>\n<h2>Best practices for Infrastructure as Code<\/h2>\n<p>\nLet\u2019s move on. If there are no tests in IaC, the IDE and tooling are poor, there should at least be best practices. I simply went into Google Analytics and compared two search queries: Terraform best practices and C# best practices. <\/p>\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/3d0e8cd626596deea99324285321a0ab.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWhat do we see? Ruthless statistics that are not in our favor. In terms of material quantity, it\u2019s the same. In C# development, we are just swimming in material, we have super best practices, there are books written by experts, and also books written by other experts that criticize those books. A sea of official documentation, articles, training courses, and now also open source development.<\/p>\n<p>As for the IaC query: here, you\u2019re trying to gather info from high-load talks or HashiConf, from official documentation, and numerous issues on GitHub. How exactly to distribute these modules, what to do with them? It seems like a real problem\u2026 There is a community, gentlemen, where for any question you will get 10 comments on GitHub. But that\u2019s not certain. <\/p>\n<p>Fatkeq\u00ebsisht, n\u00eb k\u00ebt\u00eb moment ekspert\u00ebt po fillojn\u00eb t\u00eb shfaqen. Deri tani jan\u00eb shum\u00eb t\u00eb pak\u00ebt. Nd\u00ebrsa komuniteti \u00ebsht\u00eb n\u00eb faz\u00ebn e tij fillestare. <\/p>\n<h2>N\u00eb drejtimin e \u00e7far\u00eb shkon gjith\u00e7ka dhe \u00e7far\u00eb t\u00eb b\u00ebjm\u00eb<\/h2>\n<p>\nMund ta l\u00ebsh gjith\u00e7ka dhe t\u00eb kthesh n\u00eb C#, n\u00eb bot\u00ebn e rider-it. Po ashtu, pse do t\u00eb merreshit me k\u00ebt\u00eb, n\u00ebse jo p\u00ebr t\u00eb gjetur nj\u00eb zgjidhje. M\u00eb posht\u00eb paraqes p\u00ebrfundimet e mia subjektive. Mund t\u00eb m\u00eb diskutoni n\u00eb komentet, do t\u00eb ishte interesante. <\/p>\n<p>Personal un\u00eb mb\u00ebshtes disa gj\u00ebra:<\/p>\n<ol>\n<li>Zhvillimi n\u00eb k\u00ebt\u00eb fush\u00eb po ndodh shum\u00eb shpejt. Po sjell nj\u00eb grafik t\u00eb k\u00ebrkesave p\u00ebr DevOps.\n<p><img decoding=\"async\" alt=\"Infrastruktur\u00eb si kod: prezantimi i par\u00eb\" src=\"\/wp-content\/uploads\/2019\/08\/068276f040f17c84a4c7eb9e11703c5c.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNdoshta tema \u00ebsht\u00eb n\u00eb mod\u00eb, por vet\u00eb fakti se fusha po rritet, ngjall disa shpresa. <\/p>\n<p>N\u00ebse di\u00e7ka rritet kaq shpejt, sigurisht q\u00eb do t\u00eb shfaqen njer\u00ebz t\u00eb men\u00e7ur q\u00eb do t\u00eb tregojn\u00eb se si duhet vepruar, dhe si jo. Rritja e popullaritetit \u00e7on n\u00eb at\u00eb q\u00eb ndoshta dikush do t\u00eb ket\u00eb koh\u00eb t\u00eb p\u00ebrfundoj\u00eb nj\u00eb plugin p\u00ebr jsonnet p\u00ebr vscode, i cili do t\u00eb lejoj\u00eb kalimin n\u00eb implementimin e funksionit, dhe jo ta k\u00ebrkosh at\u00eb p\u00ebrmes ctrl+shift+f. Kur gjith\u00e7ka zhvillohet, shfaqen m\u00eb shum\u00eb materiale. Dalja e librit nga google p\u00ebr SRE \u00ebsht\u00eb nj\u00eb shembull i shk\u00eblqyer p\u00ebr k\u00ebt\u00eb.<\/li>\n<li>Ka metodologji dhe praktika t\u00eb zhvilluara n\u00eb zhvillimin e zakonsh\u00ebm, t\u00eb cilat mund t'i aplikojm\u00eb me sukses k\u00ebtu. Po, ka nuanca me testimin dhe mjedisin heterogjen, mjete t\u00eb pamjaftueshme, por \u00ebsht\u00eb grumbulluar nj\u00eb num\u00ebr i madh praktikash q\u00eb mund t\u00eb jen\u00eb t\u00eb dobishme dhe t\u00eb ndihmojn\u00eb.\n<p>Nj\u00eb shembull banal: puna e p\u00ebrbashk\u00ebt p\u00ebrmes pair programming. Ai ndihmon shum\u00eb p\u00ebr t\u00eb kuptuar. Kur ke nj\u00eb fqinj pran\u00eb, i cili gjithashtu p\u00ebrpiqet t\u00eb kuptoj\u00eb di\u00e7ka, s\u00eb bashku do ta kuptoni m\u00eb mir\u00eb.<\/p>\n<p> Kuptimi se si b\u00ebhet refaktorizimi ndihmon madje edhe n\u00eb nj\u00eb situat\u00eb t\u00eb till\u00eb p\u00ebr ta realizuar at\u00eb. Pra, ti mund t\u00eb mos ndryshosh gjith\u00e7ka menj\u00ebher\u00eb, por mund t\u00eb ndryshosh em\u00ebrtimin, pastaj pozicionin, e m\u00eb pas ndoshta t\u00eb ve\u00e7osh ndonj\u00eb pjes\u00eb, gjithashtu, oh, k\u00ebtu mungojn\u00eb komentet. <\/li>\n<\/ol>\n<p><\/p>\n<h2>P\u00ebrfundim<\/h2>\n<p>\nPavar\u00ebsisht se arsyetimet e mia mund t\u00eb duken pesimiste, un\u00eb shikoj me shpres\u00eb drejt t\u00eb ardhmes dhe shpresoj sinqerisht q\u00eb ne (dhe ju) do t'ia dalim.<\/p>\n<blockquote><p>M\u00eb pas po p\u00ebrgatitet pjesa e dyt\u00eb e artikullit. N\u00eb t\u00eb do t\u00eb flas p\u00ebr si u p\u00ebrpoq\u00ebm t\u00eb aplikonim praktikat e zhvillimit t\u00eb p\u00ebrshtatsh\u00ebm p\u00ebr t\u00eb p\u00ebrmir\u00ebsuar procesin ton\u00eb t\u00eb t\u00eb m\u00ebsuarit dhe pun\u00ebn me infrastruktur\u00ebn.<\/p><\/blockquote>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/dodopizzaio\/blog\/465137\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433\u0430 SRE-\u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u042f \u0437\u0430\u0448\u0451\u043b \u0432\u043e \u0432\u0441\u044e \u044d\u0442\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043c\u044b\u0441\u043b\u0438 \u0438 \u0438\u043d\u0441\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435-\u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0438 \u044f \u0433\u043e\u0432\u043e\u0440\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0438 \u043a\u0430\u043a \u0432\u0441\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0441 \u044d\u0442\u0438\u043c \u0436\u0438\u0442\u044c. \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043f\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":28211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-37586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433\u0430 SRE-\u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u042f \u0437\u0430\u0448\u0451\u043b \u0432\u043e \u0432\u0441\u044e \u044d\u0442\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043c\u044b\u0441\u043b\u0438 \u0438 \u0438\u043d\u0441\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/infrastructure-as-code-pervoe-znakomstvo\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Infrastructure as code: \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433\u0430 SRE-\u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u042f \u0437\u0430\u0448\u0451\u043b \u0432\u043e \u0432\u0441\u044e \u044d\u0442\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043c\u044b\u0441\u043b\u0438 \u0438 \u0438\u043d\u0441\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/infrastructure-as-code-pervoe-znakomstvo\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:18:27+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:18:27+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47 Infrastruktur\u00eb si kod: takimi i par\u00eb | ProHoster","description":"N\u00eb kompanin\u00eb ton\u00eb po p\u00ebrparon procesi i onboardimit t\u00eb ekipit SRE. Un\u00eb e kam nisur k\u00ebt\u00eb histori nga perspektiva e zhvillimit. Gjat\u00eb procesit, kam pasur mendime dhe insight-e q\u00eb dua t'i ndaj me zhvilluesit e tjer\u00eb.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/infrastructure-as-code-pervoe-znakomstvo","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Infrastructure as code: \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e | ProHoster","og:description":"\u0423 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433\u0430 SRE-\u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u042f \u0437\u0430\u0448\u0451\u043b \u0432\u043e \u0432\u0441\u044e \u044d\u0442\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043c\u044b\u0441\u043b\u0438 \u0438 \u0438\u043d\u0441\u0430\u0439\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438.","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/infrastructure-as-code-pervoe-znakomstvo","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:18:27+00:00","article:modified_time":"2019-10-31T19:18:27+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"37586","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 18:29:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:24:24","updated":"2026-01-23 18:29:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/37586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=37586"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/37586\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/28211"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=37586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=37586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=37586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}