<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Giri Kuncoro on Medium]]></title>
        <description><![CDATA[Stories by Giri Kuncoro on Medium]]></description>
        <link>https://medium.com/@girikuncoro?source=rss-8e0ac11539aa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*H6G-49jXx1cvjMb7.jpg</url>
            <title>Stories by Giri Kuncoro on Medium</title>
            <link>https://medium.com/@girikuncoro?source=rss-8e0ac11539aa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 23:49:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@girikuncoro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[KubeCon Europe 2022 Recap: Great to be back in person!]]></title>
            <link>https://medium.com/@girikuncoro/kubecon-europe-2022-recap-great-to-be-back-in-person-902b07f570a8?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/902b07f570a8</guid>
            <category><![CDATA[kubecon]]></category>
            <category><![CDATA[cncf]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Mon, 30 May 2022 02:25:13 GMT</pubDate>
            <atom:updated>2022-05-30T02:45:02.559Z</atom:updated>
            <content:encoded><![CDATA[<p>I‘ve been part of Kubernetes and Cloud Native community since 2017, where <a href="https://github.com/kubernetes/kubernetes/pull/46756">my first PR</a> to kubectl was reviewed by Brendan Burns, the Kubernetes creator himself. Since then, I realized how warm welcoming the community is, especially for new comers and underrepresented group. Being underrepresented myself (<em>have you worked together with Indonesian engineers in open source project? probably not</em>), it was really hard to meet fellow Indonesians in community meeting, or in KubeCon and other international conferences. Indonesia was not part of the committers table, but today, we are ranked 23rd on <a href="https://k8s.devstats.cncf.io/d/50/countries-stats?orgId=1&amp;var-period_name=Month&amp;var-countries=All&amp;var-repogroup_name=All&amp;var-metric=rcommitters&amp;var-cum=countriescum">top country committers</a> through various projects, including <a href="https://kubernetes.io/id">Indonesian localized docs</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*2B7Yu7e4GvRTYlSJVu-JBw.png" /></figure><p>I’m writing this blog to share my recent experience attending KubeCon Europe in Valencia in-person (<strong>finally!!</strong>), and how I met amazing friends I usually collaborate with online. This is my 4th KubeCon (or 7th, if virtual KubeCon is counted), I usually didn’t see other fellow Indonesians in the conference. This time, I’m very proud that there are at least 4 engineers from Indonesia out of 7,000 attendees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RvvuOTHG88VzObPd" /><figcaption>At least 4 engineers from Indonesia attended KubeCon Europe 2022</figcaption></figure><p>It was sad that my proposal got waitlisted, but fortunately as underrepresented group, I could attend through <a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/attend/scholarships/">Dan Kohn diversity scholarship</a>. I was lucky that I had a chance to talk with Dan Kohn back in 2019, a very humble person and amazing leader (R.I.P Dan). I hope many more Indonesians can apply the scholarship and more people get exposure to this amazing community.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HPG2oKS4hp5P5xPi" /><figcaption>Meeting Dan Kohn in Open Source Summit Japan 2019</figcaption></figure><h3>Amazing Conversations I had — The Good People</h3><p>My goal was obviously to support fellow Indonesians who were speaking at conference: Iqbal &amp; Gio, and Mas Aris.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rY1Bsx00dYxlUrasUuepPg.png" /><figcaption>Gio &amp; Iqbal giving chaos talk at KubeCon EU 2022</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*WSM5Fxr1Y4GIt7crYf5ZRQ.png" /><figcaption>Mas Aris giving security talk at KubeCon EU 2022</figcaption></figure><p>However, my primary goal of attending conference in-person was to make new friends and to make good conversations (there’s a term for this in KubeCon: <strong>Hallway Track</strong>), because otherwise, how is it different from watching recorded videos on Youtube?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qcv_Qwnpv_qdaMcQbqxwCg.png" /><figcaption>With <a href="http://borkmann.ch/">Daniel Borkmann</a>, the Cilium creator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sR5XBwZ6A_gw3VBi0gS4hw.png" /><figcaption>With Bill Mulligan, we worked together to organize Kubernetes Community Days Indonesia 2021 (the largest KCD in the world)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xCsHBRFs7F0tB8Quwvv46A.png" /><figcaption>With Suzanne, Backstage Maintainer, I was able to resolve all my doubts related to backstage</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7FKXJtJdQKx7B_-Y" /><figcaption>With Tim Bannister, my techlead in Kubernetes docs project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lt_juHHc0EEakkKU" /><figcaption>With Kunal (100k Youtube subs within 3 months — wow!), Saiyam (my fellow CNCF ambassador), and Ramiro (okteto creator)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLEA8Yv2vuojiJULkvwhIA.png" /><figcaption>Liz Rice signing her newest eBPF book, surprised that she knows Gojek</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCr9VEIw1br38UNJGZ-BlQ.png" /><figcaption>With Natalia, eBPF security book author who was working remotely from Bali and used Gojek daily</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7gcNZsG2SHFXVgTwBuUPIA.png" /><figcaption>With fellow Dan Kohn diversity scholarship recipients (there are around at least 30 recipients who gathered)</figcaption></figure><h3>Interesting Sessions and Booths I attended</h3><p>Below are some of the attended sessions I like the most:</p><ul><li><a href="https://sched.co/yu8F"><strong>7 Years of Running Kubernetes in Mercedes-Benz</strong></a><br>Glad to see more and more big name end-users are adopting cloud native ecosystem. Mercedes-Benz has around 1,000 clusters managed with <a href="https://github.com/kubernetes-sigs/cluster-api">Cluster API</a> and they shared success stories of improving resiliency of their systems. Unfortunately, I could not catchup with them in-person to learn the details and get inputs for <a href="https://www.gotofinancial.com/en/blog/gopaysh-the-super-app-for-our-engineers">my Kubernetes work at office</a>.</li><li><a href="https://sched.co/ytrw"><strong>Datadog Production Incident related to DNS, GRPC config, and Linux kernel edgecase</strong></a><br>This session was one of the most packed sessions at KubeCon, where Datadog engineers shared their learnings after debugging this production incident for few weeks. The symptom was DNS query spikes (triggered OOM), but they found edgecase in Linux kernel which triggered unexpected behavior of Cilium CNI (they raised PR to fix this in Cilium), and tuning GRPC client config.</li><li><a href="https://static.sched.com/hosted_files/kccnceu2022/9a/Effective%20Disaster%20Recovery%20-%20The%20Day%20We%20Deleted%20Production.pdf"><strong>The day we deleted production cluster — InfluxDB</strong></a><strong><br></strong>This was another production incident talk I attended. A classic story where someone raised wrong PR in the infra code, which deleted their production cluster (I did this myself last year, where we had major downtime). However, I took them almost 5 hours to fully get back, because they could not simply revert the changes and the extra complexity of having stateful workloads on Kubernetes. They also had to tune their ArgoCD system to handle the case.</li><li><a href="https://static.sched.com/hosted_files/kccnceu2022/e1/KubeConEU-2022-UmaMukkara-Ramiro.pdf"><strong>Bringing Chaos Engineering to Cloud Native Developers</strong></a><strong> — creator of LitmusChaos &amp; Okteto</strong><br>This session gave new paradigm to “shift left” chaos testing towards developers. Instead of running chaos in CI through pre-deployment or post-deployment jobs, the idea was to bring chaos test right in developers’ laptop through ephemeral dev environment (think of running “make test”, but instead of unit tests, it runs chaos test in a remote dev environment).</li><li><a href="https://static.sched.com/hosted_files/kccnceu2022/96/KubeCon%20EU%202022%20-%20Xcloud%20Linkerd.pdf"><strong>Service Mesh at Scale: 22k Pods in Xbox Cloud</strong></a><strong> Gaming with Linkerd</strong><br>Microsoft engineer shared their journey to migrate to Linkerd based service-mesh within 1 year. The decision between Istio vs Linkerd for them them: it was no brainer to setup mTLS for service-to-service communication in Linkerd (given I have Istio production experience, need to try this out with Linkerd). What impressed me the most is how fast they could rollout Linkerd for 22k pods, unfortunately I forgot to ask the details around this. However, they face the same issue I encountered at work where we need to balance tradeoff between rich mesh metrics and high cardinality to avoid prometheus issues.</li><li><a href="https://sched.co/ytt9"><strong>Simplifying Service Mesh Operations with Flux and Flagger</strong></a><strong> — by Flux Creator<br></strong>I learned from this session that starting this year, we can jump 2 minor versions when upgrading Istio (need to double check starting from which version). Istio community is<em> “partnering”</em> with Flux/Flagger to make Istio upgrading easy, through GitOps approach and canaries. At work, we have been religiously upgrading Istio using Istio Operator, so we don’t really need this. But, this new direction is interesting and worth to keep an eye on.</li><li><a href="https://static.sched.com/hosted_files/kccnceu2022/16/Guided%20Tour%20of%20Cilium%20ServiceMesh.pdf"><strong>Guided Tour of Cilium Service Mesh — Liz Rice</strong></a><strong><br></strong>Liz is one of the open source leaders I look up to. Some of you might know here from her amazing talk: <a href="https://www.youtube.com/watch?v=8fi7uSYlOdc">container from scratch</a>. I learned Cilium Service Mesh is proxyless mesh, still using Envoy (1 envoy per node), and they are able to optimize kernel space calls thanks to eBPF technology, which significantly improved the latency performance. It is still early days for Cilium Service Mesh, but worth to keep an eye on and see if there’s an easy way to migrate from Istio. Cilium claims Istio control plane can still be used to control their proxyless workloads.</li></ul><h3>Impressions &amp; The Next Step</h3><p>First, I’ve been part of KubeCon program committee for at least 7 times and I am super happy to see the talks I selected for KubeCon EU were really good talks.</p><p>Second, as part of diversity scholarship recipient, there was no networking session and opportunity to get to know each other which was really sad (I hope I didn’t miss this if there was actually one).</p><p>Finally, I really hope this blog and pics I shared are motivating you to attend KubeCon next time, or even submit proposals to speak at this amazing event.</p><p>Cheers,<br>Giri, CNCF Ambassador from Indonesia</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=902b07f570a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merancang Sistem dengan Kontrol Akses Least Privilege Supaya Bebas Dari Peretas]]></title>
            <link>https://medium.easyread.co/merancang-sistem-dengan-kontrol-akses-least-privilege-supaya-bebas-dari-peretas-81f60dd23f3c?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/81f60dd23f3c</guid>
            <category><![CDATA[least-privilege]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[build-secure-reliable-sys]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 07:50:27 GMT</pubDate>
            <atom:updated>2020-09-15T03:31:34.802Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building Secure and Reliable Systems Series — Part 5</h4><p>Apakah kamu seorang <em>engineer</em> yang bekerja di perusahaan digital? Pernah gak sih kantor kamu menganggap dirimu bukan orang baik-baik, yang sewaktu-waktu bakal merusak bisnis perusahaan? Tentu jawabannya tidak, mana ada sih perusahaan yang menganggap karyawan-karyawannya penjahat. Tapi coba bayangkan, jika kamu punya niat jahat, kira-kira apa yang bisa kamu lakukan untuk membuat kantor kamu bangkrut? Serangan apa yang bakal kamu lakukan? Gimana cara kamu meretas melalui sistem internal? Caranya supaya tidak terdeteksi? Bagaimana supaya jejak retasan kamu bisa bersih?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*_ruFQAQUi-lBBjTT.jpg" /><figcaption><em>Source: pixabay.com</em></figcaption></figure><p>Atau, kalaupun kamu tidak punya niat jahat, apa kesalahan terbesar yang bisa kamu lakukan untuk membuat kegagalan pada sistem? Saat melakukan <em>debugging </em>untuk mengatasi gangguan pada sistem <em>production</em>, berapa perintah manual yang kamu ataupun teman kerjamu lakukan untuk memperbaiki sistem? Dari sekian banyak perintah manual tersebut, berapa jumlah perintah yang kamu beruntung jika ada typo atau salah <em>copy-paste</em>, sistem akan semakin parah gangguannya?</p><p>Manusia tidak mungkin bebas dari kesalahan. Sesuatu yang buruk bisa saja terjadi, dan pasti terjadi, kapanpun dan dimanapun. Entah itu kesalahan akibat dari mengetik dengan jari gemuk (<a href="https://en.wikipedia.org/wiki/Fat-finger_error#:~:text=A%20fat%2Dfinger%20error%20is,number%20of%20other%20input%20errors.">fat-finger commands</a>), akun berhasil diretas, ataupun terkena <a href="https://id.wikipedia.org/wiki/Pengelabuan">phishing</a>. Maka dari itu, kita harus bisa mendesain sistem untuk meminimalisasi atau menghilangkan dampak dari keburukan yang terjadi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*qsKCQlY7QbdlLE4AJZ0Q4A.jpeg" /><figcaption>Source: pxfuel.com</figcaption></figure><p>Yuk kita bahas cara-cara terbaik untuk merancang dan mengoperasikan sistem dengan kontrol akses terbatas. Tulisan ini merupakan seri kelima intisari buku “Membangun Sistem yang Aman dan Andal (Building Secure &amp; Reliable Systems)” karya tim SRE Google. Untuk membaca seri lainnya:</p><h3>Building Secure and Reliable Systems — Series List</h3><p><a href="https://medium.com/easyread/pentingnya-membangun-sistem-yang-aman-dan-andal-a15f7a3f94eb"><strong>1. Pentingnya Membangun Sistem yang Aman dan Andal</strong></a><strong><br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-1-8d6fb8bb22b3"><strong>2.1. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 1</strong></a><strong><br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-2-edf29bb74de0"><strong>2.2. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 2</strong></a><strong><br></strong><a href="https://medium.com/easyread/meningkatkan-keamanan-dengan-proksi-sebuah-studi-kasus-di-google-ddfc5e24fd6a"><strong>3. Meningkatkan Keamanan dengan Proksi, Sebuah Studi Kasus di Google </strong></a><strong><br></strong><a href="https://medium.com/easyread/mempertimbangkan-aspek-keamanan-dan-keandalan-sedari-awal-68465a8814da"><strong>4. Mempertimbangkan Aspek Keamanan dan Keandalan Sedari Awal</strong></a><strong><br>5. Merancang Sistem dengan Kontrol Akses Least Privilege Supaya Bebas Dari Peretas — You’re here</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*woLb9QZ-kqt2j8vs.jpg" /><figcaption>Source: picpedia.org</figcaption></figure><h3>Konsep dan Terminologi</h3><p>Sebelum kita lanjut ke pembahasan, yuk kita kenali dulu istilah-istilah yang banyak digunakan di industri, terutama yang berkaitan dengan sistem keamanan.</p><h4>Least Privilege</h4><p><strong>Least privilege</strong>, atau batasan hak akses yang paling rendah, adalah konsep yang mengharuskan pengguna untuk memiliki akses minimal yang diperlukan saja dalam menyelesaikan suatu operasi atau pekerjaan. Pengguna bisa berupa manusia ataupun bot.</p><h4>Zero Trust Networking</h4><p><strong>Zero trust networking</strong><em>, </em>atau jaringan yang tidak terpercaya, adalah konsep yang mengatakan bahwa lokasi jaringan dimana pengguna berasal, baik di luar maupun di dalam jaringan internal perusahaan, tidak memiliki akses khusus. Misalnya, mengakses sistem dari portal jaringan di ruangan meeting kantor tidak membuat pengguna bisa mengakses sistem <em>production</em> secara bebas, namun sama saja seperti mengakses sistem dari internet publik. Seharusnya, sistem memberikan akses berdasarkan dari kredensial dan identitas pengguna saja.</p><h4>Zero Touch</h4><p><strong>Zero touch</strong>, atau menghindari sentuhan, merupakan inisiatif untuk meningkatkan keamanan sistem dan menghindari gangguan sistem dengan melarang sentuhan pengguna secara langsung pada mesin-mesin <em>production</em>. Seharusnya, pengguna mengakses <em>production</em> secara tidak langsung melalui peralatan dan automasi yang terkontrol.</p><h3>Cara-Cara Terbaik untuk Implementasi Model Least Privilege</h3><p>Berikut ini cara-cara terbaik yang bisa kita lakukan untuk mengaplikasikan model <em>least privilege</em> untuk mengontrol akses sistem kamu:</p><h4>API dengan Fungsi Tertentu Saja</h4><blockquote>Program harus dibuat untuk mengerjakan satu hal dengan baik. Kalau kita ingin mengerjakan hal yang baru, lebih baik membuat program yang baru daripada membuat program lama lebih kompleks lagi dengan menambahkan “fitur” baru<strong> — Penemu sistem operasi </strong><a href="https://id.wikipedia.org/wiki/Unix"><strong>Unix</strong></a><strong>: McIlroy, Pinson, dan Tague</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*KXB0damaI2DhVuGc.jpg" /><figcaption>Para pengembang sistem operasi Unix (source: wikipedia.org)</figcaption></figure><p>Menurut kutipan tersebut, sistem operasi Unix dikembangkan dengan sekumpulan alat-alat kecil dan sederhana yang dapat dikombinasikan. Misalnya: perintah <a href="https://id.wikipedia.org/wiki/Ls">ls</a>, hanya berfungsi untuk navigasi direktori.</p><p>Lalu, apa yang dimaksud dengan API di sini? Maksudnya adalah: setiap sistem memiliki sebuah API, yang tidak lain merupakan <em>user interface</em> dari sistem di belakangnya. Beberapa API sistem sangat besar (seperti <a href="https://id.wikipedia.org/wiki/POSIX">POSIX API</a>), beberapa API relatif kecil (seperti <a href="https://memcached.org/">memcached</a> dan <a href="https://docs.nats.io/">NATS</a>), dan beberapa sangat kecil (seperti <a href="https://tinyurl.com/">TinyURL</a> dan <a href="https://developers.google.com/fonts/docs/developer_api">Google Fonts API</a>).</p><p>Terus, hubungannya API dengan akses dan keamanan sistem apa? Semakin luas kemampuan API, semakin besar pula risiko keamanannya. Kita ambil contoh POSIX API pada sistem operasi. Para pengguna UNIX biasa melakukan pengaturan dan administrasi sistem melalui <em>session</em> OpenSSH atau alat dengan skrip yang memanggil POSIX API. Karena seluruh fungsi POSIX API terekspos, cukup sulit untuk membatasi dan mengaudit operasi-operasi yang dilakukan pengguna selama <em>session</em> aktif. Kemudian, ini akan sangat berbahaya jika komputer yang memulai <em>session</em> tersebut diretas.</p><p>Solusinya adalah memperkecil dan memecah-mecah API besar menjadi bagian yang kecil-kecil. Setelah API berhasil dipecah, kita bisa mengaplikasikan prinsip <em>least privilege </em>untuk memberikan akses terbatas hanya yang diperlukan saja oleh pemanggil tertentu.</p><h4>Breakglass</h4><p><strong>Breakglass</strong>, atau yang berarti pecahkan kaca, adalah instruksi yang biasa ditemukan pada tombol alarm kebakaran untuk keadaan darurat. Dalam konteks sistem, <em>breakglass </em>merupakan sebuah mekanisme yang memberikan akses ke sistem saat keadaan darurat tanpa melalui otorisasi sama sekali.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*1zxM2QLQdU3ZfNyy.png" /><figcaption>Source: patigeni.com</figcaption></figure><h4>Audit</h4><p>Audit biasanya dilakukan untuk mendeteksi kesalahan pada saat otorisasi. Hal ini bisa terjadi pada beberapa hal: operator sistem menyalahgunakan hak aksesnya, peretas eksternal berhasil meretas kredensial pengguna, ataupun <em>software</em> penipu mengeksekusi operasi terlarang pada sistem. Kemampuan kita untuk mengaudit dan mendeteksi anomali sangat bergantung pada sistem yang kita desain:</p><ul><li>Seberapa granular kontrol akses diberikan untuk memutuskan seseorang boleh mengakses atau tidak? (Kapan? Dimana?)</li><li>Seberapa jelas kita dapat menangkap metadata yang berhubungan dengan <em>request</em>? (Siapa? Kapan? Kenapa?)</li></ul><h4>Pengujian Least Privilege</h4><p>Pengujian atau <em>testing </em>merupakan properti dasar dari sistem yang didesain dengan baik. Ada dua dimensi penting soal pengujian yang berhubungan dengan prinsip <em>least privilege</em>:</p><ul><li><strong>Menguji definisi <em>least privilege</em>: </strong>memastikan bahwa akses benar-benar diberikan hanya untuk sumber daya yang diperlukan saja. Dalam konteks ini, kita harus bisa menguji bahwa sebuah profil pengguna yang terdefinisikan dengan baik (misalnya, <em>data analyst, customer support, sysadmin</em>) memiliki akses yang cukup untuk melakukan <em>role</em> mereka di dalam pekerjaan, tapi tidak lebih. Untuk melakukannya, <em>test framework</em> kita harus bisa melakukan 3 hal: [1] deskripsikan spesifik akses yang diperlukan (API dan data mana, akses <em>read/write</em>); [2] deskripsikan skenario testing apa yang ingin dioperasikan pada sistem (<em>delete, administer, bulk read</em>) beserta dampak yang dihasilkan; [3] jalankan semua skenario dan bandingkan dampak yang terjadi dengan yang diinginkan.</li><li><strong>Menguji dengan <em>least privilege</em>: </strong>memastikan bahwa infrastruktur pengujian hanya memiliki akses yang diperlukan saja. Tidak ada artinya kalau kita menguji definisi <em>least privilege</em> tapi infrastruktur pengujian tidak melakukannya. Kita bisa memulai membuat infrastruktur pengujian dari 3 hal kecil: [1] pisahkan <em>environment </em>dan kredensial; [2] batasi tipe akses yang dimiliki infrastruktur; [3] batasi luasnya data yang bisa diakses.</li></ul><h4>Menganalisis Alasan Akses tidak terotorisasi</h4><p>Dalam sistem kompleks, dimana <em>least privilege</em> sudah diaplikasikan dan <em>trust</em> harus didapat melalui pihak ketiga (<em>multi-party authorization</em>), <em>policy</em> diimplementasikan secara granular pada berbagai <em>layer </em>di sistem. Akibatnya, penolakan <em>policy</em> dapat terjadi secara kompleks juga.</p><p>Supaya lebih mudah menjelaskannya, kita lihat sebuah contoh kasus. Misalnya, kita sudah memiliki sistem yang telah mengimplementasikan <em>policy</em> keamanan dengan baik. Lalu, sistem ini menolak akses pengguna karena tidak terotorisasi. Satu dari tiga kasus di bawah ini mungkin saja terjadi:</p><ul><li>Akses pengguna memang ditolak secara benar dan sistem berfungsi sesuai harapan. <em>Least privilege</em> telah diterapkan dan semuanya berjalan dengan baik.</li><li>Akses pengguna memang ditolak secara benar tapi akses bisa didapat dengan kontrol akses (<em>multi party authorization</em>) untuk mendapatkan akses sementara.</li><li>Pengguna merasa aksesnya ditolak karena kesalahan sistem. Dalam hal ini, pengguna akan melapor dan membuat <em>support ticket </em>untuk tim keamanan. Ini bisa saja terjadi jika pengguna telah dikeluarkan dari grup yang terotorisasi, atau <em>policy</em> telah berubah.</li></ul><p>Untuk semua kasus di atas, pengguna tidak mengetahui alasannya sama sekali aksesnya ditolak. Bolehkah sistem memberikan informasi yang lebih detail soal hal ini? Jawabannya tergantung pada tingkatan hak akses yang dimiliki pengguna. Untuk pengguna dengan hak akses yang sangat terbatas, alasan penolakan harus tetap tersembunyi. Namun, untuk pengguna yang memiliki hak akses lebih, sistem dapat memberikan <em>token </em>yang berkaitan dengan penolakan. Pengguna dapat menggunakan <em>token</em> ini untuk memanggil <em>multi party authorization</em>, ataupun memberikan <em>token </em>ini ke tim keamanan untuk dianalisis lebih lanjut.</p><h4><em>Graceful Failure</em> dan Mekanisme Breakglass</h4><p>Pada situasi ideal, kita tidak perlu berurusan dengan sistem otorisasi yang sudah berjalan baik dengan <em>policy </em>yang masuk akal. Namun, pada kenyataannya bisa saja terjadi kesalahan pada sistem, misalnya, menolak akses semua pengguna tanpa sebab, karena kesalahan saat pembaruan sistem. Dalam hal ini, kita perlu sebuah mekanisme yang bisa melangkah sistem otorisasi untuk memperbaikinya. Ini yang dinamakan dengan mekanisme <em>breakglass</em>.</p><p>Untuk mengimplementasikan mekanisme <em>breakglass</em>, kita perlu mengikuti aturan-aturan ini dengan seksama:</p><ul><li>Menggunakan mekanisme <em>breakglass</em> harus menjadi langkah terakhir yang dilarang pada situasi normal. Hanya boleh digunakan oleh tim SRE yang bertanggung jawab terhadap SLA sistem.</li><li>Mekanisme <em>breakglass</em> untuk <em>zero trust networking</em> hanya boleh digunakan dari lokasi tertentu saja. Lokasi ini merupakan ruang darurat, dengan kontrol akses fisik tambahan.</li><li>Semua penggunaan mekanisme <em>breakglass</em> harus dimonitor secara seksama.</li><li>Mekanisme <em>breakglass</em> harus diuji secara berkala oleh tim yang bertanggung jawab terhadap <em>production</em>, sehingga betul-betul bisa digunakan saat diperlukan.</li></ul><p>Saat mendesain sistem yang kompleks, model <em>least privilege</em> merupakan cara yang paling aman untuk memastikan pengguna memiliki akses untuk bisa melakukan pekerjaan mereka, tapi tidak lebih. Mengimplementasikan semua cara terbaik untuk <em>least privilege</em> yang mudah diadopsi dan tidak berdampak pada produktivitas secara drastis, memerlukan komitmen perusahaan. Komitmen ini terdiri dari adanya tim keamanan khusus yang bertanggung jawab terhadap semua pengguna, memastikan praktik-praktik ini dilakukan, dengan adanya konsultasi keamanan, definisi <em>policy</em>, deteksi ancaman, dan dukungan untuk menyelesaikan berbagai macam isu keamanan.</p><p>Penulis merupakan penggiat sistem Cloud, Kubernetes, dan Container di Indonesia. Silahkan ikuti dan bertanya melalui akun <a href="https://twitter.com/girikuncoro">Twitternya</a>. Ia seorang <a href="https://www.cncf.io/people/ambassadors/">CNCF ambassador</a>, <a href="https://developers.google.com/community/experts">Google Developer Expert</a>, dan <a href="https://k8s.devstats.cncf.io/d/66/developer-activity-counts-by-companies?orgId=1&amp;var-period_name=Last%20quarter&amp;var-metric=contributions&amp;var-repogroup_name=All&amp;var-country_name=All&amp;var-companies=All">Kubernetes maintainer</a>. Gabung dengan grup <a href="http://t.me/kubernetesindonesia">telegram Kubernetes dan Cloud Native Indonesia</a> untuk diskusi berbagai hal menarik seputar perkembangan teknologi Cloud Native, atau bantu menerjemahkan <a href="http://kubernetes.io/id">dokumentasi Kubernetes</a> ke <a href="http://bit.ly/k8s-docs-id-m4">bahasa Indonesia</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fc36271%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fc36271&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href">https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81f60dd23f3c" width="1" height="1" alt=""><hr><p><a href="https://medium.easyread.co/merancang-sistem-dengan-kontrol-akses-least-privilege-supaya-bebas-dari-peretas-81f60dd23f3c">Merancang Sistem dengan Kontrol Akses Least Privilege Supaya Bebas Dari Peretas</a> was originally published in <a href="https://medium.easyread.co/">Easyread</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meningkatkan Keamanan dengan Proksi, Sebuah Studi Kasus di Google]]></title>
            <link>https://medium.easyread.co/meningkatkan-keamanan-dengan-proksi-sebuah-studi-kasus-di-google-ddfc5e24fd6a?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddfc5e24fd6a</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[build-secure-reliable-sys]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 02:55:56 GMT</pubDate>
            <atom:updated>2020-07-07T02:50:18.964Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building Secure and Reliable Systems Series — Part 3</h4><p>Pernah gak sih kamu ketemu dengan <em>engineer</em> yang memodifikasi sistem secara tidak sengaja, lalu terjadi kegagalan atau gangguan? Pernah juga menemukan ada peretas di dalam sistem kamu? Karena kamu adalah <em>engineer</em> yang paling mengerti soal sistem yang kamu bangun, dirancang dengan prinsip <em>least privilege,</em> kamu berhasil memulihkan kegagalan dengan cepat, sehingga dampak dari gangguan sangat kecil dan terbatas. Saat terjadi gangguan pun, kamu berhasil menemukan penyebab utamanya (<em>root cause</em>) dan membuat solusi supaya gangguan yang sama tidak terjadi lagi.</p><p><em>Nah</em>, sayangnya tidak semua sistem dibangun seperti ini! Kalau begini, bagaimana caranya supaya kita bisa mengamankan sistem dengan mudah? Apalagi, kalau sistem itu sudah berjalan jauh sebelum kita mulai bekerja? <strong>Proksi Keamanan </strong>adalah salah satu jawabannya. Tulisan ini merupakan seri ketiga intisari buku “Membangun Sistem yang Aman dan Andal (Building Secure &amp; Reliable Systems)” karya tim SRE Google. Untuk membaca seri lainnya:</p><h4>Building Secure and Reliable Systems — Series List</h4><p><a href="https://medium.com/easyread/pentingnya-membangun-sistem-yang-aman-dan-andal-a15f7a3f94eb"><strong>1. Pentingnya Membangun Sistem yang Aman dan Andal</strong></a><strong><br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-1-8d6fb8bb22b3"><strong>2.1. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 1</strong></a><strong><br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-2-edf29bb74de0"><strong>2.2. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 2</strong></a><strong><br>3. Meningkatkan Keamanan dengan Proksi, Sebuah Studi Kasus di Google —You’re here<br></strong><a href="https://medium.com/easyread/mempertimbangkan-aspek-keamanan-dan-keandalan-sedari-awal-68465a8814da"><strong>4. Mempertimbangkan Aspek Keamanan dan Keandalan Sedari Awal</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/0*oqBGi3NPNEKfmsn2.jpg" /><figcaption>Amankan sistem dari peretas aktif dan pasif dengan Proksi Keamanan</figcaption></figure><h3>Apa itu <em>Proksi Keamanan</em>?</h3><p>Sebelum melompat ke pengertian Proksi Keamanan, <em>yuk</em> kita coba pahami dulu apa sih proksi itu. Pada umumnya, proksi menyediakan sebuah cara untuk membangun keandalan dan keamanan tanpa perlu melakukan perubahan pada sistem yang sudah berjalan. Tanpa perlu mengutak-atik sistem, proksi<em> </em>bisa kamu gunakan untuk mengalihkan koneksi yang bertujuan untuk mengakses sistem kamu.</p><p>Proksi juga bisa memiliki fungsi kontrol untuk memenuhi kebutuhan keandalan dan keamanan kamu. Artikel ini akan membahas sekumpulan Proksi Keamanan yang digunakan oleh Google, untuk membatasi kemampuan administrator <em>privileged </em>dengan akses luas, supaya tidak bisa membuat gangguan pada sistem <em>production </em>secara tidak sengaja.</p><p><strong>Proksi Keamanan </strong>merupakan sebuah <em>framework</em> yang mengizinkan pengguna yang mempunyai otoritas, untuk mengakses atau memodifikasi <em>state </em>dari server fisik, mesin virtual, maupun aplikasi tertentu. Google menggunakan Proksi Keamanan untuk melakukan <em>review</em>, <em>approval</em>, dan menjalankan perintah tanpa perlu membuat koneksi SSH ke dalam sistem. Dengan menggunakan Proksi Keamanan, kita dapat memberikan akses secara <em>granular</em> yang diperlukan saja untuk melakukan <em>debugging</em> atau sekedar membatasi operasi terhadap suatu mesin.</p><p>Proksi Keamanan merepresentasikan pintu masuk ke dalam sistem satu-satunya (<em>single entry point</em>) antar jaringan, dan merupakan alat yang sangat krusial untuk melakukan tiga hal berikut:</p><ul><li><strong>Mengaudit</strong> setiap operasi di dalam sistem</li><li><strong>Mengontrol</strong> akses terhadap sumber daya di dalam sistem</li><li><strong>Melindungi</strong> sistem <em>production </em>terhadap kesalahan orang secara luas</li></ul><h3>Zero Touch Prod</h3><p><a href="https://www.usenix.org/conference/srecon19emea/presentation/czapinski"><strong>Zero Touch Prod</strong></a> adalah sebuah proyek di Google yang mengharuskan setiap perubahan pada <em>production</em> harus dilakukan oleh sebuah robot atau otomasi (bukan orang), divalidasi sebelumnya oleh <em>software</em>, atau di-<em>trigger</em> melalui mekanisme <em>breakglass</em> yang dimonitor. <em>Breakglass</em> merupakan mekanisme yang bisa digunakan <em>engineer</em> untuk melakukan eskalasi akses di saat darurat untuk memperbaiki gangguan sistem. Proksi Keamanan merupakan komponen penting untuk merealisasikan prinsip Zero Touch Prod ini. Ada sekitar ~13% gangguan yang telah terjadi pada semua layanan Google yang sebenarnya bisa dihindari jika prinsip Zero Touch Prod telah diterapkan sebelumnya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*-liUdei2ff0SHxGStWRtrQ.png" /><figcaption>Model Proksi Keamanan untuk mengaudit, mengontrol, dan melindungi sistem</figcaption></figure><p>Pada model Proksi Keamanan di atas, klien tidak terhubung dengan sistem secara langsung. Klien terhubung dengan proksi<em>. </em>Proksi akan selalu memeriksa terlebih dahulu jika klien memiliki akses yang cukup untuk melakukan suatu operasi, sebelum diteruskan ke dalam sistem. Ada beberapa keuntungan yang didapat dengan mengaplikasikan proksi ke dalam pengelolaan sistem yang berinteraksi dengan klien, baik berupa klien orang, klien robot, maupun keduanya:</p><ul><li><strong>Berfungsi sebagai titik sentral </strong>untuk mengaplikasikan <strong><em>multi-party authorization </em>(MPA)</strong>, dimana kita dapat menambahkan <strong><em>approval</em></strong> oleh orang lain sebelum memperbolehkan suatu operasi, misalnya saat ada permintaan untuk mengakses data yang sensitif.</li><li><strong>Mengaudit operasi admin</strong>, dimana kita dapat melacak <strong><em>siapa</em></strong> yang melakuan operasi <strong><em>apa</em></strong> pada <strong><em>waktu</em></strong> tertentu.</li><li><strong>Membatasi jumlah operasi dalam satu waktu</strong> (<em>rate limitting</em>). Misalnya, kita dapat membatas berapa operasi <em>restart</em> yang diperbolehkan setiap menitnya. Sistem yang sedang di-<em>restart </em>biasanya membutuhkan waktu untuk mulai, dengan membatasi seberapa sering kita boleh me-<em>restart</em>, maka potensi besarnya dampak dari kesalahan akibat <em>restart</em> akan bisa dibatasi. Hal ini biasa disebut juga sebagai <strong><em>blast radius</em></strong><em>.</em></li><li><strong>Kompatibilitas dengan sistem <em>third party</em> yang bukan open-source</strong>, dimana kita dapat mengontrol perilaku komponen tersebut (tanpa perlu memodifikasinya) melalui fungsi tambahan pada proksi.</li><li><strong>Peningkatan yang berkelanjutan</strong> (<em>continuous improvement</em>), dimana kita dapat meningkatkan keamanan dan keandalan sistem terus menerus melalui titik sentral proksi dengan lebih mudah.</li></ul><p>Namun begitu, proksi<em> </em>juga memiliki beberapa kekurangan yang berpotensi melahirkan masalah baru:</p><ul><li><strong>Peningkatan biaya</strong>, dimana terjadi <em>overhead</em> pemeliharaan dan operasional pada sistem.</li><li><strong>Titik kegagalan tunggal</strong>, atau biasa disebut SPOF (<em>Single Point of Failure</em>), jika komponen proksi ataupun salah satu dari dependensinya mengalami kegagalan. Tentu kita bisa meningkatkan keandalan proksi dengan menjalankan beberapa mesin proksi<em> </em>sekaligus.</li><li>Adanya <strong>konfigurasi <em>policy</em> untuk mengontrol akses</strong>, yang bisa jadi sumber dari kegagalan itu sendiri. Kita bisa meminimalisasi ini dengan menyediakan templat konfigurasi dan otomasi untuk men-<em>generate policy </em>yang aman secara bawaan.</li><li><strong>Menjadi mesin sentral yang bisa jadi sasaran peretas</strong>. Cara meminimalisasi dampak yang terjadi jika mesin proksi<em> </em>diambil alih oleh peretas adalah dengan tidak memberikan akses apapun pada <em>role </em>proksi<em>. </em>Eksekusi operasi dilakukan dengan identitas klien itu sendiri (akses yang dimiliki oleh <em>role </em>dari klien<em>, </em>bukan proksi), proksi<em> </em>hanya bertugas untuk meneruskannya ke tujuan.</li><li><strong>Pengguna dari sistem tidak mau untuk berubah mengakses sistem melalui proksi</strong>, karena sudah biasa mengakses sistem secara langsung. Untuk mengurangi friksi yang diakibatkan oleh adanya komponen baru ini, kita bisa mengkomunikasikan dengan <em>engineer</em> kalau dalam kondisi darurat, mereka tetap bisa mengakses sistem secara langsung melalui mekanisme <em>breakglass. </em>Mekanisme ini akan dijelaskan melalui tulisan-tulisan berikutnya.</li></ul><p>Kasus utama untuk aplikasi Proksi Keamanan adalah meningkatkan keamanan dan keandalan yang berhubungan dengan kontrol akses. Karena itu, antar muka yang diekspos oleh proksi haruslah sama persis dengan API yang menjadi target di belakangnya.</p><h3>Proksi Tool Google</h3><p>Para <em>engineer</em> Google melakukan operasi admin kebanyakan menggunakan alat baris perintah (CLI). Beberapa dapat melakukan perintah yang berbahaya, seperti menghidupkan dan mematikan server. Jika alat seperti ini memilih <em>scope</em> yang salah, bisa saja mengeksekusi perintah ini akan mematikan beberapa layanan frontend sekaligus yang bisa menyebabkan pemadaman (<em>outage</em>).</p><p>Untuk mengatasi masalah ini, Google membuat <strong>Proksi Tool</strong>, sebuah <em>binary</em> yang mengekspos metode RPC yang secara internal mengeksusi perintah melalui <em>fork</em> dan <em>exec</em>. Semua pemanggilan terhadap target di belakangnya dikontrol melalui <em>policy</em>, dicatat untuk audit, dan juga bisa ditambahkan MPA.</p><p>Mengaplikasikan Proksi Tool membuat Google berhasil mencapai tujuan dari Zero Touch Prod, membuat sistem <em>production</em> lebih aman dengan tidak memperbolehkan orang untuk mengaksesnya secara langsung. Google mengatur siapa saja yang boleh melakukan operasi apa, dengan menggunakan <em>policy</em> yang <em>granular </em>untuk melakukan otorisasi terhadap metode RPC yang dipanggil.</p><p>Contoh di bawah ini merupakan <em>policy</em> yang memperbolehkan member dari <strong><em>group:admin</em> </strong>untuk menjalankan CLI<em> </em>borg<em> </em>(borg adalah nenek moyang dari <a href="http://kubernetes.io/id">Kubernetes</a>, digunakan untuk sistem internal Google)<em> </em>dengan parameter apapun setelah seseorang dari <strong><em>group:admin-leads </em></strong>meng-<em>approve</em> perintah tersebut.</p><pre>config = {<br>  proxy_role = &#39;admin-proxy&#39;<br>  tools = {<br>    borg = {<br>      mpm = &#39;client@live&#39;<br>      binary_in_mpm = &#39;borg&#39;<br>      any_command = true<br>      allow = [&#39;group:admin&#39;]<br>      require_mpa_approval_from = [&#39;group:admin-leads&#39;]<br>      unit_tests = [{<br>        expected = &#39;ALLOW&#39;<br>        command = &#39;file.borgcfg up&#39;<br>      }]<br>    }<br>  }<br>}</pre><p><em>Policy</em> di atas memperbolehkan seorang <em>engineer</em> untuk menjalankan perintah untuk memberhentikan sebuah <em>job</em> di dalam <em>production</em> melalui laptopnya, dengan menjalankan:</p><pre><strong>$ tool-proxy-cli --proxy_address admin-proxy borg kill ...</strong></pre><p>Perintah ini mengirimkan RPC ke proksi<em> </em>pada alamat di atas, lalu <em>workflow</em> berikut akan dijalankan:</p><ol><li>Proksi<em> </em>mencatat semua pemanggilan RPC dan melakukan pemeriksaan, menyediakan cara yang mudah untuk mengaudit perintah admin yang dijalankan sebelumnya.</li><li>Proksi<em> </em>memeriksa <em>policy</em> untuk memastikan pemanggil tergabung di dalam <strong><em>group:admin</em></strong><em>.</em></li><li>Karena ini merupakan perintah yang sensitif, MPA di-<em>trigger</em> dan proksi menunggu otorisasi dari seseorang yang tergabung dalam <strong><em>group:admin-leads</em></strong><em>.</em></li><li>Kalau telah di-<em>approve</em>, proksi<em> </em>menjalankan perintah, menunggu hasilnya, dan memasukkan kode kembalian, stdout, dan stderr ke dalam respons RPC.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2uPZNdtVSRm2VagwWwb4jg.png" /><figcaption>Workflow dari Proksi Tool<em> Google</em></figcaption></figure><p>Proksi Tool memerlukan perubahan kecil pada <em>development workflow, </em>dimana setiap <em>engineer </em>perlu menambahkan perintah di awal dengan <strong>tool-proxy-cli -proxy_address</strong>. Untuk memastikan pengguna yang punya akses tinggi dapat mengelabui proksi, Google mengubah semua sistemnya supaya hanya bisa menerima operasi admin yang berasal dari <em>admin-proxy </em>saja dan menolak semua koneksi langsung di luar kondisi <em>breakglass</em>.</p><p>Proksi Keamanan adalah salah satu cara untuk melakukan pencatatan (log) dan <em>multi-party authorization</em> (MPA) pada sistem. Proksi dapat membuat sistem kamu lebih aman dan andal. Namun, proksi akan lebih efektif lagi jika dipasangkan dengan prinsip perancangan yang akan dibahas pada tulisan-tulisan berikutnya, ditunggu ya :)</p><p>Penulis merupakan penggiat sistem Cloud, Kubernetes, dan Container di Indonesia. Ia seorang <a href="https://www.cncf.io/people/ambassadors/">CNCF ambassador</a>, <a href="https://developers.google.com/community/experts">Google Developer Expert</a>, dan <a href="https://k8s.devstats.cncf.io/d/66/developer-activity-counts-by-companies?orgId=1&amp;var-period_name=Last%20quarter&amp;var-metric=contributions&amp;var-repogroup_name=All&amp;var-country_name=All&amp;var-companies=All">Kubernetes maintainer</a>. Gabung dengan grup <a href="http://t.me/kubernetesindonesia">telegram Kubernetes dan Cloud Native Indonesia</a> untuk diskusi berbagai hal menarik seputar perkembangan teknologi Cloud Native, atau bantu menerjemahkan <a href="http://kubernetes.io/id">dokumentasi Kubernetes</a> ke <a href="http://bit.ly/k8s-docs-id-m3">bahasa Indonesia</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fc36271%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fc36271&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href">https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddfc5e24fd6a" width="1" height="1" alt=""><hr><p><a href="https://medium.easyread.co/meningkatkan-keamanan-dengan-proksi-sebuah-studi-kasus-di-google-ddfc5e24fd6a">Meningkatkan Keamanan dengan Proksi, Sebuah Studi Kasus di Google</a> was originally published in <a href="https://medium.easyread.co/">Easyread</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mengenal Jaringan Komputer lebih dekat: Latency dan Bandwidth]]></title>
            <link>https://medium.easyread.co/mengenal-jaringan-komputer-lebih-dekat-latency-dan-bandwidth-279607e2cfa3?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/279607e2cfa3</guid>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[latency]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[bandwidth]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Thu, 14 May 2020 02:34:29 GMT</pubDate>
            <atom:updated>2020-05-14T02:34:29.279Z</atom:updated>
            <content:encoded><![CDATA[<h4>Perbedaan Latency dan Bandwith dalam dunia Internet</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*89UJtcoc-E4i--P6" /><figcaption>Photo by <a href="https://unsplash.com/@thomasjsn?utm_source=medium&amp;utm_medium=referral">Thomas Jensen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Kecepatan Internet telah menjadi hal yang sangat krusial di kehidupan kita sehari-hari. Di era digital ini, pernah gak sih kamu menemukan situs web atau aplikasi <em>mobile</em> yang lambat sekali sewaktu dibuka? Pasti pernah kan! Kamu akan merasa jengkel, <em>ngomel</em>, dan pada akhirnya menyerah tidak jadi membuka situs tersebut.</p><p>Hal ini sangat manusiawi dan studi pada bisnis <em>online</em> menunjukkan:</p><ul><li>Situs yang <strong>lebih cepat</strong> akan membuat pengguna lebih <em>engaged </em>(<em>user engagement</em>)<em>.</em></li><li>Situs yang <strong>lebih cepat</strong> akan membuat pengguna lebih setia (<em>user retention</em>).</li><li>Situs yang <strong>lebih cepat</strong> akan membuat konversi bisnis yang lebih baik.</li></ul><p>Secara psikologis bisa dijelaskan dengan tabel ini:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d7290b6ffadd2c8cca9605c303362f9/href">https://medium.com/media/5d7290b6ffadd2c8cca9605c303362f9/href</a></iframe><p>Ya, kata kuncinya adalah <strong>kecepatan</strong>. Untuk membuat situs atau aplikasi dapat diakses pengguna dengan cepat, ada banyak sekali faktor. Saya akan membahasnya dari kacamata jaringan. Tulisan ini merupakan seri pertama dari ringkasan buku “<a href="https://hpbn.co/">High Performance Browser Networking</a>”, cocok untuk kamu yang ingin mengenal jaringan komputer lebih dekat dan juga panduan mengenai bagaimana membuat situs web supaya bisa diakses jutaan pengguna dengan cepat. Mari kita mulai dengan dua komponen utama yang mempengaruhi kinerja dari lalu lintas jaringan Internet: <em>latency</em> dan <em>bandwidth</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhsIZo6-q_nlcWOLPrbnvQ.png" /><figcaption>Latency dan <em>bandwidth</em> (sumber: <a href="https://hpbn.co/assets/diagrams/9f12afe5ca29ba5c2ad555fcee5bd568.svg">hpbn.co</a>)</figcaption></figure><p><strong><em>Latency </em></strong>adalah waktu yang diperlukan paket dari saat dikirim sampai diterima tujuan. <strong><em>Bandwidth </em></strong>adalah <em>throughput</em> maksimal dari jalur komunikasi <em>logical</em> maupun <em>physical</em>.</p><p>Kalau ini sulit dimengerti, analoginya seperti sebuah jalan tol Bandung-Jakarta. <em>Latency </em>merupakan waktu yang diperlukan mobil berangkat dari Bandung sampai tiba di Jakarta. <em>Bandwidth </em>merupakan lebar jalan tolnya<em>. Throughput </em>adalah berapa banyak mobil yang bisa melalui jalan tol pada satu waktu.</p><p>Dengan memahami bagaimana <em>latency</em> dan <em>bandwidth </em>bekerja, kita bisa mendalami karakteristik dari jaringan Internet, seperti TCP, UDP, dan berbagai macam aplikasi-aplikasi protokol di atasnya.</p><h3>Berbagai Komponen yang Membentuk Latency</h3><p>Konsep <em>latency</em> terbilang sederhana, tapi seringkali informasi-informasi penting di dalamnya tersembunyi. Setiap sistem terdiri dari banyak sumber dan komponen yang menambahkan delay pada waktu secara keseluruhan, agar sebuah pesan berhasil diterima oleh penerima. Kita harus bisa mengerti apa saja komponen ini dan apa dampaknya terhadap kinerja jaringan secara keseluruhan.</p><p>Yuk kita lihat sebuah <em>router</em> pada jaringan Internet lebih dekat. <em>Router</em> bertanggung jawab untuk menyampaikan pesan antara klien dan server. Beberapa komponen pada <em>router </em>yang memberikan dampak pada keseluruhan <em>delay</em>:</p><p><strong><em>Delay</em> propagasi: </strong>waktu yang diperlukan sebuah pesan untuk pergi dari pengirim sampai diterima oleh penerima, merupakan fungsi dari jarak dibagi dengan kecepatan.</p><p><strong><em>Delay</em> transmisi: </strong>waktu yang diperlukan untuk mendorong seluruh bit dari paket ke dalam <em>link</em>, merupakan fungsi dari panjang paket dan <em>rate</em> data dari <em>link.</em></p><p><strong><em>Delay</em> pemrosesan:</strong> waktu yang diperlukan untuk memproses <em>header</em> paket, memeriksa kesalahan (<em>error</em>) pada tingkatan bit, dan memutuskan tujuan paket.</p><p><strong><em>Delay</em> antrian: </strong>waktu yang diperlukan untuk paket menunggu pada antrian sampai bisa diproses.</p><p>Total waktu <em>latency</em> adalah penjumlahan dari semua <em>delay</em> di atas, dengan beberapa catatan. <em>Delay</em> propagasi bergantung pada jarak dan medium tempat sinyal bergerak (melalui medium optik <em>fiber</em>, sinyal bergerak dengan kecepatan 200 juta meter per detik, atau 2/3 kecepatan cahaya).</p><p><em>Delay</em> transmisi bergantung pada <em>rate</em> data yang tersedia pada <em>link</em> transmisi, tidak ada hubungannya dengan jarak antara klien dan server. Misalnya, kamu ingin mengirimkan berkas 10 Mb melalui dua macam <em>link</em>: 1 Mbps dan 100 Mbps. Kamu akan membutuhkan 10 detik untuk menaruh seluruh berkas “ke dalam kabel” dengan <em>link</em> 1 Mbps, dan cukup 0,1 detik saja dengan <em>link</em> 100 Mbps.</p><h3>Latency Propagasi</h3><p>Seperti kata Einstein di pelajaran SMA, kita mengenal teori relativitas: kecepatan cahaya merupakan kecepatan tercepat dimana energi, benda, dan informasi dapat bergerak. Pada saat ini, kita perlu mengapresiasi para <em>engineer</em> yang telah berhasil merekayasa medium optik <em>fiber</em>, yang berhasil membuat sinyal bergerak relatif mendekati kecepatan cahaya, dan membuat hidup kita lebih enak.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43cbb59dcfcbd686ad2063206a42854e/href">https://medium.com/media/43cbb59dcfcbd686ad2063206a42854e/href</a></iframe><p>Kecepatan cahaya memang cepat, tapi perlu waktu lebih dari 160 milidetik untuk bolak balik (<em>round-trip</em> — RTT) dari Jakarta ke New York. Perhitungan ini pun sangat optimisitis, karena sebenarnya pada setiap <em>hop</em> di perjalanan, akan ada penambahan <em>delay routing</em>, pemrosesan, antrian, dan transmisi<em>. </em>Sebagai hasilnya, waktu RTT sesungguhnya antara Jakarta dan New York ada di antara 200–300 milidetik.</p><p>Apakah ini “cepat”? Bisa ya, bisa juga tidak. Tapi menurut tabel psikologis yang saya jelaskan di awal artikel, <em>delay</em> ini belum akan membuat seorang pengguna geram. Intinya, untuk melayani jutaan pengguna dengan <em>experience </em>terbaik dan tetap membuat mereka <em>engaged</em> pada berbagai layanan yang tersedia, <strong>situs atau aplikasi perlu melayani dalam hitungan ratusan milidetik</strong>. Untuk menggapai kesuksesan, <em>latency </em>jaringan harus dikelola dengan sangat hati-hati, dan menjadi parameter terukur yang menjadi target pada semua fase pengembangan produk.</p><h3>Latency Last-Mile</h3><p>Sayangnya, kebanyakan <em>latency</em> yang signifikan bukan disebabkan oleh penyeberangan samudera dan antar benua, melainkan karena masalah yang bernama <em>last-mile</em>. Agar Internet bisa sampai ke kantor atau rumah kamu, ISP lokal perlu untuk menghubungkan kabel ke perumahan, menggabungkan sinyal, dan meneruskannya ke node <em>routing</em> lokal. Pada kenyataannya, tergantung dari tipe konektivitas, metode <em>routing</em>, dan teknologi yang digunakan, beberapa <em>hop </em>di awal ini bisa menghabiskan puluhan milidetik sendiri.</p><p>Mari kita lihat hasil traceroute dari komputer saya di Jakarta:</p><pre>$ traceroute google.com<br>traceroute to google.com (216.239.38.120), 64 hops max, 52 byte packets<br> 1  192.168.100.1 (192.168.100.1)  1.868 ms  0.986 ms  0.900 ms<br> 2  180.252.96.1 (180.252.96.1)  3.452 ms  3.287 ms  2.763 ms<br> 3  125.160.0.45 (125.160.0.45)  2.861 ms  4.756 ms  2.884 ms<br> 4  61.94.171.97 (61.94.171.97)  3.345 ms  3.703 ms  3.266 ms<br> 5  180.240.190.54 (180.240.190.54)  23.097 ms  16.784 ms  31.053 ms<br> 6  180.240.190.53 (180.240.190.53)  16.808 ms  37.478 ms  18.643 ms<br> 7  * * *<br> 8  180.240.204.122 (180.240.204.122)  26.685 ms<br>    180.240.204.86 (180.240.204.86)  20.794 ms  21.430 ms<br> 9  72.14.223.88 (72.14.223.88)  18.688 ms<br>    72.14.217.146 (72.14.217.146)  19.467 ms  20.504 ms<br>10  * * *<br>11  108.170.234.69 (108.170.234.69)  19.072 ms<br>    x.1e100.net (216.239.38.120)  17.220 ms  16.422 ms</pre><pre># hop ke-1: router wireless lokal<br># hop ke-11: server Google</pre><p>Pada hasil di atas, paket mulai dikirimkan dari kota Jakarta, kemudian lompat ke datacenter Telkom Indonesia, ke datacenter Telkom International di Singapura, akhirnya dilewatkan ke datacenter Google dan sampai ke tujuan di hop ke-11. Semua proses terjadi dalam waktu rata-rata 17 milidetik. Cukup cepat, mengingat paket bisa saja sudah berpindah-pindah ke banyak daerah di Asia Tenggara.</p><p><em>Latency</em> <em>last-mile</em> bervariasi antar ISP karena perbedaan teknologi yang digunakan dan waktu saat mengakses. Sebagai pengguna Internet, kalau kamu ingin meningkatkan kecepatan akses situs, pastikan untuk membandingkan <em>latency</em> <em>last-mile</em> dari berbagai penyedia ISP yang ada di daerah kamu. <strong><em>Latency</em>, bukan <em>bandwidth</em>, adalah <em>bottleneck</em> kinerja dari kebanyakan situs.</strong> Untuk mengerti alasannya, kita perlu memahami cara kerja protokol TCP dan HTTP yang akan saya bahas pada tulisan-tulisan berikutnya.</p><h3>Bandwidth pada Jaringan Core dan Edge</h3><p>Optik <em>fiber</em> berfungsi sebagai “pipa cahaya”, lebih tebal sedikit daripada sehelai rambut, dirancang untuk mengirimkan cahaya antar kedua ujung kabel. Optik <em>fiber</em> punya <em>bandwidth </em>sangat lebar karena masing-masing <em>fiber</em> bisa membawa berbagai macam kanal panjang gelombang (<em>wavelength</em>), melalui proses yang disebut sebagai <em>wavelength-division multiplexing </em>(WDM). Maka, total <em>bandwidth</em> dari <em>link fiber</em> adalah perkalian antara <em>rate </em>data setiap kanal dengan jumlah kanal <em>multiplex</em>.</p><p><em>Backbone </em>jaringan, atau <em>link-link fiber</em>, membentuk berbagai jalur data <em>core</em> dari Internet yang dapat memindahkan ratusan terabit per detik. Hanya saja, kapasitas yang tersedia pada <em>edge</em> sangat bergantung pada teknologi yang digunakan: <em>dial-up</em>, DSL, kabel, <em>wireless</em>, <em>fiber-to-the-home</em>, atau bahkan kinerja dari <em>router </em>lokal. <em>Bandwidth </em>yang tersedia untuk pengguna merupakan fungsi dari kapasitas <em>link</em> terendah antara klien dan server tujuan.</p><p>Berikut data dari Akamai Technologies yang mengoperasikan CDN global:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*8c-LnqKobjqFypnQi83GfQ.png" /><figcaption>Bandwidth rata-rata di Asia Q1 2017 (sumber: <a href="https://www.akamai.com/us/en/multimedia/documents/state-of-the-internet/q1-2017-state-of-the-internet-connectivity-report.pdf">Akamai report</a>)</figcaption></figure><p>Indonesia berada pada peringkat ke-77 dunia dengan rata-rata 7.2 Mbps. Sebagai referensi, menonton video HD <em>streaming </em>memerlukan antara 2 sampai 10 Mbps tergantung dari resolusi dan codec. Maka, pengguna Internet rata-rata di Indonesia belum bisa sepenuhnya menonton HD tanpa terputus-putus (<em>lag</em>). Video yang bukan HD bisa ditonton dengan lancar pada jaringan <em>edge</em>, tapi tentunya ini akan mengkonsumsi kapasitas <em>link</em>, bukan sesuatu yang baik bagi rumah dengan banyak pengguna di dalamnya.</p><p>Kita semua menginginkan ISP dengan <em>link</em> <em>bandwidth</em> yang tinggi, tapi ini tidak menjamin kualitas kinerja seacara <em>end-to-end. </em>Hanya karena <em>bandwidth</em> menjanjikan <em>rate </em>data tinggi, bukan berarti kamu bisa mengharapkan kinerja yang sama dari server <em>remote </em>yang sedang kamu akses. Jaringan dapat mengalami <em>congestion</em> pada node tertentu karena permintaan yang tinggi, kegagalan <em>hardware</em>, serangan pada jaringan, atau alasan lainnya. Variasi dari kinerja <em>throughput </em>dan <em>latency</em> merupakan properti dari jaringan. Mengelola, mengatur, dan mengadaptasi perubahan “cuaca jaringan” ini merupakan tugas yang cukup rumit.</p><h3>Memiliki <em>Bandwidth Tinggi dan Latency Rendah</em></h3><p>Permintaan pengguna soal <em>bandwidth </em>tinggi berkembang cepat, karena berkembangnya <em>video streaming, </em>yang menghasilkan setengah lalu lintas Internet dunia. Walaupun tidak murah, ada beberapa strategi yang dapat meningkatkan kapasitas: menambahkan <em>fiber</em> baru, men-<em>deploy link-link</em> baru pada <em>route-route</em> yang penuh (<em>congested</em>), atau meningkatkan teknik WDM untuk mentransfer data lebih banyak melalui <em>link</em> yang ada.</p><p>Kita tidak bisa membuat cahaya bergerak lebih cepat, namun kita bisa membuat jarak antara klien dan server lebih dekat. Untuk meningkatkan kinerja situs dan aplikasi yang kita kembangkan, kita harus bisa merancangnya dengan selalu memikirkan limitasi dari ketersediaan <em>bandwidth</em> dan kecepatan cahaya: <strong>mengurangi <em>round-trip-time </em>(RTT), memindahkan data mendekati klien, dan mengembangkan aplikasi yang bisa menyembunyikan <em>latency</em> melalui <em>caching</em>, <em>pre-fetching</em></strong><em>, </em>dan teknik-teknik lainnya yang akan saya bahas pada tulisan-tulisan berikutnya.</p><p>Penulis merupakan penggiat sistem Cloud, Kubernetes, dan Container di Indonesia. Ia seorang <a href="https://www.cncf.io/people/ambassadors/">CNCF ambassador</a>, <a href="https://developers.google.com/community/experts">Google Developer Expert</a>, dan Kubernetes maintainer. Gabung dengan grup <a href="http://t.me/kubernetesindonesia">telegram Kubernetes dan Cloud Native Indonesia</a> untuk diskusi berbagai hal menarik seputar perkembangan teknologi Cloud Native, atau bantu menerjemahkan <a href="http://kubernetes.io/id">dokumentasi Kubernetes</a> ke <a href="http://bit.ly/k8s-docs-id-m3">bahasa Indonesia</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fc36271%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fc36271&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href">https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=279607e2cfa3" width="1" height="1" alt=""><hr><p><a href="https://medium.easyread.co/mengenal-jaringan-komputer-lebih-dekat-latency-dan-bandwidth-279607e2cfa3">Mengenal Jaringan Komputer lebih dekat: Latency dan Bandwidth</a> was originally published in <a href="https://medium.easyread.co/">Easyread</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentingnya Membangun Sistem yang Aman dan Andal]]></title>
            <link>https://medium.easyread.co/pentingnya-membangun-sistem-yang-aman-dan-andal-a15f7a3f94eb?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/a15f7a3f94eb</guid>
            <category><![CDATA[build-secure-reliable-sys]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[reliability]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Mon, 04 May 2020 05:02:31 GMT</pubDate>
            <atom:updated>2020-07-07T02:48:33.753Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building Secure and Reliable Systems Series — Part 1</h4><p>Baru-baru ini Indonesia dihebohkan dengan berita peretasan data 91 juta pelanggan Tokopedia yang dijual dengan harga 74 juta rupiah di <a href="https://www.cnnindonesia.com/teknologi/20200503120157-185-499513/penelusuran-91-juta-data-bocor-tokopedia-dijual-rp74-juta">pasar gelap</a>. Sebenarnya kasus ini bisa terjadi pada perusahaan apa saja. Facebook pernah terkena <a href="https://www.nytimes.com/2018/09/28/technology/facebook-hack-data-breach.html">hal yang serupa</a>, 50 juta pengguna terkena imbasnya. Twitter pernah menyuruh 330 juta pengguna untuk <a href="https://www.theverge.com/2018/5/3/17316684/twitter-password-bug-security-flaw-exposed-change-now">mengganti kata sandinya</a>.</p><p>Keamanan (<em>security</em>) adalah hal yang sangat krusial untuk sebuah sistem informasi digital, namun keandalan (<em>reliability) </em>pun tak kalah pentingnya. Membangun sistem yang aman dan juga andal terbilang sulit. Yuk kita bahas hubungan antar keduanya. Tulisan ini merupakan seri pertama dari intisari buku “<a href="https://landing.google.com/sre/static/pdf/SRS.pdf">Membangun Sistem yang Andal dan Aman (<em>Building Secure &amp; Reliable Systems</em>)</a>” karya tim Google SRE.</p><h3>Building Secure and Reliable Systems — Series List</h3><p><strong>1. Pentingnya Membangun Sistem yang Aman dan Andal — You’re here<br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-1-8d6fb8bb22b3"><strong>2.1. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 1</strong></a><strong><br></strong><a href="https://medium.com/easyread/mengenal-lawan-lawan-dalam-membangun-sistem-yang-aman-dan-andal-bagian-2-edf29bb74de0"><strong>2.2. Mengenal Lawan-Lawan dalam Membangun Sistem yang Aman dan Andal — Bagian 2</strong></a><strong><br></strong><a href="https://medium.com/easyread/meningkatkan-keamanan-dengan-proksi-sebuah-studi-kasus-di-google-ddfc5e24fd6a"><strong>3. Meningkatkan Keamanan dengan Proksi, Sebuah Studi Kasus di Google</strong></a><strong><br></strong><a href="https://medium.com/easyread/mempertimbangkan-aspek-keamanan-dan-keandalan-sedari-awal-68465a8814da"><strong>4. Mempertimbangkan Aspek Keamanan dan Keandalan Sedari Awal</strong></a></p><h3><strong>Aman vs Andal</strong></h3><p>Untuk mempertimbangkan sisi keamanan dan keandalan sistem, kita harus melihat dari berbagai aspek risikonya. Saat merancang <em>keandalan</em> sistem, kita harus selalu berpikir suatu saat nanti<strong> sistem akan mengalami kegagalan</strong>. Saat merancang <em>keamanan</em> sistem, kita harus selalu berpikir suatu saat nanti <strong>sistem akan diserang dan diretas</strong>. Walaupun keduanya sangat penting, selalu ada <em>tradeoff </em>antara keamanan dan keandalan.</p><ul><li><strong><em>Redundancy</em></strong><br>Biasanya kita merancang sistem yang andal dengan menambah <em>redundancy </em>pada sistem<em>. </em>Apa itu <em>redundancy</em>? Kita ambil gedung sebagai contoh. Gedung memiliki pintu keluar utama, tapi juga punya pintu keluar darurat saat terjadi kebakaran atau gempa. Artinya, gedung punya pintu keluar yang <em>redundant</em>. Memang benar <em>redundancy</em> membuat sistem menjadi lebih andal, tapi juga menambah jalur masuk peretas untuk mengacaukan sistem, atau biasa disebut dengan <em>attack surface</em>. <strong>Peretas cukuplah menemukan satu jalur saja untuk menggapai tujuan jahatnya</strong>.</li><li><strong><em>Manajemen Insiden<br></em></strong>Saat responder insiden berusaha memadamkan gangguan pada sistem, keberadaan peretas bisa mengacaukan kolaborasi dan informasi. Untuk memadamkan insiden keandalan, biasanya kita perlu banyak orang untuk memperkaya perspektif, supaya penyebab gangguan utama (<em>root cause</em>) cepat ketemu. Sebaliknya, untuk memadamkan insiden keamanan, kita perlu sesedikit mungkin orang yang bisa menyelesaikan permasalahan secara efektif, sehingga peretas tidak sempat berlama-lama memanfaatkan situasi. <strong>Kita harus terbiasa membagikan informasi ke orang lain hanya saat diperlukan saja (<em>need-to-know basis</em>)</strong>.</li></ul><h3>Confidentiality, Integrity, Availability</h3><p>Pernah mendengar istilah <a href="https://en.wikipedia.org/wiki/CAP_theorem">CAP theorem</a> pada sistem terdistribusi? Sistem yang andal dan aman punya istilah serupa, namanya CIA (<em>Confidentiality, Integrity, Availability</em>). Sistem yang andal dan sistem yang aman sama-sama memperhatikan prinsip <em>confidentiality, integrity, </em>dan <em>availability, </em>tapi melalui lensa yang berbeda. Gampangnya, perbedaan mendasar di keduanya terlihat dari ada atau tidaknya peretas di dalam sistem. Dari sisi keandalan, “pelaku peretas” biasanya bersifat pasif (misalnya <em>bug</em> atau kegagalan <em>hardware</em>), sedangkan dari sisi keamanan, pelaku peretas bersifat aktif dan sengaja menyerang, bisa kita kenal sebagai “hacker”.</p><p>Sistem andal tidak boleh melanggar prinsip <em>confidentiality. </em>Misalnya, sistem <em>chat</em> yang melanggar prinsip ini memiliki bug yang membuat pesan <em>chat </em>dikirimkan orang lain yang bukan tujuannya, alias tersasar. Selain itu, sistem aman yang mengikuti prinsip ini<em> </em>harus menghalangi peretas aktif untuk bisa mengakses, merusak, atau menghapus data. Supaya lebih jelas yuk kita lihat contoh CIA satu persatu, bagaimana masalah keandalan bisa membuat suatu sistem menjadi tidak aman.</p><h4>Confidentiality</h4><p>Pada industri dirgantara, sempat kejadian kasus <a href="https://www.faa.gov/air_traffic/publications/atpubs/aim_html/chap4_section_2.html">stuck in transmit</a>, dimana mikrofon pilot pesawat selalu berada dalam posisi <em>transmit</em>, sehingga percakapan apapun tersiarkan secara langsung, termasuk percakapan yang tidak semestinya terdengar. Ini melanggar prinsip <em>confidentiality. </em>Pada kasus ini, tidak ada peretas yang terlibat, tapi kesalahan pada <em>hardware</em> menyebabkan pilot membagikan percakapan yang tidak diinginkan.</p><h4>Integrity</h4><p>Pelanggaran pada <em>data integrity</em> tidak selalu melibatkan peretas. Google pernah mengalami kegagalan <em>integrity check </em>kriptografi pada beberapa blok data. Tim Google SRE memutuskan untuk menulis perangkat lunak yang mengkalkulasi secara masif <em>integrity</em> di setiap versi data dengan <em>single-bit flip</em>, dimana 0 jadi 1, dan sebaliknya. Akhirnya terbukti penyebabnya karena <em>single-bit flip</em>, dan tim berhasil memulihkan data aslinya.</p><h4>Availability</h4><p><em>Availability</em> tentu saja sangat diperhatikan oleh keandalan dan keamanan. Peretas bisa mengeksploitasi sistem yang lemah dan menghalangi admin untuk melakukan operasi seperti biasa. Peretas juga bisa mengendalikan perangkat berskala besar untuk membanjiri server dengan trafik , biasa dikenal dengan istilah DDoS (<em>distributed denial-of-service</em>).</p><p>Perangkat Google Home dan Chromecast pernah memiliki <a href="https://www.reddit.com/comments/9iivc5">bug</a> yang mengirimkan trafik berskala besar saat mengatur <em>clock</em>, sehingga memberikan beban yang tidak terduga pada layanan <em>central clock </em>Google. Hal ini bisa mirip sekali dengan adanya berita hangat yang membuat jutaan pengguna mengakses <em>query</em> Google pada saat yang bersamaan. Contohnya, saat kejadian gempa 4,5 SR di San Francisco pada tengah malam Oktober 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ZgM0aMjtYcrplN3ird1ew.png" /><figcaption>Trafik layanan Google saat kejadian gempa 4,5 SR di San Francisco pada 14 Oktober 2019</figcaption></figure><h3>Kesamaan Sistem yang Aman dan Andal</h3><p>Keamanan dan keandalan merupakan aspek yang sangat rentan terhadap perubahan sistem. Keduanya sulit dikerjakan saat sistem sudah ada di <em>production</em>, sehingga sebaiknya kita memasukkan keduanya dalam perancangan sistem sedini mungkin. Keduanya memerlukan perhatian dan pengujian terus-menerus di seluruh siklus pengembangan sistem. Yuk kita bahasa satu-persatu, apa saja kesamaannya.</p><h4>Tidak Terlihat</h4><p>Aman atau tidaknya sistem, andal atau tidaknya sistem, sama-sama tidak terlihat saat semuanya berjalan dengan baik. Namun, sasaran utama dari tim keandalan dan tim keamanan adalah memperoleh serta menjaga kepercayaan dari pengguna dan partner. Kunci terpenting dari kerpercayaan ini adalah <strong>komunikasi yang baik</strong>, tidak hanya saat gangguan atau insiden, tapi juga saat sistem sedang berjalan dengan baik.</p><h4>Evaluasi</h4><p>Sistem yang sempurna dari sisi keandalan dan keamanan mustahil untuk dicapai. Kita bisa menggunakan pendekatan risiko untuk mengevaluasi <em>cost</em> dari insiden negatif, dan juga <em>cost</em> untuk mencegah insiden terjadi.</p><p>Untuk mengevaluasi keandalan sistem, kita bisa menggunakan <a href="https://landing.google.com/sre/workbook/chapters/error-budget-policy/"><em>error budget</em></a><em>, </em>dimana ketika komponen yang sama mengalami gangguan berulangkali dan telah melewati “anggaran” atau batas, tim harus berhenti mengembangkan fitur, dan fokus untuk meningkatkan keandalan komponen tersebut.</p><p>Untuk mengevaluasi keamanan sistem, kita bisa mengadakan pengujian peretasan (<em>adversarial testing</em>), sebuah simulasi penyerangan yang dilakukan oleh peretas beretika. Dari sini, kita bisa tahu seberapa efektif sistem berhasil mendeteksi dan seberapa besar konsekuensi dari penyerangan.</p><h4>Sederhana</h4><p>Merancang sistem sesederhana mungkin adalah salah satu cara terbaik untuk meningkatkan kemampuan kita dalam mengevaluasi sistem dari sisi keandalan dan keamanan. Sistem yang sederhana memperkecil <em>attack surface</em>, mengurangi potensi interaksi sistem yang tak terduga, dan mempermudah manusia (kita, para pengembang sistem) untuk mengerti dan menguasai sistem. Saat terjadi insiden, penguasaan sistem sangat penting bagi responder untuk memadamkan gangguan dan mengurangi MTTR (<em>mean time to recovery</em>).</p><h4>Evolusi</h4><p>Sistem tidak bisa terhindar dari perubahan atau evolusi, secanggih dan seelegan apapun dirancang pada awalnya. Penyebabnya banyak sekali, mulai dari kebutuhan bisnis sangat dinamis, perubahan pada skala penggunaan, dan infrastruktur yang semakin hari semakin kompleks. Pengembang sistem juga tidak henti-hentinya mengambil jalan pintas dan mengakumulasi <em>technical debt</em>.</p><p>Google pun tidak terhindar dari insiden yang muncul akibat dari evolusi sistem. YouTube pernah mengalami <em>down</em> lebih dari satu jam di tahun 2018 karena perubahan kecil pada <em>library</em> <em>logging</em>-nya.</p><h4>Tahan Banting</h4><p>Sistem harus bisa tahan banting dari berbagai kondisi yang tak terduga. Dari sisi keandalan, biasanya kondisi tak terduga disebabkan oleh beban yang tinggi atau gagalnya komponen. Untuk mengatasi masalah keandalan sistem pada beban yang tinggi, kita bisa membagi-bagi bebannya (<em>processing less</em>) atau mengurangi <em>cost</em> pemrosesan setiap <em>request</em> (<em>processing more cheaply</em>). Untuk mengatasi masalah gagalnya komponen, keandalan dapat ditingkatkan dengan <em>redundancy</em> dan membedakan <em>failure domain </em>yang membatasi dampak dari sebuah kegagalan sistem atau komponen.</p><p>Namun, saat komponen-komponen sudah membentuk sistem yang cukup kompleks, sulit untuk menghindari gangguan keamanan. Cara mengatasinya adalah dengan teknik <strong><em>Defense in depth</em></strong><em>, </em>yang membuat mekanisme pertahanan <em>redundant </em>yang berlapis-lapis, dan <strong><em>Distinct failure domains</em></strong>, yang membatasi “area peledakan” dari gagalnya sebuah komponen<em>.</em></p><p>Kita dapat mengimplementasi <em>Distinct failure domains </em>dengan membatasi <em>scope</em> suatu kredensial. Misalnya, kredensial internal yang digunakan di Google punya batasan terhadap region. Jika peretas berhasil menjebol satu region, maka ia tidak bisa memperluas penyerangannya ke region lainnya.</p><p>Selain dari peretas eksternal, kita juga harus mempertimbangkan potensi penyerangan dari dalam atau internal. Prinsip <em>least privilege </em>dapat mencegah hal ini, dimana pengguna hanya diberikan <em>privilege </em>yang diperlukan untuk melakukan tugasnya saja.</p><h4>Memasuki Tahap Production</h4><p>Saat menerjemahkan perancangan ke tahap implementasi untuk <em>production</em>, kita tetap harus memperhatikan aspek keamanan dan keandalan. Lakukan <em>code review</em>, pengujian sistem, dan <em>deploy</em> terbatas dengan teknik <em>canary.</em></p><h4>Investigasi Sistem dan <em>Logging</em></h4><p>Kita harus berasumsi bahwa keandalan dan keamanan sistem akan gagal. Saat ini terjadi, rancang perencanaan untuk deteksi dini dan pemulihan dengan seksama.</p><p><em>Logging</em> yang baik merupakan teknik dasar dari deteksi kegagalan dan alat bantu untuk pemulihan. <em>Logging</em> yang rinci pada umumnya baik untuk sistem, dengan beberapa catatan. Untuk skala besar, <em>logging</em> yang terlalu rinci membuat analisis menjadi sulit dan <em>cost</em>-nya mahal.</p><p>Dibandingkan dengan untuk keandalan, l<em>ogging</em> untuk keamanan perlu perhatian lebih. Kita tidak boleh memasukkan informasi sensitif pada <em>log</em>, seperti kredensial dan data personal, karena ini bisa menjadi target sasaran peretas.</p><h4>Respon terhadap Krisis</h4><p>Saat insiden darurat atau krisis, tim harus berkolaborasi secara cepat dan tanggap, karena <em>worst case</em>-nya insiden bisa membuat bisnis mengalami kebangkrutan dalam hitungan menit saja. Pada tahun 2014, seorang peretas berhasil membuat perusahaan <em>hosting </em>Code Spaces bangkrut dalam hitungan jam, dengan mengambil alih perangkat admin dan menghapus semua data, termasuk <em>backup</em>. Pada saat penanganan krisis, perlu adanya rantai komando yang jelas, <em>checklist</em>, <em>playbook</em>, dan protokol yang solid.</p><h4>Pemulihan</h4><p>Memulihkan sistem dari gangguan keamanan biasanya memerlukan pembaruan <em>patch</em> pada sistem. Kita harus membuat proses yang bisa mempercepat hal ini, menggunakan mekanisme yang dicoba secara reguler dan cukup andal. Namun, ini seperti pedang bermata dua. Pembaruan yang cepat berpotensi untuk membuat <em>bug </em>dan isu performa yang menyebabkan kerusakan yang besar. Kita harus bisa menyeimbangkan pembaruan <em>patch </em>keamanan dan mengkategorikannya, lagi-lagi berdasarkan analisis risiko dan kebutuhan.</p><p>Keamanan dan keandalan sistem merupakan komponen penting bagi bisnis dan memilki banyak kesamaan. Keduanya merupakan komponen pengembangan yang seringkali dikorbankan supaya fitur lebih cepat rilis, tapi sangat mahal diperbaiki saat sudah terjadi gangguan di <em>production</em>.</p><p>Penulis merupakan penggiat sistem Cloud, Kubernetes, dan Container di Indonesia. Ia seorang <a href="https://www.cncf.io/people/ambassadors/">CNCF ambassador</a>, <a href="https://developers.google.com/community/experts">Google Developer Expert</a>, dan Kubernetes maintainer. Gabung dengan grup <a href="http://t.me/kubernetesindonesia">telegram Kubernetes dan Cloud Native Indonesia</a> untuk diskusi berbagai hal menarik seputar perkembangan teknologi Cloud Native, atau bantu menerjemahkan <a href="http://kubernetes.io/id">dokumentasi Kubernetes</a> ke <a href="http://bit.ly/k8s-docs-id-m3">bahasa Indonesia</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fc36271%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fc36271&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href">https://medium.com/media/1f83e4a733ad3206f47e6dd38aa4fc6d/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a15f7a3f94eb" width="1" height="1" alt=""><hr><p><a href="https://medium.easyread.co/pentingnya-membangun-sistem-yang-aman-dan-andal-a15f7a3f94eb">Pentingnya Membangun Sistem yang Aman dan Andal</a> was originally published in <a href="https://medium.easyread.co/">Easyread</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Summer Summit Trifecta]]></title>
            <link>https://medium.com/life-at-go-jek/a-summer-summit-trifecta-d18833825dd7?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/d18833825dd7</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubecon]]></category>
            <category><![CDATA[cloud-native]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Thu, 18 Jul 2019 09:38:34 GMT</pubDate>
            <atom:updated>2019-07-18T09:39:25.556Z</atom:updated>
            <content:encoded><![CDATA[<p>While most people spend their summer traveling to exotic countries or sipping coconut water straight from its shell, I spent my midsummer days at a tech conference.</p><p>This was <a href="https://medium.com/life-at-go-jek/kubecon-cloudnativecon-2018-shanghai-recap-cfaa78d0172a">my second time</a> attending and collaborating with Kubernetes Conference (KubeCon) in Shanghai. There was one thing that made the conference special. This time, the conference was co-located with Open Source Summit China as well, so we could see other speakers talking about<a href="https://kccncosschn19eng.sched.com/"> non-Kubernetes and non-cloud native topics</a> as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o921jKfVKtm5D8_p" /></figure><p>How I spent my summer might sound a bit unusual, but it was a fun and memorable experience for me. During the holidays, most people might collect souvenirs — for me, I collect memorable people. Well, that can be directly translated to opening up a tech network 😄</p><h3>The Hallway Track Adventure</h3><p>If you are super passionate about Kubernetes, cloud-native, and open source stuff, I would highly recommend at least attending, even if you are not speaking. The networking and collaboration opportunities with the folks from the community are truly endless, tons of amazing ideas could just spark out by talking and discussing along “the hallway” with various technical leads and contributors. Thus, the conference is famous for its “hallway track”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*akjJucdNLOpiC1Jo" /><figcaption>Melanie from Airbnb sharing learnings from their migrations to Kubernetes</figcaption></figure><p>You don’t believe me? Let me give you an example from last year’s conference. I have achieved three things from attending the KubeCon.</p><p>First, I learned that nobody had started Kubernetes/CloudNative community yet in Indonesia from the<a href="https://kubernetes.io/blog/2018/12/05/new-contributor-workshop-shanghai/"> contributor summit event</a>, but people in the local communities were very enthusiastic about it. So I talked to a couple of friends, and we started organizing a<a href="https://www.meetup.com/jakarta-kubernetes/"> Kubernetes monthly meetup in Jakarta</a>.</p><p>We started from 0 members in January, and in just 6 months, the community has grown into 1,400+ members. Now, we regularly organize<a href="https://www.meetup.com/Microservice-JKT/"> Cloud Native Jakarta meetup</a>s and Kubernetes/Cloud Native in<a href="https://www.meetup.com/Kubernetes-and-Cloud-Native-Bandung/"> another other city</a> as well.</p><p>Second, I made new friends that I wouldn’t have met if I didn’t come to the event, I found sponsors and I started to climb up the Kubernetes org’s ladder once I was accepted <a href="https://github.com/kubernetes/org/issues/250">as a member</a>.</p><p>I have been collaborating with some Kubernetes folks via Slack, but it was an amazing experience to actually meet and interact with them. Nothing beats a face to face convo, right?</p><p>Finally, I learned about the opportunity of becoming a<a href="https://www.cncf.io/people/ambassadors/"> CNCF Ambassador</a> in Asia. So I tried to apply and luckily, I was accepted. Now I am the CNCF Ambassador for Indonesia.</p><p>I think it’s important to put Asia on the tech map. Especially in Southeast Asia, because it’s underrepresented and doesn’t have sufficient coverage. If you want to know more about the details of this program, you can see it <a href="https://github.com/cncf/ambassadors"><strong>here</strong></a><strong> </strong>or catch me on <a href="http://twitter.com/girikuncoro"><strong>twitter</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pikj2HgmInkoC8yxecFmg.png" /><figcaption>Chatting with the famous <a href="https://twitter.com/brianredbeard">Redbeard</a></figcaption></figure><h3>The Kubecon Report</h3><p>Since I had traveled hundreds of miles to Shanghai, I didn’t want to just sit back and only listen to talks &amp; keynotes, because you can just open up their <a href="https://www.youtube.com/playlist?list=PLj6h78yzYM2Njj5PvNc4Mtcril2YyR95d">Youtube playlist</a> to do that. However, I was involved in many surprise projects during my visit.</p><p>I volunteered to “guard” the Maintainers booth and answer all the questions from the Kube geeks about Kubernetes/CNCF projects. Interestingly, some of these Kube geeks sometimes only stopped by to ask for stickers (and we all know where those stickers will land: on their computers :p).</p><p>During that day, I also had the idea to organize cloud-native conference called “cloud-native day” in Indonesia, that seems fun!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*Zoii79ZlwmOCyDfxYqJE6g.png" /><figcaption>Giri volunteering in Maintainer’s booth</figcaption></figure><p>Remember when I said I collect memorable people at Kubecon? This is one of the real proof. When I went to the Docs Contributor summit, I had great discussions with friends from SIG Docs and the Chinese localization team. We aspire to solve several issues.</p><p>My friend and I are running the Indonesian localization effort for the<a href="http://kubernetes.io/id"> <strong>Kubernetes docs</strong></a>. Within 2 months, we have translated almost 40 pages of Kubernetes docs from 16 contributors during the first milestone. We are very open if you are interested in helping us out!</p><p>Read our <a href="http://bit.ly/k8s-id-m2"><strong>second milestone</strong></a> and we’ll be very happy if you want to contribute. Together I believe we can make an impact in decreasing the language barrier in the entry path for a new Kubernetes contributor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjJYyH7IPj3o2b3SacvPrg.png" /><figcaption>Meeting with Brad Topol, the SIG Approver</figcaption></figure><p>Finally, I had a chance to be interviewed by<a href="https://twitter.com/kamcmahon"> Kim McMahon</a> from CNCF for Meet the Ambassador series. During the interview, I talked about what GOJEK is, how we are very serious in building the local tech communities, and contribute back to the communities. This will be on Youtube, I will notify you when it’s published, please stay tuned!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tZsAm8vWOm8zr90XfKGtPQ.png" /><figcaption>Giri being interviewed by CNCF</figcaption></figure><h3>Scotty Can’t Beam Me Up!</h3><p>At this point, probably some of you are interested to attend the next KubeCon. But maybe some of you are wondering how can you travel there without spending a penny, but of course, it’s not because Scotty will beam you up there :p</p><p>For me, I got fully funded by CNCF as part of the Ambassador program. However, there are other options that you can explore:</p><ul><li>You can apply for the <a href="https://www.lfasiallc.com/events/kubecon-cloudnativecon-china-2019/attend/diversity-scholarships/"><strong>Diversity Scholarship</strong></a>. CNCF spends a lot of money for underrepresented groups. I went to the conference with my friend from Indonesia who got this.</li><li>You can apply for <a href="https://events.linuxfoundation.org/travel-fund-request/"><strong>Linux Foundation travel fund</strong></a>. I’m going to Open Source Summit Japan with a friend who got funds from this program.</li></ul><h3>To Boldly Go to the Next Chapters</h3><p>KubeCon has always been a great learning experience and an amazing adventure for me. GOJEK has consistently encouraged engineers to speak and attend tech conferences and local meetups.</p><p>We also went to KubeCon Barcelona and participated as speakers in three talks. The topics that we brought were:</p><ul><li><a href="https://kccnceu19.sched.com/event/MPfe/benchmarking-cloud-native-databases-performance-on-kubernetes-iqbal-farabi-tara-baskara-go-jek"><strong>Benchmarking Cloud-Native Databases</strong></a></li><li><a href="https://kccnceu19.sched.com/event/MPc7/migrating-south-east-asias-biggest-payments-company-to-kubernetes-akashdeep-singh-go-jek-abhishek-sangwan-mavenhive-technologies"><strong>Learnings from Kubernetes Migration</strong></a></li><li><a href="https://kccnceu19.sched.com/event/MPac/moving-people-and-products-with-machine-learning-on-kubeflow-jeremy-lewi-google-willem-pienaar-go-jek"><strong>Lessons from Kubeflow</strong></a></li></ul><p>You can just click the link if you’re curious and want to learn more about Kubernetes.</p><p>And, just like last year, I plan to realize several initiatives after the conference, they are:</p><ul><li>Drafting out a plan for organizing Cloud Native Day in Jakarta next year.</li><li>I recently got accepted as part of the <a href="https://github.com/kubernetes/sig-release/blob/master/release-managers.md#members-2"><strong>Kubernetes 1.16 Release Team</strong></a>, and I will share lots of stuff I learned from this opportunity.</li><li>Onboard more new contributors from Indonesia, by promoting the <a href="http://kubernetes.io/id"><strong>Docs</strong></a> project and “auto-scale” new meetups in other cities. Catch <a href="http://twitter.com/girikuncoro"><strong>me</strong></a> on Twitter if you are interested in helping out in your city.</li></ul><p>I will definitely come again to KubeCon to collect more memorable people and gain new knowledge, I also hope to make more friends and collaborate with you in the tech community!</p><p><strong>Cheers,<br>Giri Kuncoro<br>CNCF Ambassador</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d18833825dd7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/life-at-go-jek/a-summer-summit-trifecta-d18833825dd7">A Summer Summit Trifecta</a> was originally published in <a href="https://medium.com/life-at-go-jek">Life at Gojek</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kabel Terhubung di Jaringan Kontainer]]></title>
            <link>https://medium.com/pujanggateknologi/kabel-terhubung-di-jaringan-kontainer-ae46208cde30?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae46208cde30</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Thu, 14 Feb 2019 06:00:06 GMT</pubDate>
            <atom:updated>2019-02-24T16:34:06.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Kontainer. Teknologi ini jadi populer karena Docker. Namun sebenarnya kontainer sudah cukup lama dikenal di dunia Linux dengan <a href="https://en.wikipedia.org/wiki/Linux_namespaces">ruangnama</a> (baca: <em>namespace</em>) dan <a href="https://en.wikipedia.org/wiki/Cgroups">Cgroups</a>. Menurut <a href="https://www.docker.com/resources/what-container">Docker</a>, kontainer adalah bagian dari perangkat lunak yang membuat aplikasi jadi mudah dijalani. Kontainer membungkus barisan kode dan semua dependensinya, supaya aplikasi bisa cepat dan andal (baca: <em>reliable</em>) jalan di lingkungan (baca: <em>environment</em>) satu dan lainnya.</p><p>Salah satu yang sering membuat orang pusing soal kontainer adalah cara kerja jaringannya. Bagaimana bisa banyak kontainer jalan di satu mesin saling terhubung? Bagaimana kontainer di mesin yang satu bisa <em>ngobrol </em>dengan kontainer di mesin yang beda? Ada banyak sekali cara jaringan kontainer bekerja. Artikel ini mencoba mengupas dan mengenalkan teman-teman pembaca pada beberapa model sederhana untuk jaringan kontainer.</p><h3>Kamus istilah</h3><p>Catatan istilah-istilah penting pada jaringan kontainer:</p><ul><li>Ruangnama (<em>namespace</em>): sebuah fitur Linux yang dapat mengisolasi berbagai macam ranah, termasuk jaringan, proses, dan volum.</li><li>Tuanrumah (<em>host</em>): mesin tempat jalannya kontainer.</li><li>Rute (<em>route</em>): rute yang memberitahu Linux kemana paket harus diteruskan, biasa ditemukan pada <em>router</em>.</li><li>Jembatan (<em>bridge</em>): sebuah software yang menghubungkan dua segmen jaringan berbeda.</li><li>Jaringan overlay (<em>overlay network</em>): sebuah jaringan yang dibuat di atas jaringan lain.</li></ul><h3>Apa sebenarnya jaringan kontainer?</h3><p>Saat kode jalan di dalam kontainer, sebenarnya kita punya 2 opsi:</p><ul><li>Kode jalan di ruangnama jaringan tuan rumah (baca: <em>host network namespace</em>). Ini cukup normal dan mudah dimengerti. Kalau kode jalan di port 3000, di mesin juga akan jalan di port 3000.</li><li>Kode jalan di ruangnama jaringannya sendiri.</li></ul><p>Misalkan kode jalan di ruangnama jaringannya sendiri pada port 5000. Mesin lain tentu harus punya jaringan yang terhubung ke kode tersebut. Awalnya banyak yang mengira, apa sulitnya ini? Bukankah menghubungkan jaringan 2 kode yang berbeda cukup mudah? Rupanya ada banyak solusi. Pada artikel ini, kita akan coba membuat jaringan kontainer terhubung dengan 4 model berbeda. Mulai dari ruangnama tuanrumah yang sederhana, sampai menggunakan model jaringan overlay.</p><h3>Mengingat kembali konsep jaringan</h3><ul><li>Dalam jaringan komputer, program saling mengirimkan <strong>paket</strong>.</li><li>Setiap paket punya <strong>alamat IP</strong>.</li><li>Dalam Linux, kernel bertanggung jawab implementasi protokol jaringan.</li><li><strong>Subnet</strong> 172.16.1.0/24 berarti alamat IP dari 172.16.1.0 sampai 172.16.1.255.</li><li>Jaringan terdiri dari 7 <a href="https://en.wikipedia.org/wiki/OSI_model">lapisan OSI</a>: Alamat Mac di lapisan 2; asal dan tujuan IP di lapisan 3; port dan info TCP/UDP di lapisan 4; konten dari paket HTTP di layer 7.</li></ul><h3>Model 1: Terhubung dengan 1 ruangnama jaringan</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_mE_2v_rYzaRKiqBqqK0A.png" /><figcaption>1 ruangnama jaringan</figcaption></figure><p>Gambar di atas menggambarkan model paling sederhana bagaimana kontainer terhubung ke dunia di luarnya. Kontainer <strong>kon </strong>melalui mekanisme Linux ruangnama dan Cgroups, terisolasi dengan cukup ajaib. Tulisan kali ini tak akan membahas detail bagaimana ruangnama bekerja. Namun, bagian yang paling menarik untuk disimak saat ini adalah <a href="https://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/">ruangnama jaringan</a>. Dengan adanya ruangnama jaringannya sendiri, kontainer memiliki susun jaringan (baca: <em>networking stack</em>) yang terisolasi. Apa artinya? Kontainer jadi punya paling tidak 3 hal: antarmuka jaringannya sendiri, alamat IP sendiri, dan aturan rute sendiri.</p><p>Mari kita coba buat ruangnama jaringan. Ambil mesin Linux-mu, dan coba jalankan perintah ini untuk membuat ruangnama jaringan dengan nama <strong>kon</strong>.</p><pre>$ ip netns add kon<br>$ ip netns<br>kon (id: 0)</pre><p>Untuk menjalankan perintah di dalam ruangnama tersebut, cukup gunakan perintah <strong>ip</strong> dengan ruangnama, dilanjutkan dengan perintah yang diinginkan. Coba kita bandingkan antarmuka yang dimiliki oleh ruangnama ini dengan tuanrumah.</p><pre>$ ip netns exec ip link<br>1: lo</pre><pre>(tanpa netns, jalan di tuanrumah)<br>$ ip link<br>1: lo<br>2: eth0</pre><p>Berbeda bukan hasilnya? Ini membuktikan kontainer dan tuanrumah punya antarmuka jaringan yang berbeda, berkat isolasi. Sekarang pertanyaannya, bagaimana cara menghubungkan kontainer dengan tuanrumah kalau begini? Menurut gambar tadi, kita perlu membuat <a href="http://man7.org/linux/man-pages/man4/veth.4.html">kabel <strong>veth</strong></a><strong> </strong>yang menyambung ruangnama kontainer dengan tuanrumah. Ujung kabel satu berada di tuanrumah, dan ujung satunya lagi di ruangnama kontainer.</p><pre>$ ip link add veth1 type veth peer name veth2<br>$ ip link set veth2 netns kon</pre><p>Nah, sekarang kita bisa memberi alamat IP ujung <strong>veth</strong> yang ada di ruangnama kontainer. Asumsi tuanrumah sudah punya IP 10.0.0.10 pada antarmuka utama, coba kita beri alamat IP dengan subnet berbeda pada ruangnama kontainer. Misalnya, 172.16.0.1. Lalu, kita naikkan kedua ujung kabel <strong>veth</strong> dan antarmuka <strong>loopback</strong>.</p><pre>$ ip netns exec kon ip addr add 172.16.0.1 dev veth2</pre><pre>$ ip netns exec kon ip link set dev veth2 up<br>$ ip link set dev veth1 up</pre><pre>$ ip netns exec kon ip link set lo up</pre><p>Supaya kontainer bisa <em>ngobrol</em> dengan tuanrumah, menaikkan antarmuka saja tidak cukup. Kita harus mengatur rute <em>default</em> di dalam kontainer, dan rute kemana tuanrumah harus mengirimkan paket untuk kontainer kita.</p><pre>$ ip route add 172.16.0.1/32 dev veth1<br>$ ip netns exec kon ip route add default via 172.16.0.1 dev veth2</pre><p>Sekarang, kontainer kita sudah terhubung dan siap <em>ngobrol</em> dengan tuanrumah.</p><pre>$ ping 172.16.0.1<br>$ ip netns exec kon ping 10.0.0.1</pre><p>Kita sudah berhasil menghubungkan ruangnama kontainer dan tuanrumah, dengan bantuan kabel <strong>veth</strong> dan aturan rute.</p><h3>Model 2: Terhubung dengan 2 ruangnama, 1 tuanrumah</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3O_HGweZGX2hfVZGEMB1g.png" /><figcaption>2 ruangnama, 1 tuanrumah</figcaption></figure><p>Model berikutnya, kita punya 2 ruangnama kontainer jalan di dalam 1 tuanrumah. Masing-masing kontainer punya alamat IP berbeda. Seperti layaknya model 1, setiap kontainer terhubung dengan kabel <strong>veth</strong>. Kali ini kita hubungkan kabel tersebut dengan<em> </em>sebuah jembatan (baca: <em>bridge</em>) <strong>br0</strong>. Sebenarnya tanpa memberi alamat IP pada jembatan, kedua kontainer ini sudah bisa komunikasi. Tapi untuk bisa sampai ke tuanrumah, jembatan ini perlu IP.</p><p>Bagaimana 2 ruangnama yang saling terisolasi ini bisa terhubung? Bagaimana cara mereka <em>ngobrol </em>dengan tuanrumah melalui jembatan?<em> </em>Mari kita simulasikan.</p><p>Pertama, kita buat 2 ruangnama jaringan <strong>kon1 </strong>dan <strong>kon2</strong>.</p><pre>$ ip netns add kon1<br>$ ip netns add kon2<br>$ ip netns<br>kon1 (id: 0)<br>kon2 (id: 1)</pre><p>Lalu, buat kabel <strong>veth</strong> seperti di model 1. Simpan satu ujung <strong>veth </strong>pada ruangnama kontainer, dan ujung satunya pada tuanrumah.</p><pre>$ ip link add veth10 type veth peer name veth11<br>$ ip link add veth20 type veth peer name veth21<br>$ ip link set veth11 netns kon1<br>$ ip link set veth21 netns kon2</pre><p>Berikan alamat IP pada ujung <strong>veth </strong>di ruangnama kontainer dan naikkan.</p><pre>$ ip netns exec kon1 ip addr add 172.16.0.2/24 dev veth11<br>$ ip netns exec kon2 ip addr add 172.16.0.3/24 dev veth21<br>$ ip netns exec kon1 ip link set dev veth11 up<br>$ ip netns exec kon2 ip link set dev veth21 up</pre><p>Buat jembatan, berikan alamat IP, dan naikkan semua antarmuka yang belum aktif.</p><pre>$ ip link add name br0 type bridge</pre><pre>$ ip link set dev veth10 master br0<br>$ ip link set dev veth20 master br0</pre><pre>$ ip addr add 172.16.0.1/24 dev br0<br>$ ip link set dev br0 up</pre><pre>$ ip link set dev veth10 up<br>$ ip link set dev veth20 up</pre><pre>$ ip netns exec kon1 ip link set lo up<br>$ ip netns exec kon2 ip link set lo up</pre><p>Terakhir, kita konfigurasi rute <em>default</em> pada masing-masing kontainer melalui jembatan <strong>br0</strong>, supaya mereka tahu jalan menuju tuanrumah.</p><pre>$ ip netns exec kon1 ip route add default via 172.16.0.1 dev veth11<br>$ ip netns exec kon2 ip route add default via 172.16.0.1 dev veth21</pre><p>Sekarang, 2 ruangnama kontainer ini sudah saling terhubung, dan juga siap <em>ngobrol</em> dengan tuanrumah. Coba kita tes koneksi dari <strong>kon1</strong> ke <strong>kon2</strong>.</p><pre>$ ip netns exec kon1 ping 172.16.0.3</pre><p>Tes juga koneksi dari <strong>kon1</strong> ke tuanrumah, dan dari tuanrumah ke <strong>kon2</strong>.</p><pre>$ ip netns exec kon1 ping 10.0.0.1<br>$ ping 172.16.0.3</pre><p>Nah, kita sudah berhasil menghubungkan antar kontainer dan juga tuanrumah. Seperti model 1, selain dibantu dengan kabel <strong>veth </strong>dan aturan rute, model 2 ini menggunakan jembatan <strong>br0</strong> untuk menghubungkan beberapa kontainer di tuanrumah yang sama.</p><h3>Model 3: Terhubung dengan banyak tuanrumah, jaringan L2 sama</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4FsNkurxSyr9ZN7Ht7fUPg.png" /><figcaption>Banyak tuanrumah, jaringan L2 sama</figcaption></figure><p>Model selanjutnya, kita punya beberapa kontainer yang tersebar di 2 tuanrumah berbeda. Tuanrumah tersebut terhubung di jaringan L2 melalui switch. Bagaimana kontainer di satu tuanrumah bisa <em>ngobrol</em> dengan tuanrumah lainnya? Mari kita coba cari tahu.</p><p>Sebenarnya, ini merupakan ekstensi dari model 2 yang sudah kita coba. Namun, kuncinya ada pada rute di masing-masing tuanrumah. Pertama, kita siapkan 2 tuanrumah dengan konfigurasi pada model 2. Untuk mempercepat konfigurasi, jalankan skrip di bawah ini. Sesuaikan alamat IP pada masing-masing tuanrumah.</p><pre>$ ip netns add $KON1<br>$ ip netns add $KON2</pre><pre>$ ip link add veth10 type veth peer name veth11<br>$ ip link add veth20 type veth peer name veth21</pre><pre>$ ip link set veth11 netns $KON1<br>$ ip link set veth21 netns $KON2</pre><pre>$ ip netns exec $KON1 ip addr add $IP1/24 dev veth11<br>$ ip netns exec $KON2 ip addr add $IP2/24 dev veth21</pre><pre>$ ip netns exec $KON1 ip link set dev veth11 up<br>$ ip netns exec $KON2 ip link set dev veth21 up</pre><pre>$ ip link add name br0 type bridge</pre><pre>$ ip link set dev veth10 master br0<br>$ ip link set dev veth20 master br0</pre><pre>$ ip addr add $BRIDGE_IP/24 dev br0</pre><pre>$ ip link set dev br0 up</pre><pre>$ ip link set dev veth10 up<br>$ ip link set dev veth20 up</pre><pre>$ ip netns exec $KON1 ip link set lo up<br>$ ip netns exec $KON2 ip link set lo up</pre><pre>$ ip netns exec $KON1 ip route add default via $BRIDGE_IP dev veth11<br>$ ip netns exec $KON2 ip route add default via $BRIDGE_IP dev veth21</pre><p>Sekarang kita sudah punya 2 tuanrumah dengan konfigurasi sama seperti model 2. Asumsi 2 tuanrumah ini sudah terhubung dengan L2 <em>switch</em>. Untuk model ini, kita perlu tambahkan rute spesifik pada tuanrumah untuk bisa <em>ngobrol</em> dengan ruangnama jaringan di tuanrumah satunya.</p><pre>(pada tuanrumah 1)<br>$ ip route add 172.16.1.0/24 via 10.0.0.20 dev eth0</pre><pre>(pada tuanrumah 2)<br>$ ip route add 172.16.0.0/24 via 10.0.0.10 dev eth0</pre><p>Lalu terakhir, kita harus aktifkan IP <em>forward </em>pada masing-masing tuanrumah. Ini kita perlukan supaya paket yang datang ke antarmuka utama bisa diteruskan oleh Linux ke antarmuka yang lain. Kalau ini tidak dilakukan, paket yang ditujukan ke antarmuka dengan alamat IP yang tidak dimilikinya akan dijatuhkan. Dalam hal ini, antarmuka utama pada tuanrumah akan menerima IP 172.16.*.* yang bukan miliknya, melainkan milik antarmuka <strong>br0</strong>, sehingga perlu diteruskan<strong>.</strong></p><pre>$ sysctl -w net.ipv4.ip_forward=1</pre><p>Kita sudah siap untuk tes koneksi. Mari kita coba koneksi dari <strong>kon1</strong> ke <strong>kon3</strong>.</p><pre>$ ip netns exec kon1 ping 172.16.1.2</pre><p>Hore! Kita sudah berhasil membuktikan terhubungnya kontainer antar tuanrumah. Dengan terhubungnya tuanrumah melalui L2 <em>switch</em>, kita cukup melakukan pengaturan rute <em>subnet</em> kontainer yang ada di tuanrumah lainnya.</p><h3>Model 4: Terhubung dengan banyak tuanrumah, jaringan overlay</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dqP0npZEnyy9-sb21eRgg.png" /><figcaption>Banyak tuanrumah, jaringan overlay</figcaption></figure><p>Pada model 3, kita sudah pelajari kontainer yang terhubung dengan L2 jaringan sama. Sekarang, bagaimana jadinya bila L2 tersegregasi, atau di antara tuanrumah ada router bahkan ratusan router di jaringan Internet? Tentu model 3 tak akan jalan, karena router di Internet tak tahu menahu soal alamat IP subnet kontainer. Lalu bagaimana solusinya? Ada banyak solusi, salah satunya dengan jaringan overlay.</p><p>Di model 4 ini, kita tambahkan antarmuka <strong>tun</strong> seperti pada gambar di atas. Antarmuka <strong>tun</strong> ini cukup unik, karena di belakangnya tidak ada apa-apa, nampak kosongan saja. Namun, ini berguna jika kita jalankan proses/program di belakangnya.</p><p>Antarmuka <strong>tun</strong> akan menerima paket mentah, lalu program bisa melakukan apapun terhadap paket ini. Dalam kasus ini, program bisa membungkus paket dengan paket UDP misalnya, alias enkapsulasi, lalu dikirim ke tuanrumah lain. Ini ide dasar dari mekanisme jaringan overlay. Gunanya? Tuanrumah tak perlu tahu soal jaringan kontainer, tapi cukup tahu bagaimana terhubung dengan tuanrumah yang lain.</p><p>Mari kita coba simulasikan. Langkah pertama, siapkan 2 tuanrumah dan jalankan perintah yang mirip dengan model 3 di masing-masing tuan rumah berikut.</p><pre>$ ip netns add $KON1<br>$ ip netns add $KON2</pre><pre>$ ip link add veth10 type veth peer name veth11<br>$ ip link add veth20 type veth peer name veth21</pre><pre>$ ip link set veth11 netns $KON1<br>$ ip link set veth21 netns $KON2</pre><pre>$ ip netns exec $KON1 ip addr add $IP1/24 dev veth11<br>$ ip netns exec $KON2 ip addr add $IP2/24 dev veth21</pre><pre>$ ip netns exec $KON1 ip link set dev veth11 up<br>$ ip netns exec $KON2 ip link set dev veth21 up</pre><pre>$ ip link add name br0 type bridge</pre><pre>$ ip link set dev veth10 master br0<br>$ ip link set dev veth20 master br0</pre><pre>$ ip addr add $BRIDGE_IP/24 dev br0</pre><pre>$ ip link set dev br0 up</pre><pre>$ ip link set dev veth10 up<br>$ ip link set dev veth20 up</pre><pre>$ ip netns exec $KON1 ip link set lo up<br>$ ip netns exec $KON2 ip link set lo up</pre><pre>$ ip netns exec $KON1 ip route add default via $BRIDGE_IP dev veth11<br>$ ip netns exec $KON2 ip route add default via $BRIDGE_IP dev veth21</pre><pre>$ sysctl -w net.ipv4.ip_forward=1</pre><p>Dari sini, kita akan membuat terowongan (baca: <em>tunnel</em>) UDP menggunakan alat bernama <a href="https://linux.die.net/man/1/socat"><strong>socat</strong></a>. Alat ini bisa membuat terowongan dua arah (baca: <em>bidirectional</em>) stream <em>byte </em>antara dua titik, baik TCP, UDP, ataupun <strong>tun</strong>.</p><p>Perintah di bawah ini akan membuat antarmuka <strong>tun </strong>yang di belakangnya jalan proses UDP yang mendengarkan di port 9000. Karena <strong>socat</strong> dijalankan di kedua tuanrumah, terowongan akan terbentuk. Paket yang datang ke antarmuka <strong>tun</strong> akan dibungkus UDP dan diteruskan ke antarmuka utama, untuk kemudian dikirimkan ke tujuan tuanrumah.</p><pre>$ socat TUN:$TUNNEL_IP/16,iff-up UDP:$TO_NODE_IP:9000,bind=$NODE_IP:9000 &amp;</pre><pre>$ ip link set dev tun0 mtu 1492</pre><p>Langkah terakhir. Dalam Linux, jika paket keluar melalui suatu antarmuka, dan paket balasan diterima di antarmuka yang beda, paket akan dijatuhkan. Supaya jaringan overlay terhubung dengan semestinya, kita harus membuat filter jalan terbalik (baca: <em>reverse path filtering</em>) jadi non-aktif.</p><pre>$ echo 0 &gt; /proc/sys/net/ipv4/conf/all/rp_filter<br>$ echo 0 &gt; /proc/sys/net/ipv4/conf/enp0s8/rp_filter<br>$ echo 0 &gt; /proc/sys/net/ipv4/conf/br0/rp_filter<br>$ echo 0 &gt; /proc/sys/net/ipv4/conf/tun0/rp_filter</pre><p>Kontainer kita sudah siap dites. Mari kita coba koneksi dari <strong>kon1</strong> ke <strong>kon3</strong>.</p><pre>$ ip netns exec kon1 ping 172.16.1.2</pre><p>Akhirnya, kita berhasil mengimplementasi jaringan overlay di model ini. Cukup sulit dan rumit, tapi dengan bantuan antarmuka <strong>tun</strong>, alat <strong>socat</strong>, dan sedikit penyetelan filter (baca: <em>filter tuning</em>), kita bisa menghubungkan kontainer antar tuanrumah dengan overlay.</p><h3>Kesimpulan</h3><p>Cara kerja jaringan kontainer awalnya cukup rumit, tetapi bisa ditelusuri dan dipelajari. Kunci pengertian jaringannya ada pada aturan-aturan rute. Sedangkan, kunci pengertian jaringan overlay ada pada antarmuka <strong>tun/tap</strong>. Masih ada banyak model jaringan kontainer yang belum sempat dibahas melalui artikel ini. Namun, semua model biasanya membuat setiap kontainer yang tersebar di banyak tuanrumah terhubung dengan alamat IP yang unik.</p><h3>Referensi</h3><ul><li><a href="https://jvns.ca/blog/2016/12/22/container-networking">Julia Evans, Container Networking Overview</a></li><li><a href="https://schd.ws/hosted_files/kccna18/c1/slides.pdf">Kristen Jacobs, Container Networking from Scratch</a></li><li><a href="https://github.com/containernetworking/cni">Container Network Interface</a></li><li>Tool: <a href="https://linux.die.net/man/8/ip">IP</a></li><li>Tool: <a href="https://linux.die.net/man/1/socat">Socat</a></li></ul><p><strong><em>P.S. Jika teman-teman menyukai artikel semacam ini, silakan</em></strong><a href="https://buttondown.email/pujanggateknologi"><strong><em> subscribe ke newsletter</em></strong></a><strong><em> kita dan dapatkan notifikasi artikel terbaru langsung di inbox kamu!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae46208cde30" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pujanggateknologi/kabel-terhubung-di-jaringan-kontainer-ae46208cde30">Kabel Terhubung di Jaringan Kontainer</a> was originally published in <a href="https://medium.com/pujanggateknologi">Pujangga Teknologi</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Putting GO-JEK Tech in an International Map]]></title>
            <link>https://medium.com/life-at-go-jek/kubecon-cloudnativecon-2018-shanghai-recap-cfaa78d0172a?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfaa78d0172a</guid>
            <category><![CDATA[kubecon]]></category>
            <category><![CDATA[events]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Tue, 04 Dec 2018 03:30:16 GMT</pubDate>
            <atom:updated>2018-12-04T03:34:05.869Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>KubeCon + CloudNativeCon 2018 @Shanghai Recap</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aifMzGmWMcpEiiBI7iQ-yQ.jpeg" /><figcaption>GO-JEK Cloud Foundation team in KubeCon + CloudNativeCon China 2018</figcaption></figure><p>Last month, the GO-JEK Cloud Foundation team (Giri Kuncoro, Iqbal Farabi and Vijay Dhama) flew to Shanghai — China, to speak at the largest Kubernetes and Cloud Native conference in the world. Called KubeCon + CloudNativeCon 2018. It is the first Kubernetes and Cloud Native conference ever to be held in Asia.</p><p>2500 attendees filled the Shanghai Convention and Exhibition Shanghai to hear the latest news on <a href="https://www.cncf.io/">Cloud Native Computing Foundation</a> (CNCF), <a href="https://en.wikipedia.org/wiki/Kubernetes">Kubernetes</a>, and associated projects. We had some awesome learnings, made new friends in the community as well as an unforgettable experience speaking in front of 100+ audience. Such a roller-coaster adventure!</p><p>Through this article, we would like to share what we have learned from several interesting sessions that we attended as well as our amazing experience being the speakers in such a big international tech event. For the full detail of the event, go over to their <a href="https://www.youtube.com/playlist?list=PLj6h78yzYM2OK087kzLgc4jTPVbZjuNfs"><strong>YouTube Channel</strong></a><strong> </strong>and start scrolling to gain myriad of new knowledge!</p><p><strong>Our First KubeCon Impression</strong></p><p>As we all know, China has blocked Google, Facebook, Twitter, etc, and with this in mind, we thought, how is it possible to live without Google and all those sites for a week. Turned out the event was very memorable that we survived a week not accessing all those sites.</p><p>All sessions that we attended were very technical yet super amazing because everything was well-prepared by the speakers and the organizers. A “hallway track” concept was applied in the conference. This unique concept encourages us to learn something new by talking to other people.</p><p>In this “hallway track,” we even had the chance to talk to <a href="https://www.youtube.com/watch?v=VfZ8y-4V6Yc&amp;index=75&amp;t=1s&amp;list=PLj6h78yzYM2OfjgVxnn5gEm3D7w_9YYiG"><strong>Brendan Burns</strong></a>, the Kubernetes co-founder! We were so excited, a mandatory wefie is definitely on the agenda!</p><p>There were tons of sessions conducted at the same time, we learned that it’s important to pick a session that allowed us to discuss the materials with the speakers after the talk was finished. Since we knew that all the sessions are going to be on YouTube anyway, we focused on sessions that can create a direct impact on our GO-JEK Kubernetes and Datacenter cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VK78zDJSymNopDSEqS0zuA.png" /><figcaption>Our selfies with Brendan Burns, the Kubernetes co-founder</figcaption></figure><p><strong>The Cool Keynotes</strong></p><p>Dan Kohn, the CNFC director said in his keynote that he picked China for Kubecon this year (and also next year) because the country is the third largest contributor in the cloud native open source community, despite being unable to access various resources hosted on Google.</p><p>During the keynote, CNCF also gives a recognition in form of an award to <a href="https://www.youtube.com/watch?v=f2U5wu0LBrg&amp;t=0s&amp;list=PLj6h78yzYM2OfjgVxnn5gEm3D7w_9YYiG&amp;index=80">Harbor</a>, the first incubating project from VMware and China which is a trusted cloud native registry project that extends Docker distribution with security and identity management.</p><p>That was definitely a cool keynote, however, the coolest one was Vicki Cheung’s from Lyft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87McfnoRJhNxLP8w3OQH5Q.jpeg" /><figcaption>Vicky Cheung from Lyft during her keynote speech</figcaption></figure><p>She provided a very insightful experience on Lyft’s journey to adopt Kubernetes as a platform of choice for Lyft and how they are migrating production traffic. Lyft has been running 40,000+ EC2 instances, migrating all of them is a big challenge.</p><p>The Lyft infrastructure team produces toolings that help deployment to Kubernetes easier, but in order to take advantage of community and avoid too much abstraction, developers are also given access to the cluster through kubectl.</p><p>The rest of the keynotes were also great, including future of serverless (nodeless Kubernetes) by Brendan Burns, the Kubernetes co-founder that we took a selfie with earlier!</p><p><strong>The Anticipated GO-JEK Talks</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*535_m0lUoaSIAOtRAYpNUQ.jpeg" /><figcaption>GO-JEK Cloud Foundation team (Giri &amp; Vijay) presented a talk about Benchmarking Various CNI Plugin</figcaption></figure><p>Giving two talks at Kubecon was our main purpose to visit Shanghai. As the GO-JEK Cloud Foundation team, we delivered two talks about <a href="https://kccncchina2018english.sched.com/event/FuKF/comprehensive-performance-benchmark-on-various-well-known-cni-plugins-giri-kuncoro-vijay-dhama-go-jek"><strong>Benchmarking Various CNI Plugins</strong></a><strong> and </strong><a href="https://kccncchina2018english.sched.com/event/FuJX/kubernetes-on-supporting-1-million-bike-taxi-drivers-in-indonesia-giri-kuncoro-iqbal-farabi-go-jek"><strong>GO-JEK Kubernetes Journey</strong></a><strong>.</strong></p><p>To be chosen as one of the speakers during the conference we need to submit a proposal that went through a competitive screening.</p><p>To give you a glimpse of our talk, we had a total of 15 people who approached us to offer collaboration after we delivered our materials. It was very exciting! We have written a separate article to summarize the content of our talks/experience for you to read.</p><p>The part that we still couldn’t believe is that we were featured on the main event page, along with 17 other speakers.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLj6h78yzYM2OK087kzLgc4jTPVbZjuNfs&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6DvLOXsHwd4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6DvLOXsHwd4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b68fb1fe72004167194f460e8df8724/href">https://medium.com/media/7b68fb1fe72004167194f460e8df8724/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLj6h78yzYM2OK087kzLgc4jTPVbZjuNfs&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7mIM-6gQ3fo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7mIM-6gQ3fo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd6a72e10d6e9bf0e658fba5531c8597/href">https://medium.com/media/fd6a72e10d6e9bf0e658fba5531c8597/href</a></iframe><p><strong>Cluster Lifecycle SIG</strong></p><p>We are very interested to contribute here, as we have been using the tools from SIG, such as kubeadm, kops, kubespray.</p><p>We are also adopting Cluster API which will be on alpha end of this month for our Kubernetes service. The group is initiating another interesting tool called etcdadm which will help bootstrapping ETCD cluster easily in both internal or external environment.</p><p><strong>Kubebuilder SDK to Extend Kubernetes</strong></p><p>This session was given by our old friends from VMware and Google, which is on <a href="https://github.com/kubernetes-sigs/kubebuilder">Kubebuilder</a>. The framework could really simplify building up Kubernetes APIs using custom resource definitions (CRD), as opposed to writing a lot of boilerplate and creating CRD from scratch.</p><p><strong>Securely Manage Kubernetes Secrets with Secrets</strong></p><p>The session was delivered by Google security engineer. According to him, storing secret in Kubernetes with plain text and default base64 encoding is definitely bad. The attacker could extract the secret stored in ETCD offline very easily.</p><p>It is highly recommended to back Kubernetes secret using KMS plugin i.e. Vault, which will implement enveloped keys. This is an experimental feature in v1.12.</p><p><strong>Configuring Kubernetes Cluster on Next Level</strong></p><p>This session was presented by a 19 year old Finnish, <a href="https://www.youtube.com/watch?v=klHBzISZkCw&amp;list=PLj6h78yzYM2OfjgVxnn5gEm3D7w_9YYiG&amp;index=56&amp;t=0s"><strong>Lucas Käldström</strong></a>, who is also the lead of SIG cluster lifecycle. The talk was very inspiring!</p><p>There is work in progress of taking out major Kubernetes components (i.e. kubelet, apiserver, controller, etc.) from the main monorepo and generalize the config flags, since adding/removing flags for new release becoming a hassle. The effort is initiated by implementing ComponentConfig.</p><p>During the presentation, he also talked about a proposal for etcdadm and the upcoming KEP for it.</p><p><strong>Model and Operate Datacenter by Kubernetes at eBay</strong></p><p>This was one of the most interesting talks in Kubecon. The speakers gave a brief overview of how Kubernetes cluster is used to manage data centers at eBay.</p><p>They have utilized Kubernetes custom resources to define the network, AZ’s, racks etc. Using a single Kubernetes cluster to manage all the resources in data center including other Kubernetes clusters is a novel way to do capacity planning, debug issues and view data center as a whole.</p><p><strong>Monitoring at eBay</strong></p><p>This is one of the good case studies that monitors 30+ Kubernetes clusters at eBay, with federated prometheus and central eBay Kubernetes to manage all Kubernetes clusters. They also started adopting automation when an issue arises with AIOps, i.e. anomaly detection and auto-remediation.</p><p><strong>Safely Upgrading Kubernetes Clusters</strong></p><p>Upgrading cluster has always been a challenge in Kubernetes. To safely upgrade, we need to upgrade minor version one by one.</p><p>For example, to upgrade from 1.9 to 1.12, we need to upgrade from 1.9 to 1.10, 1.10 to 1.11, and finally 1.11 to 1.12.</p><p>There was a new proposal to add support to safely downgrade as safety net when an upgrade fails. Another important thing to note is that there is no easy way at the moment to upgrade ETCD cluster, we have to ready for worst case by taking backup manually.</p><p><strong>Containerd &amp; CoreDNS DeepDive</strong></p><p>The Containerd <a href="https://www.youtube.com/watch?v=xJouQtsq32c&amp;index=17&amp;t=0s&amp;list=PLj6h78yzYM2OfjgVxnn5gEm3D7w_9YYiG">session</a> talked about its inner working. Delivered by the main contributor of Containerd, the speaker described the architecture, service interface and the plugin model. He also provided a deeper look at how this industry-standard container runtime handles OCI image metadata and content links as well as a closer look on Snapshotter design for plugins.</p><p>The other session was about CoreDNS and it was given by the maintainer. He explained that the plugin-based architecture adoption is there to make it easier for the community whenever they want to extend CoreDNS beyond its features.</p><p>We learned a lot of cool features of CoreDNS such as IP based service discovery (i.e. give DNS forwarder A for IP X, DNS forwarder B for IP Y). We also learned about creating a custom coreDNS plugin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*LkOKTZbG9ProMABLqgnYqg.jpeg" /><figcaption>We (Giri &amp; Iqbal) share the same vision to be Indonesian Kubernetes Ambassador in the future</figcaption></figure><p><strong>Mission: Be the Indonesian Kubernetes Ambassador</strong></p><p>The reason why we attended this event was because we want to introduce Kubernetes to a wider community in Indonesia. We want to do this because we realize that Kubernetes needs more contributors on documentation and test infrastructure, that’s why we want to encourage Indonesians to use it more.</p><p>After the event, we learned that there is a possibility for CNCF to sponsor Kubernetes meetup in Jakarta. It is also possible for us to be the Kubernetes ambassador with a mission to promote cloud native adoption in Indonesia.</p><p><strong>The Next Step</strong></p><p>During the event, we gained lots of knowledge and we would like to share it with you! That’s why we came up with these initiatives:</p><ul><li>We will start Jakarta Kubernetes Monthly Meetup. Indonesia has already 380+ members in Kubernetes local community, but not very active yet. Once we get more active, we will apply for ambassador role and CNCF sponsorship.</li><li>We will write a comprehensive academic/research paper for CNI Benchmark experiments and analysis, conduct peer review and submit to popular journals, i.e. ACM sigcomm.</li></ul><p>We will definitely submit a proposal again for the next KubeCon in Barcelona, Shanghai, or San Diego. It’s been a fun and great learning experience for us, we hope to see you there!</p><p>Cheers,</p><p>Giri, Iqbal, and Vijay<br>The CloudFoundation Team</p><h3>Interested to share your knowledge on an international stage just like GO-JEK’s Cloud Foundation team? We always need the best engineer out there to be a part of our family. Visit GO-JEK <a href="http://bit.ly/2FXVEYy">Career Page</a> to join us!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfaa78d0172a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/life-at-go-jek/kubecon-cloudnativecon-2018-shanghai-recap-cfaa78d0172a">Putting GO-JEK Tech in an International Map</a> was originally published in <a href="https://medium.com/life-at-go-jek">Life at Gojek</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containers, Shells, and Mounts, from Scratch]]></title>
            <link>https://medium.com/gojekengineering/containers-shells-and-mounts-from-scratch-18a2cc6cdd82?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/18a2cc6cdd82</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[nsenter]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Thu, 16 Aug 2018 05:22:51 GMT</pubDate>
            <atom:updated>2018-08-16T05:27:02.540Z</atom:updated>
            <content:encoded><![CDATA[<p>The second in a series of posts on running Containers we built without Docker, LXC, or rkt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0ijvIcyoEJ-FPcMOd1qCg.jpeg" /><figcaption><a href="http://bit.ly/2MO4CX3">gojek.jobs</a></figcaption></figure><p>To start off with context, learn <a href="https://blog.gojekengineering.com/building-containers-from-scratch-c2368a8c8701">Part 1 of the series</a> on how we build a Container filesystem from scratch with <strong>dnf</strong>, changing root directory with <strong>chroot</strong>, and isolating process tree inside the Container with <strong>namespaces</strong>.</p><p>This writeup will reuse <strong>rootfs</strong> directory and do some magic inside it. So, before moving forward, let’s get a Linux machine and <a href="https://blog.gojekengineering.com/building-containers-from-scratch-c2368a8c8701">the <strong>rootfs </strong>ready</a>, or if you are lazy, you can grab the tarball <a href="https://github.com/girikuncoro/container-demo/releases/download/v0.1/rootfs.tar.gz">here</a>.</p><h3>Entering Namespaces</h3><p>Remember that we can get inside a running Docker container with docker exec ?</p><pre>$ docker run -t -d --name foo ubuntu:16.04<br>$ docker exec -it foo /bin/bash<br>root@19a1e96bb6c7:/#</pre><p>We are going to discover how to do the same. First, let’s run chroot shell process with unshared PID namespace.</p><pre>$ sudo unshare --pid --fork --mount-proc=$PWD/rootfs/proc chroot rootfs /bin/bash</pre><p>Now that we have our Container running, and from the host, how do we get inside a Container? People often tell: “Just run a SSH server inside your container!”. This is a misconception since we don’t need to to run SSH daemon to allow accessing a Container. Well, unless your container is an SSH server, which is unlikely.</p><p>So, how do we really enter a running Container, then? The short answer is, we run a shell into existing namespace with a tool called <strong>nsenter</strong>.</p><p><a href="https://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/"><strong>nsenter</strong></a> allows us to run a program with namespaces of other processes, or <strong>enter</strong> into <strong>n</strong>ame<strong>s</strong>paces. This small tool will help us running another shell process inside an existing PID namespace we already have.</p><p>Now, next question is, how do we find namespaces that our existing chroot shell is running on? The answer can be found under /proc/$PID/ns, in which Kernel exposes namespaces info of a process.</p><p>Let’s find what PID is our chroot shell running as. Open a new terminal and execute psfrom it.</p><pre>(From host, outside chroot)<br>$ ps ax | grep /bin/bash<br>...<br>4436 pts/0    S+     0:00 /bin/bash</pre><p>We can now find the namespaces info of PID 4436 under /proc . From here, we could grab the PID namespace for our chroot shell located under /proc/4436/ns/pid .</p><pre>$ sudo ls -l /proc/4436/ns<br>total 0<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 cgroup -&gt; cgroup:[4026531835]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 ipc -&gt; ipc:[4026531839]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 mnt -&gt; mnt:[4026532151]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 net -&gt; net:[4026531993]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 pid -&gt; pid:[4026532152]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 pid_for_children -&gt; pid:[4026532152]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 user -&gt; user:[4026531837]<br>lrwxrwxrwx. 1 root root 0 Jul 14 23:13 uts -&gt; uts:[4026531838]</pre><p>Now, let’s run a new shell process inside the first chroot shell PID namespace with <strong>nsenter</strong>. We simply do this by passing /proc/4436/ns/pid argument to tell <strong>nsenter</strong> that we want to run process in this PID namespace.</p><pre>$ sudo nsenter --pid=/proc/4436/ns/pid \<br>  unshare --fork --mount-proc=$PWD/rootfs/proc \<br>  chroot $PWD/rootfs /bin/bash<br># ps ax<br>  PID TTY      STAT   TIME COMMAND<br>    1 ?        S+     0:00 /bin/bash<br>    6 ?        S      0:00 /bin/bash<br>    7 ?        R+     0:00 ps ax</pre><p>Since we are running the new shell inside existing PID namespace, our container now has 2 shell processes (PID 1 for first shell, PID 6 for second shell). We have now successfully “entered existing container”. Try to run a top process here.</p><pre>(From second chroot shell)<br># top</pre><p>This top process could obviously be seen from the first shell as well.</p><pre>(From first chroot shell)<br># ps aux | grep top<br>root         6  0.0  0.4  21960  2388 ?        S+   13:56   0:00 top</pre><p>Since both shell processes are in the same PID namespace, first shell can kill top process running in second shell.</p><pre>(From first chroot shell)<br># kill 6</pre><h3>Volume Mounts</h3><p>Ever thought how Docker injects files into running a Container? We usually do this by mapping host path and Container path via -v flag with docker command.</p><pre>$ docker run -t -d --name=foo -v $PWD/gojek:/tmp ubuntu:16.04<br>$ docker exec foo ls /tmp<br>hi</pre><p>We could demonstrate the same thing into our Container through a Linux feature called <strong>bind mount</strong>.</p><p><a href="http://man7.org/linux/man-pages/man8/mount.8.html"><strong>bind mount</strong></a><strong> </strong>is essentially an alternate view of a directory tree. Traditionally, mounting provides a view of a storage device under directory tree. What bind mount does instead, it takes the existing directory tree and replicates it under a different view point. The files under bind mount are the same as the original, so modified files should be reflected immediately as both points share the same view.</p><p>Now, let’s try this out. Prepare a dummy directory and file that we want to inject into our chroot directory. We will expose this file as read-only into chroot shell using bind mount.</p><pre>$ mkdir gojek &amp;&amp; echo &quot;Hello from GO-JEK&quot; &gt; gojek/hi</pre><p>Next is to create target directory inside our rootfs and bind mount our dummy directory.</p><pre>(From chroot)<br># mkdir /var/gojek</pre><pre>(From host, outside chroot)<br>$ sudo mount --bind -o ro $PWD/gojek $PWD/rootfs/var/gojek</pre><p>Our Container can now see the dummy directory and file inside.</p><pre>(From chroot)<br># ls /var/gojek<br>hi<br># cat /var/gojek/hi<br>Hello from GO-JEK</pre><p>Since we did bind mount with -o ro (read-only), the shell process inside chroot cannot modify the file.</p><pre>(From chroot)<br># echo &quot;GO-PAY is awesome&quot; &gt; /var/gojek/hi<br>bash: /var/gojek/hi: Read-only file system</pre><p>We have successfully tried mounting out file or directory on host into our Container. Well, if you are a Docker expert, you would know that in docker command, what we did is actually doing --mount instead of -v flag, which is a bit <a href="https://docs.docker.com/storage/bind-mounts/">different</a>. Bind mounts rely on specific directory structure in host machine (gojek directory being available on host in our case). In other hand, Volume is completely managed by Docker, where new directory is created within Docker storage directory and Docker manages its contents. However, this is Docker specific and for the purpose of our container experimentation, bind mount is sufficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/0*YdPMfDb8e3Ldz4Fw.png" /><figcaption>Bind mounts rely on host having specific directory structure, unlike Volume which is fully managed.</figcaption></figure><h3>What’s Next?</h3><p>From this post and the <a href="https://blog.gojekengineering.com/building-containers-from-scratch-c2368a8c8701">previous </a>one, we have learned how to use various Linux Kernel features to build, run, and access our Container. We will continue the next series of posts with cgroup, network namespace deepdive, and Container security topics to further enhance our DIY container capabilities, so stay tuned!</p><p>Oh, and we are hiring! Our team is dealing with Golang, containers, Kubernetes, cloud native toolings, and CNCF open source contribution. If Container focused infrastructure excites you and you would like to be part of a GO-JEK Cloud Native future, please reach out to us on <a href="http://bit.ly/2MO4CX3">gojek.jobs</a> .</p><h3>References</h3><ul><li><a href="https://blog.docker.com/tag/nsenter/">Why you don’t need to run SSHd in your Docker Container, Jerome Petazzoni</a></li><li><a href="https://www.funtoo.org/Funtoo_Filesystem_Guide,_Part_3">Tmpfs and Bind Mounts, Daniel Robbin</a></li><li><a href="https://ericchiang.github.io/post/containers-from-scratch/">Containers from Scratch, Eric Chiang</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*l53Qb_OeQpMomqv_5dHPlw.png" /><figcaption><a href="http://bit.ly/2MO4CX3">gojek.jobs</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18a2cc6cdd82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gojekengineering/containers-shells-and-mounts-from-scratch-18a2cc6cdd82">Containers, Shells, and Mounts, from Scratch</a> was originally published in <a href="https://medium.com/gojekengineering">Gojek Product + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Containers from Scratch]]></title>
            <link>https://medium.com/gojekengineering/building-containers-from-scratch-c2368a8c8701?source=rss-8e0ac11539aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2368a8c8701</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Giri Kuncoro]]></dc:creator>
            <pubDate>Mon, 30 Jul 2018 04:59:54 GMT</pubDate>
            <atom:updated>2018-07-30T05:03:07.571Z</atom:updated>
            <content:encoded><![CDATA[<p>The first in a series of posts on how our infrastructure team builds containers without Docker, LXC, and rkt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjZ7Z8bUNqxmv6o6okVxkw.jpeg" /><figcaption><a href="http://bit.ly/2M0lbif">gojek.jobs</a></figcaption></figure><p>At the heart of GO-JEK’s infrastructure is the Cloud Computing and Container platform, which serves as a distributed systems’ foundation for application deployment. Our infrastructure serves 500+ microservices, supports 350 million internal API requests per second, and processes an average 35+ customer orders every second.</p><p>Containers have been adding value to our developers by improving the ability to isolate from other applications, create predictable environments, and to run applications virtually anywhere in our public cloud and on-premise data centres.</p><p><strong>TL;DR:</strong> This is the first in a series of blog posts from talks we have given at several meetups, including <a href="https://www.meetup.com/Docker-Indonesia/events/251972637/">Docker Jakarta</a>. We will cover how we experiment on building containers from scratch, without Docker, LXC, rkt, and any other container runtimes.</p><p>As a disclaimer, we are running Docker and LXC containers on production. But as part of our team on-boarding, every engineer in our infrastructure team has to go through the experience of building containers from scratch. This is to make sure everyone understands container internals and gets good sense of debugging when issue arises in our container infrastructure.</p><p>Containers are fundamentally an isolated process (or group of processes) running on a single machine. Linux Kernel has various built-in features to enable this isolation: chroot, namespaces, cgroup, and other things.</p><h3><strong>Container Filesystem</strong></h3><p>Let’s look at the first line of a typical Docker file:</p><pre>FROM ubuntu:16.04<br>...</pre><p>This line is essentially telling the Docker engine to download ubuntu version 16.04base container image from the container registry. The image is just a tarball (tape archive file, <a href="https://en.wikipedia.org/wiki/Tar_(computing)">TAR</a>), which contains something that looks like a Linux file system.</p><pre>$ docker run -it ubuntu:16.04 ls<br>bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</pre><p>The mechanism behind building this tarball itself is a huge topic which will not be covered here, but there are several tools that can help us: <a href="https://github.com/projectatomic/buildah">buildah</a>, <a href="https://buildroot.org/">buildroot</a>, <a href="https://wiki.debian.org/Debootstrap">debootstrap</a>, <a href="https://web.archive.org/web/20150514123601/http://prefetch.net/articles/yumchrootlinux.html">YUM</a> / <a href="https://web.archive.org/web/20141203222350/http://zaufi.github.io/administration/2014/06/10/howto-make-a-centos-chroot/">DNF</a>. We are going to pick DNF, which helps to build a Debian system into a subdirectory on a Linux host.</p><p>Let’s grab a Debian machine and execute DNF to build our container filesystem. The DNF command we execute below is telling the system to build minimal Debian system into rootfs subdirectory, with additional packages installation, i.e. python3, iproute, iputils, and others.</p><pre>$ mkdir rootfs<br>$ sudo dnf -y \<br>  --installroot=$PWD/rootfs \<br>  --releasever=24 install \<br>  @development-tools \<br>  procps-ng \<br>  python3 \<br>  which \<br>  iproute \<br>  iputils \<br>  net-tools<br>$ ls rootfs<br>bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</pre><p>The resulting container filesystem (stuffs inside rootfs) looks truly like a Linux filesystem. It has everything that Linux has, i.e. /var in which system writes data to, /bin which contains executable binaries, /libthat contains shared libraries. However, notice that rootfs doesn’t have init system and Kernel, which explains why containers are sharing Kernel / OS, unlike <a href="https://www.docker.com/what-container#/package_software">Virtual Machines</a>.</p><h3>chroot</h3><p><a href="http://man7.org/linux/man-pages/man2/chroot.2.html">chroot</a> is an operation that allows a system to change the root directory for current processes and its children. It essentially restricts the view of a filesystem for process. Let’s try to execute a shell inside the rootfs directory we have built.</p><pre>$ sudo chroot rootfs /bin/bash<br># ls /<br>bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</pre><p>Note that from inside this shell, we can see all the files at root directory, but these are actually the files contained inside rootfs directory on host. Once we are inside the shell, we can do whatever shell can do, run commands, etc...</p><pre># which python3<br>/bin/python3<br># python3 -c &#39;print(&quot;Hello from GO-JEK!&quot;)&#39;<br>Hello from GO-JEK!</pre><p>The shell shows python3 interpreter what we are executing is located in /bin/python3. This is actually rootfs/bin/python3, not the Python interpreter on our host. The container Python interpreter depends on the shared libraries located in rootfs/lib and other stuffs baked into our rootfs container filesystem.</p><h3>Namespaces</h3><p>Now, let’s try to do something interesting. On the other terminal, execute top from the host.</p><pre>(From host, outside chroot)<br>$ top</pre><p>From inside our container, we can still see thetop process running on host.</p><pre>(From chroot)<br># mount -t proc proc /proc<br># ps aux | grep top<br>1000      4421  0.0  0.7  52036  3968 ?        S+   22:13   0:00 top</pre><p>This means our container is able to see all the processes running on host. And since we ran chroot shell with sudo, the container can kill the top process.</p><pre># kill 4421</pre><p>This is where we talk about <a href="https://en.wikipedia.org/wiki/Linux_namespaces">namespaces</a>. Namespaces are feature of Linux kernel which restrict processes to view different resources than what other processes view, i.e. network interfaces, mounts, and process trees. For example, set of processes A and B see different network interfaces.</p><p>To create namespaces, we use <a href="http://man7.org/linux/man-pages/man2/unshare.2.html">unshare</a>. Unshare allows a system to selectively “unshare” resources being shared at the time. Let’s try to isolate the process tree of our container by creating new PID namespace, and rerun the chroot shell inside this. We merely need to pass --pid flag to unshare.</p><pre>$ sudo unshare --pid --fork --mount-proc=$PWD/rootfs/proc chroot rootfs /bin/bash<br># ps ax<br>  PID TTY      STAT   TIME COMMAND<br>    1 ?        S      0:00 /bin/bash<br>    4 ?        R+     0:00 ps ax</pre><p>In a Linux system, PID 1 is usually the init/systemd process, but interestingly PID 1 is assigned to our shell process instead. There are <a href="https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/">deeper discussions</a> on what should PID 1 be in a container due to its special roles (reaping orphan child processes, etc.), but not covered in this writeup.</p><p>Another interesting thing to bring up — we are only isolating a process tree of our shell process, while other resources (network, mount, etc.) are still shared. Namespaces are composable, in the sense, we can choose just to unshare particular namespace, but share the others. The most popular example for this case is a <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/">Kubernetes pod</a>, in which containers inside a pod have a separate process tree and chroot file system, but sharing network and mount namespace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHiNln26XkRsRKKwfZunDA.png" /><figcaption>Containers inside a Kubernetes pod have different processes/chroot, but share network interfaces and mount</figcaption></figure><h3>What’s Next?</h3><p>Containers are basically a combination of various Linux Kernel features. Lots of topics are not covered in this writeup: how to enter existing namespace, create cgroup, container security, user namespace, copy-on-write filesystems, network namespace, inject volume mounts etc… We will continue this in the next series of blog posts, so stay tuned!</p><p>Oh, and we are hiring! Our team is dealing with Golang, containers, Kubernetes, cloud native toolings, and CNCF open source contribution. If container focused infrastructure excites you and you would like to be part of a GO-JEK Cloud Native future, please reach out on <a href="http://gojek.jobs/">gojek.jobs</a> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*l53Qb_OeQpMomqv_5dHPlw.png" /><figcaption><a href="http://bit.ly/2M0lbif">gojek.jobs</a></figcaption></figure><h3><strong>References</strong></h3><ul><li><a href="https://github.com/p8952/bocker">Docker implemented in 100 lines of Bash, Peter Wilmott</a></li><li><a href="https://ericchiang.github.io/post/containers-from-scratch/">Containers from Scratch, Eric Chiang</a></li><li><a href="https://lwn.net/Articles/531114/">Namespaces in operation, Michael Kerrisk</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2368a8c8701" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gojekengineering/building-containers-from-scratch-c2368a8c8701">Building Containers from Scratch</a> was originally published in <a href="https://medium.com/gojekengineering">Gojek Product + Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>