<?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 Phisinee Sagulvanitchaporn on Medium]]></title>
        <description><![CDATA[Stories by Phisinee Sagulvanitchaporn on Medium]]></description>
        <link>https://medium.com/@phisinees?source=rss-a8f7da446833------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2-ORwbThanIq5fzODb11hA.jpeg</url>
            <title>Stories by Phisinee Sagulvanitchaporn on Medium</title>
            <link>https://medium.com/@phisinees?source=rss-a8f7da446833------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 12:06:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@phisinees/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[Your Postcode Should Not Determine Whether You Live or Die]]></title>
            <link>https://phisinees.medium.com/your-postcode-should-not-determine-whether-you-live-or-die-43308436c808?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/43308436c808</guid>
            <category><![CDATA[health-equity]]></category>
            <category><![CDATA[public-policy]]></category>
            <category><![CDATA[new-zealand]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[healthcare]]></category>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Sun, 17 May 2026 02:21:05 GMT</pubDate>
            <atom:updated>2026-06-01T23:18:28.716Z</atom:updated>
            <content:encoded><![CDATA[<h4>New Zealand knows healthcare inequity exists. The question is whether our leaders have the courage to fix it.</h4><h4>by <a href="https://medium.com/@phisinees">Phisinee Sagulvanitchaporn</a></h4><p>18 May 2026</p><p><strong>Figure 1<br></strong><em>Bridging health and community in New Zealand</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*btedj1LP9qHZ869f9frmCQ.png" /><figcaption><em>Note.</em> Image generated using ChatGPT (GPT Image, OpenAI, 2026). Prompt used: “generate the images for blog that related with inequity Healthcare in New Zealand.” <a href="https://chatgpt.com/">https://chatgpt.com</a></figcaption></figure><p>In New Zealand, where you live can decide whether you are alive.</p><blockquote>My close friend spent eight hours in an Auckland emergency department for an injury that should have taken one. Halfway through, he almost gave up and went home. “What’s the point?” he said.</blockquote><p>His experience is not bad luck. It is the predictable output of a system our leaders have allowed to fail in plain sight.</p><p><a href="https://www.health.govt.nz/monitoring-statistics/system-monitoring/health-targets">The official health target in New Zealand</a> mandates that emergency patients receive treatment within six hours, with a requirement of 95%. By December 2024, <strong>only 72.1% were down from 92.4%</strong> in 2015 (Ministry of Health, 2025c), while <a href="https://www.facebook.com/unionnursegrant.org/posts/national-daily-emergency-department-ed-data-across-several-days-in-august-leaked/1345393904252878/">leaked hospital data reported</a> <a href="https://www.nzherald.co.nz/nz/politics/revealed-leaked-data-show-major-hospitals-failing-emergency-department-wait-time-targets/IO4PRQPI5RDKHHUFM67NPGRNQE/">by the NZ Herald</a> showed <strong>Auckland City Hospital</strong> processing as few as <strong>34.4%</strong> of emergency patients against a target.</p><p><strong>Figure 1<br></strong><em>ED Performance Percentage</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plqsRcLoTWfEQXoT_UWeGQ.png" /><figcaption><em>Note.</em> Image generated using Claude (Claude, 2026a). Prompt used: “generate the images for blog that related with inequity Healthcare in New Zealand for “Responsible Leadership to transform change” following detail visual #1, #2 and #3 (3 images)”. <a href="https://claude.ai/">https://claude.ai/</a></figcaption></figure><p>Primary care is encountering the same thing. <a href="https://www.health.govt.nz/publications/annual-update-of-key-results-202425-new-zealand-health-survey">The 2024/25 New Zealand Health Survey</a> found one in four adults avoided a GP visit because the wait was too long. For one in three New Zealanders, seeing a GP now means waiting more than two weeks, as reported by <a href="https://www.scoop.co.nz/stories/GE2504/S00011/one-third-of-new-zealanders-waiting-more-than-two-weeks-to-see-gp-poll.htm">Scoop News’s 2025 poll</a>.</p><p>These delays are not minor inconveniences. The health survey also found <strong>25.1% of Pacific adults and 18.7% of Māori adults skipped a GP</strong> visit because of cost versus 14.5% of European and other adults. Imagine that wait if you cannot afford a day off, live two hours from a hospital, or cannot explain symptoms in English. For Māori, Pacific, rural, or low-income communities, this is not an exception. It is how the system works.</p><p><strong>Figure 3<br></strong><em>Skip GP Percentage per ethics</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QGENH7DjKAhTwo1jtLZd8Q.png" /><figcaption><em>Note.</em> Image generated using Claude (Claude, 2026b). Prompt used: “generate the images for blog that related with inequity Healthcare in New Zealand for “Responsible Leadership to transform change” following detail visual #1, #2 and #3 (3 images)”. <a href="https://claude.ai/">https://claude.ai/</a></figcaption></figure><blockquote><strong>“Postcode”</strong> in New Zealand healthcare is shorthand for the layered inequities — geographic, socioeconomic, and ethnic. This should decide who gets seen, when, and how well ?</blockquote><p>Is this problem for New Zealand’s policymakers, business leaders, healthcare executives, and the citizens who hold them accountable. If healthcare equity sits on your desk, your ballot, or your conscience, read on …</p><h4>The Numbers Tell a Story We Stopped Listening To</h4><p>New Zealand’s egalitarian values create a strong foundation, but responsible leadership requires recognising where healthcare access still falls short.</p><p>Since 2019, only 2.8% of people in rural areas can reach a Level 1 hospital (Lilley et al., 2019), and <a href="https://www.nzherald.co.nz/northern-advocate/news/rural-communities-now-struggling-to-access-equitable-healthcare/TOMZUMAZHVXFHSIJXLPYU4CQ4U/">40% of rural GP positions remain unfilled</a>. <a href="https://oag.parliament.nz/2025/planned-care/docs/planned-care.pdf">The Office of the Auditor-General (2025)</a> confirmed Māori, Pacific, rural, and disabled people wait longest for planned care, and <a href="https://www.health.govt.nz/publications/health-and-independence-report-2024-online-version#rural-population">rural amenable mortality</a> from treatable conditions reached 20% higher than urban rates.</p><blockquote><strong>“This is not just funding crisis. It is a leadership crisis”</strong></blockquote><h4>When Efficiency Becomes a Death Sentence</h4><p>A friend who works as a caregiver in a residential facility told me</p><blockquote><strong>“We try our best, but when one person has to look after too many residents at the same time, something always gets missed.”</strong></blockquote><p>She described some residents could not express their needs in English, caregivers could not fully understand, and the quiet fear that the wrong care would be given. She said <em>“residents in different facilities — sometimes only suburbs apart — received visibly different care, depending on how well-funded each facility was and which community it served. Since the removal of pay equity protections, many of her colleagues have left. The ones who remain are exhausted.” </em>This is what happens when leaders treat healthcare as a cost rather than a community.</p><p><a href="https://www.greens.org.nz/scrapping_m_ori_health_authority_tramples_over_te_tiriti_o_waitangi">The 2024 abolition of Te Aka Whai Ora</a> created significantly to address Māori inequities — was scrapped after two years, despite the Waitangi Tribunal finding the Crown had breached its Treaty obligations.</p><blockquote>The message was cleared: equity is politically optional.</blockquote><h4>When Solving the Wrong Problem</h4><p><a href="https://center-for-leadership.org/wp-content/uploads/2017/08/Leadership_in_Permanent_Crisis-copy-2.pdf">Leadership scholar Ronald Heifetz</a> reminds us that adaptive challenges cannot be solved by technical expertise alone.</p><blockquote>“Healthcare inequity is one of adaptive challenges because it requires people, institutions, and power structures to change how they think and act toward inequality.”</blockquote><p>Governments keep applying technical fixes such as budgeting, more restructures, and more task forces while leaving the beliefs untouched, e.g., wealthier urban communities deserve more investment; efficiency matters more than equity; the system’s job is to treat illness but not sustain Māori, Pacific, rural, and low-income communities.</p><p><strong><em>Until leaders challenge those beliefs, the waiting rooms stay full.</em></strong><em> </em><strong><em>Here is the harder truth …</em></strong></p><p>This leadership cannot come from Wellington alone. It must come from Māori-led governance, healthcare workers, and business leaders restored to their full authority and empowered to lead — not left to burn out in silence. It must also come from citizens who refuse to let equity be quietly defunded between elections.</p><h4>The Question Every Leader Avoids</h4><blockquote><strong>The most powerful question in leadership is also the simplest: </strong>“who does this system actually serve?”</blockquote><p><a href="https://greenleaf.org/what-is-servant-leadership/">Greenleaf’s servant leadership</a> helps reframe the answer.</p><blockquote>Leadership should not begin from institutional convenience, but from the lived experience of those most harmed by the system.</blockquote><p>In healthcare, that means starting with people disadvantaged by income, ethnicity, language, or postcode from their needs, not asking them to fit into systems that continue to leave them behind.</p><blockquote>A structural model worth learning from Switzerland<strong> — ranked #1 in </strong><a href="https://freopp.org/switzerland-1-in-the-2024-world-index-of-healthcare-innovation/"><strong>the 2024 World Index of Healthcare Innovation</strong></a><strong> </strong>guarantees every citizen affordable coverage regardless of income or geography, and invests heavily in primary care.</blockquote><p><strong>Its core lesson:</strong> quality and equity improve when coverage, financing, and care delivery are treated as <strong>one system </strong>(Mohajer-Bastami et al., 2025).</p><p><strong>Two priorities would be immediate response</strong></p><ol><li>Restore Māori-led health governance: Not as a parallel system, but as the Treaty-based foundation that any equitable system must rest on.</li><li>Make workforce wellbeing and pay equity non-negotiable: Prevent burned-out, underpaid cannot deliver the care communities deserve.</li></ol><blockquote>New Zealand’s task is to translate that lesson into its own context — <strong>a single equitable system that operates <em>through</em> culturally-led governance, not despite it.</strong> That means accountable Treaty-based governance, sustained primary-care investment, and structural pipelines.</blockquote><h4>Māori Leaders Have Been Answering This For Generations</h4><p>While New Zealand’s biomedical system counts wait times, Māori communities have long carried a deeper understanding of what health actually means.</p><p>Sir Mason Durie’s <a href="https://www.health.govt.nz/maori-health/maori-health-models/te-whare-tapa-wha">Te Whare Tapa Whā</a> describes health as a four-walled meeting house: <strong>Taha Tinana</strong> (physical), <strong>Taha Hinengaro</strong> (mental), <strong>Taha Wairua</strong> (spiritual), and <strong>Taha Whānau</strong> (family and community).</p><blockquote>Weaken one wall, and the house weakens. A health system built on this model does not just treat disease — it asks whether people feel safe, connected, and seen.</blockquote><p><strong>Figure 4<br></strong><em>Te Whare Tapa Wha Diagram</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EK7cUiLpCEYo2JmnqYAzaw.png" /><figcaption><em>Note.</em> Image generated using Claude (Claude, 2026c). Prompt used: “generate the images for blog that related with inequity Healthcare in New Zealand for “Responsible Leadership to transform change” following detail visual #1, #2 and #3 (3 images)”. <a href="https://claude.ai/">https://claude.ai/</a></figcaption></figure><blockquote>But here is the part most health leaders still haven’t grasped.</blockquote><blockquote>This is where Manaakitanga becomes essential</blockquote><p><a href="https://manaakitanga.org.nz/"><strong>Manaakitanga</strong></a> is often translated as hospitality, care, and respect, but its meaning runs deeper.</p><p>It is the responsibility to <strong>uphold the mana</strong>; <em>“the dignity, worth, and wellbeinเ of others”.</em> In leadership, Manaakitanga challenges decision-makers to ask a simple but powerful question as</p><p><em>Who is being left behind, and what are we doing about it?</em></p><p><strong>Manaakitanga in healthcare requires more than equal treatment. It means recognising different circumstances and removing barriers to care.</strong> It rejects a system where a person’s postcode, language, or income determines how quickly they receive treatment, what services they can access, or ultimately, their health outcomes.</p><p><strong>For responsible leaders, </strong>Manaakitanga is a practical leadership principle. It shapes how resources are allocated, whose voices are heard, and whether policies strengthen or weaken equity. Leaders guided by Manaakitanga understand that <strong>dignity is not simply an outcome of healthcare.</strong> <strong>It is a condition that must be protected throughout every patient’s journey.</strong></p><p><em>If inequity persists, the question is not whether communities care enough. The question is whether those with influence are willing to lead in ways that uphold the mana of every person they serve.</em></p><h4>Three Things You Can Do Before Tomorrow</h4><p>Healthcare inequity will not fix itself. Waiting for leaders without pressure is how this happened.</p><ul><li><strong>Engage with the strategies that already exist</strong></li></ul><p><strong>Read both the </strong><a href="https://www.health.govt.nz/strategies-initiatives/health-strategies/rural-health-strategy"><strong><em>Rural Health Strategy</em></strong></a><strong> and the </strong><a href="https://www.health.govt.nz/strategies-initiatives/health-strategies/pae-tu-hauora-maori-strategy"><strong><em>Pae Tū: Hauora Māori Strategy</em></strong></a><em> (ethnicity covering). </em>These documents provide a blueprint for addressing inequities across ethnicity, geography, and income. Share them widely to help build public understanding and support for change.</p><ul><li><strong>Make your voice heard</strong></li></ul><p><strong>Write to your local Member of Parliament</strong> and ask what they are doing to address healthcare inequities in your region. <strong>Ask specifically about disparities by ethnicity, geography, and income. Silence is a choice.</strong></p><ul><li><strong>Make equity personal</strong></li></ul><p><strong>Share this article with someone who thinks healthcare inequity is not their problem.</strong> Talk about real experiences, e.g., waiting too long for treatment, paying too much for care, or going without essential services. <strong>Equity becomes harder to ignore when it has a face.</strong></p><blockquote><strong>Your “postcode” should not determine whether you live or die.</strong> Neither should your ethnicity, your language, your income, or the size of your town. I believe that. I hope you do too. <strong>Now act like it !!!</strong></blockquote><p><strong>References</strong></p><p>Claude. (2026a). <em>ED Performance Percentage</em> [Large language model]. <a href="https://claude.ai/">https://claude.ai</a></p><p>Claude. (2026b). <em>Skip GP Percentage per ethics</em> [Large language model]. <a href="https://claude.ai/">https://claude.ai</a></p><p>Claude. (2026c). <em>Te Whare Tapa Wha Diagram</em> [Large language model]. <a href="https://claude.ai/">https://claude.ai</a></p><p>FREOPP. (2024). <em>Switzerland: #1 in the 2024 World Index of Healthcare Innovation</em>. <a href="https://freopp.org/switzerland-1-in-the-2024-world-index-of-healthcare-innovation/">https://freopp.org/switzerland-1-in-the-2024-world-index-of-healthcare-innovation/</a></p><p>Greenleaf, R. (2025). <em>What is servant leadership? Greenleaf Center for Servant Leadership.</em> <a href="https://greenleaf.org/what-is-servant-leadership/">https://greenleaf.org/what-is-servant-leadership/</a></p><p>Heifetz, R., Grashow, A., &amp; Linsky, M. (2009). <em>Leadership in a (Permanent) Crisis</em>. <a href="https://center-for-leadership.org/wp-content/uploads/2017/08/Leadership_in_Permanent_Crisis-copy-2.pdf">https://center-for-leadership.org/wp-content/uploads/2017/08/Leadership_in_Permanent_Crisis-copy-2.pdf</a></p><p>Hill, R. (2025). One Third Of New Zealanders Waiting More Than Two Weeks To See GP — Poll | Scoop News. <em>Scoop.</em> <a href="https://www.scoop.co.nz/stories/GE2504/S00011/one-third-of-new-zealanders-waiting-more-than-two-weeks-to-see-gp-poll.htm">https://www.scoop.co.nz/stories/GE2504/S00011/one-third-of-new-zealanders-waiting-more-than-two-weeks-to-see-gp-poll.htm</a></p><p>Kelly, D. (2019, July 4). Rural communities now struggling to access equitable healthcare. <em>NZ Herald.</em> <a href="https://www.nzherald.co.nz/northern-advocate/news/rural-communities-now-struggling-to-access-equitable-healthcare/TOMZUMAZHVXFHSIJXLPYU4CQ4U/">https://www.nzherald.co.nz/northern-advocate/news/rural-communities-now-struggling-to-access-equitable-healthcare/TOMZUMAZHVXFHSIJXLPYU4CQ4U/</a></p><p>Lilley, R., De Graaf, B., Kool, B., Davie, G., Reid, P., Dicker, B., Civil, I., Ameratunga, S., &amp; Branas, C. (2019). Geographical and population disparities in timely access to prehospital and advanced level emergency care in New Zealand: a cross-sectional study. <em>BMJ Open,</em> <em>9</em>(7), Article e026026. <a href="https://doi.org/10.1136/bmjopen-2018-026026">https://doi.org/10.1136/bmjopen-2018-026026</a></p><p>Lyndon, H. (2024, February 27). <em>Scrapping Māori Health Authority tramples over Te Tiriti o Waitangi</em>. Greens. <a href="https://www.greens.org.nz/scrapping_m_ori_health_authority_tramples_over_te_tiriti_o_waitangi">https://www.greens.org.nz/scrapping_m_ori_health_authority_tramples_over_te_tiriti_o_waitangi</a></p><p>Manaakitanga. (2023). <em>Manaakitanga — Support Network And Services For Health Care Workers</em>. Manaakitanga. <a href="https://manaakitanga.org.nz/">https://manaakitanga.org.nz/</a></p><p>Ministry of Health. (2023). <em>Te whare tapa whā model of māori health</em>. Ministry of Health. <a href="https://www.health.govt.nz/maori-health/maori-health-models/te-whare-tapa-wha">https://www.health.govt.nz/maori-health/maori-health-models/te-whare-tapa-wha</a></p><p>Ministry of Health. (2024a, August 23). <em>Pae Tū: Hauora Māori Strategy</em>. Ministry of Health NZ. <a href="https://www.health.govt.nz/strategies-initiatives/health-strategies/pae-tu-hauora-maori-strategy">https://www.health.govt.nz/strategies-initiatives/health-strategies/pae-tu-hauora-maori-strategy</a></p><p>Ministry of health. (2024b, August 23). <em>Rural Health Strategy</em>. Ministry of Health NZ. <a href="https://www.health.govt.nz/strategies-initiatives/health-strategies/rural-health-strategy">https://www.health.govt.nz/strategies-initiatives/health-strategies/rural-health-strategy</a></p><p>Ministry of Health. (2025a, November 19). <em>Annual Update of Key Results 2024/25: New Zealand Health Survey | Ministry of Health NZ</em>. Ministry of Health NZ. <a href="https://www.health.govt.nz/publications/annual-update-of-key-results-202425-new-zealand-health-survey">https://www.health.govt.nz/publications/annual-update-of-key-results-202425-new-zealand-health-survey</a></p><p>Ministry of Health. (2025b, September 18). <em>Health and Independence Report 2024 | Ministry of Health NZ</em>. Ministry of Health NZ. <a href="https://www.health.govt.nz/publications/health-and-independence-report-2024-online-version#rural-population">https://www.health.govt.nz/publications/health-and-independence-report-2024-online-version#rural-population</a></p><p>Ministry of Health. (2026, March 4). <em>Health targets | Ministry of Health NZ</em>. Ministry of Health NZ. <a href="https://www.health.govt.nz/monitoring-statistics/system-monitoring/health-targets">https://www.health.govt.nz/monitoring-statistics/system-monitoring/health-targets</a></p><p>Mohajer-Bastami, A., Moin, S., Sweetman, B., Ahmed, A. R., Head, M., Gelber, E., Ahmad, S. J. S., &amp; Exadaktylos, A. K. (2025). A comparison of the United Kingdom’s and Switzerland’s healthcare financing systems for achieving equity and efficiency goals. <em>Swiss Medical Weekly</em>, <em>155</em>(3), 4101. <a href="https://doi.org/10.57187/s.4101">https://doi.org/10.57187/s.4101</a></p><p>Office of the Auditor-General. (2025, June). <em>Providing equitable access to planned care treatment.</em> Office of the Auditor-General. <a href="https://oag.parliament.nz/2025/planned-care/docs/planned-care.pdf">https://oag.parliament.nz/2025/planned-care/docs/planned-care.pdf</a></p><p>OpenAI. (2026). <em>Bridging health and community in New Zealand </em>(April version) [Large language model]. <a href="https://chatgpt.com/g/g-p-6791afe3e2a88191a97f8dbb97665223/c/6a079541-ab58-83ec-afbf-4c7d46efadf8">https://chatgpt.com/g/g-p-6791afe3e2a88191a97f8dbb97665223/c/6a079541-ab58-83ec-afbf-4c7d46efadf8</a></p><p>Pearse, A. (2025, September 1). Revealed: Leaked data show major hospitals failing emergency department wait-time targets. <em>NZ Herald. </em><a href="https://www.nzherald.co.nz/nz/politics/revealed-leaked-data-show-major-hospitals-failing-emergency-department-wait-time-targets/IO4PRQPI5RDKHHUFM67NPGRNQE/">https://www.nzherald.co.nz/nz/politics/revealed-leaked-data-show-major-hospitals-failing-emergency-department-wait-time-targets/IO4PRQPI5RDKHHUFM67NPGRNQE/</a></p><p>Spiller, C., Pio, E., Erakovic, L., &amp; Henare, M. (2011). Wise Up: Creating Organizational Wisdom Through an Ethic of Kaitiakitanga. <em>Journal of Business Ethics</em>, <em>104</em>(2), 223–235. <a href="https://doi.org/10.1007/s10551-011-0905-y">https://doi.org/10.1007/s10551-011-0905-y</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43308436c808" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker และ Containerization 101]]></title>
            <link>https://phisinees.medium.com/docker-%E0%B9%81%E0%B8%A5%E0%B8%B0-containerization-101-38106330f22?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/38106330f22</guid>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Sun, 28 Aug 2022 03:58:10 GMT</pubDate>
            <atom:updated>2022-08-28T03:58:10.365Z</atom:updated>
            <content:encoded><![CDATA[<p>บทความนี้ เป็นส่วนหนึ่งของการเรียนรู้ใน Kakkai Academy 🐣 ซึ่งสอนโดยอาจารย์โจ้ <a href="https://medium.com/u/756a484f8220">Saritrat Jirakulphondchai</a> คนเดิม (เพิ่มเติมเดี๋ยวบอก !!!)</p><p>วันนี้ อาจารย์โจ้ ได้พาพวกเราชาว ​Kakkai ไปรู้จักกับ Container แล้วมันเกี่ยวข้องอะไรกับ Docker กันนะ เราไปดูกันเล้ยยย ~</p><p>ปกติแล้ว Developer มีหน้าที่ในการพัฒนา source code หรือชุดคำสั่งนึง เพื่อให้สามารถสร้างสิ่งที่ต้องการขึ้นมาได้ แต่การที่มี source code เดี่ยว ๆ ก็ยังไม่สามารถที่จะทำให้ สิ่งที่สร้างขึ้นมาใช้งานได้ได้ ถ้าไม่มีสถานที่ในการเก็บชุดคำสั่ง และมีการเชื่อมต่อผ่านระบบ</p><p>เมื่อเรามี Source Code ที่ถูกพัฒนาขึ้นมาเราจำเป็นต้องมี Environment ที่เหมาะสมเพื่อให้ทำงานได้ เช่น เวอร์ชั่นของ library, สิทธิของโปรแกรม, เครือข่ายในการเชื่อมต่อ รวมถึงเรื่องอื่นๆ ทำให้หลาย ๆ ครั้งเราอาจจะพบกับปัญหาการทำงานร่วมกันภายในทีม เนื่องจาก Souce Code รันได้จากเครื่อง A อาจจะใช้ไม่ได้กับเครื่อง B เป็นต้น</p><p>ดังนั้น Containerization เกิดมาเพื่อแก้ไขปัญหาดังกล่าว โดยดึงศักยภาพบางส่วนของ Virtualization มาใช้ แต่ทำให้ขนาดเล็กลง และใช้งานได้ง่ายขึ้นเพื่อการ Automation</p><p>เมื่อเรามาดูความแตกต่างระหว่าง <strong>Virtual Machince กับ Container</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgoXcDdUh_S24uvjAH8V0w.png" /></figure><p><strong>Virtual Machine(VM) : </strong>ในการ<strong> </strong>Create VM instances and manage VM Resources เป็นการจำลอง Environment มาทั้ง OS หรือที่เรียกว่า Server โดย server 1 เครื่อง และมีการรัน service หลายๆ service ใน vm เดียวกัน ทำให้แต่ละ VM ต้องใช้ทรัพยาการจำนวนมาก</p><p><strong>Container : </strong>จะมีส่วนช่วยในการ<strong> </strong>Utilized VM Resources เป็นการจำลองและควบคุม Environment สำหรับการ Run เฉพาะบาง Service เช่น Container ที่ run web services ใน Ubuntu ก็บรรจุ Environment เหล่านี้ไว้เป็น 1 Container และ run web services ที่ใช้ในการทำงานเท่านั้น ทำให้ใช้ทรัพยากรน้อยกว่า Virtual Machine</p><p>Docker จึงเป็นเทคโนโลยีที่ถูกหยิบยกขึ้นมาพูดเป็นอันดับแรก ๆ เมื่อเรากล่าวถึง Containerization</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oDsmcIe5LgqfCPmDYLxF9A.png" /></figure><blockquote><strong>Docker</strong> คือ อะไร ??</blockquote><blockquote>Docker เป็น Software ที่ถูกพัฒนาขึ้นมาให้สามารถจัดการ Container ได้ง่าย รวมทั้งมี Image ขนาดเล็ก แยกเป็นชั้นๆๆ ตามรูปภาพด้านบน Build , Ship , Run ซึ่งแต่ละรอบของการพัฒนามีความรวดเร็วเนื่องจาก การมี lightweight image ที่ถูกพัฒนาภายใต้ <a href="https://hub.docker.com/">Opensource community</a> ช่วยให้กลุ่ม Developer มีทางเลือกในการพัฒนา Containerization technology มากขึ้น จึงทำให้ Docker มีความ popular มาก ๆ ในการเอามาใช้งาน</blockquote><p>โดยตัว Docker นั้นมีโครงสร้างพื้นฐานประกอบไปด้วย 4 ส่วน ได้แก่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*y1cpVfDFmvxEom-Q.png" /></figure><p><strong>1) Docker Image</strong> ทำหน้าที่เป็นส่วนเก็บชุดคำสั่งสำหรับการจำรอง environment ที่เหมาะสม ซึ่งเกิดจากการลง build รายละเอียดคำสั่งจาก Dockerfile</p><p><strong>2) Docker Container</strong> คือตัว docker image ที่ถูกนำมาเปิดใช้งาน จำรอง environment บน docker host เช่น เรามี image ที่ทำหน้าที่เป็น nginx web server เมื่อเรา build image ตัวดังกล่าว เราจะได้ container หนึ่งตัวมาใช้งานบนเครื่อง</p><p><strong>3) Docker Host &amp; Docker Daemon</strong> คือส่วนของเครื่องที่ติดตั้ง Docker เอาไว้ โดยตัว Deamon คือ core กลางสำคัญสำหรับการรับคำสั่งต่างๆ จากนักพัฒนา เช่น docker build, docker pull, docker run เป็นต้น</p><p><strong>4) Docker Registry</strong> คือส่วนที่เก็บและกระจาย docker image ที่ได้จากนักพัฒนาหรือองค์กรต่างๆ ซึ่งโดยปกติเมื่อสร้าง image เสร็จบน local environment และอยากให้คนในทีมได้ใช้ image ตัวดังกล่าว จะต้องนำมาเก็บไว้บน registry</p><p><strong>Reference:</strong></p><ul><li><a href="https://miro.medium.com/max/1400/0*D4DUZT7y-JD2qyWP.png">https://miro.medium.com/max/1400/0*D4DUZT7y-JD2qyWP.png</a></li><li><a href="https://www.borntodev.com/c/webdeveloper/docker-101-docker-hub-%E0%B9%81%E0%B8%AB%E0%B8%A5%E0%B9%88%E0%B8%87%E0%B8%A3%E0%B8%A7%E0%B8%A1-container-image-%E0%B9%83%E0%B8%AB%E0%B8%8D%E0%B9%88%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AA%E0%B8%B8%E0%B8%94%E0%B9%83%E0%B8%99%E0%B9%82%E0%B8%A5%E0%B8%81-5fdafa8e7c5f8">https://www.borntodev.com/c/webdeveloper/docker-101-docker-hub-%E0%B9%81%E0%B8%AB%E0%B8%A5%E0%B9%88%E0%B8%87%E0%B8%A3%E0%B8%A7%E0%B8%A1-container-image-%E0%B9%83%E0%B8%AB%E0%B8%8D%E0%B9%88%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AA%E0%B8%B8%E0%B8%94%E0%B9%83%E0%B8%99%E0%B9%82%E0%B8%A5%E0%B8%81-5fdafa8e7c5f8</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38106330f22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git สบายๆ สไตล์ KubeOps Academy  with KubeOps Skills]]></title>
            <link>https://phisinees.medium.com/git-%E0%B8%AA%E0%B8%9A%E0%B8%B2%E0%B8%A2%E0%B9%86-%E0%B8%AA%E0%B9%84%E0%B8%95%E0%B8%A5%E0%B9%8C-kubeops-academy-with-kubeops-skills-98c1a54ae38e?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/98c1a54ae38e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[kubeops]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Sun, 23 Jan 2022 13:24:16 GMT</pubDate>
            <atom:updated>2022-06-06T15:40:39.675Z</atom:updated>
            <content:encoded><![CDATA[<p>สวัสดี ชาว Thai community ทุกท่าน ห่างหายไปนานจากการเขียน blog และนอกจากนี้ยังห่างหายไปจากการเป็น technical guy อีกด้วย ได้เวลาก็กลับมาปัดฝุ่นสมองเชิง logic กันซะใหม่</p><p>จุดเริ่มต้น ของการปัดฝุ่นครั้งนี้ เกิดจากเพื่อนคนนึงเริ่มต้นโครงการดี ๆ ที่ชื่อว่า “KubeOps Academy” นั่นเอง จึงสมัครไป และได้เข้าร่วม ขอบคุณที่ผ่านการคัดสรรจากคนจำนวนมาก</p><p>สำหรับเนื้อหาใน topic นี้ เป็นเนื้อหาของการ pre-academy ก่อนเข้าสู่เนื้อหาจริง อาจารย์โจ้ <a href="https://medium.com/u/756a484f8220">Saritrat Jirakulphondchai</a> ได้ปูพื้นด้วย git strategy ซึ่งเป็นสิ่งที่ Developer or Engineer ควรจะรู้ไว้ เพราะมีประโยชน์ต่อการพัฒนา software เป็นอย่างมาก ดังนั้นอาจารย์โจ้ เลยอยากให้ทุกคนที่เรียนได้แชร์ไอเดีย ความรู้ ที่เป็นประโยชน์กลั่นกรองออกมาเป็นตัวหนังสือให้กับชาวไอทีไทย ถึงแม้มันจะเป็นเรื่องที่ดูง่าย ๆ สำหรับบางท่าน แต่สำหรับอีกหลายคน ก็ยังเป็นเรื่องที่ค่อนข้างใหม่มาก ๆ เลยทีเดียวค่ะ</p><p><strong>เอ่ยมาก็นาน มาเข้าเรื่องกันว่า git นั้น สำคัญไฉน ???</strong></p><p>อาจารย์โจ้เล่าว่า ก่อนหน้าที่เราจะมี git นั้น เมื่อเราพัฒนา software มาจนถึงขั้นตอนในการส่งมอบ software ให้กับทีม opearation เราเคยใช้วิธีการอย่างเช่น zip file package และใส่เลข version 1, 2, 3 โดยต้องแก้ไปเรื่อย ๆ เมื่อมีการเปลี่ยนแปลงถี่ ๆ เช่นการแก้ bug หรือ แก้ข้อมูลต่าง ๆ ภายในไฟล์นั้น ๆ ความยุ่งยากคือ ก่อนจะทำการแก้ version เราก็จำเป็นที่จะต้อง backup version ก่อนหน้า ไว้ร่วมด้วย วันดีคืนดี ถ้านักพัฒนาลืมไปว่า ต้อง backup แล้วมีความจำเป็นจะต้องกลับมาใช้ version เก่า ก็อาจจะส่งผลให้เกิดปัญหาในการทำงาน ทำให้ช้าขึ้น รวมถึง เมื่อมีการเปลี่ยนแปลงใด ๆ ที่เกิดขึ้นกับ package นั้น ๆ เราไม่สามารถติดตามเลยได้ว่า ใครเป็นคนทำอะไรไป ปัญหาเหล่านี้นี่แหละ ที่ทำให้นักพัฒนา software เล็งเห็นความสำคัญในการจัดการตัวไฟล์ทำให้เกิดที่มา ของสิ่งที่เรียกว่า “Version Control”</p><h3><strong>Version Control คืออะไร ???</strong></h3><p>Version Control คือเครื่องมือที่ช่วยในการจัดการไฟล์ หรือกลุ่มไฟล์ หรือ source code สามารถติดตามการเปลี่ยนแปลงที่เกิดขึ้นใน source code ได้ ประกอบไปด้วย</p><ul><li>เช็คการเปลี่ยนแปลง (change) ใน source code และเปรียบเทียบ (diff) ระหว่าง source code ชุดก่อนหน้า และชุดปัจจุบันว่าแตกต่างกันอย่างไร</li><li>รวม code version จากนักพัฒนาแต่ละคน มาอยู่ศูนย์กลาง (merge)</li><li>นักพัฒนาสามารถทราบถึงประวัติการเปลี่ยนแปลง (history change) และสามารถดึง source code กลับมาได้เมื่อ version ปัจจุบันเสียหาย</li><li>สามารถทราบว่าใครเป็นผู้สร้างการเปลี่ยนแปลงใน source code</li></ul><p>Version Control มี 2 ประเภทด้วยกัน คือ</p><ul><li>แบบ Traditional ซึ่งเรียกว่า “Centralized Version Control” หรือที่เรียกว่าแบบรวมศูนย์ ซึ่งทุกการเปลี่ยนแปลงจะถูกเก็บไว้บน Repository ที่รวบรวมไว้ที่ server กลาง เครื่องมือนั้นเรียกว่า Subversion (SVN)</li><li>“Distributed Version Control” หรือที่เรียกว่าแบบกระจายศูนย์ โดย Repository สามารถเพิ่ม แก้ไข อัพเดท บนเครื่องตัวเองแม้ไม่มี Server หรือ Internet และเมื่อต้องการทำงานร่วมกันก็สามารถเชื่อมต่อไปยัง Server เพื่อทำงานร่วมกับทีมได้ Distributed Version Control System ที่นิยมใช้ประกอบด้วย Git, Mercurial เป็นต้น</li></ul><h3>มารู้จัก Git กันเถอะ !!!</h3><p>Git คือ เครื่องมือแบบ Open Source ที่ช่วยจัดการ version ของ source code ให้กับนักพัฒนา โดยจะเก็บประวัติว่าไฟล์แต่ละไฟล์ถูกสร้าง/ลบ/แก้ไขโดยใคร เมื่อไหร่ และอย่างไรเอาไว้ทั้งหมด ทำให้เราสามารถติดตามการเปลี่ยนแปลงของโค้ดได้ตลอด ตัวอย่างของเครื่องมือ แบบ Git มีหลายเจ้าด้วยคือ เช่น <a href="https://github.com/">Github</a>, <a href="https://about.gitlab.com/">Gitlab</a>, <a href="https://bitbucket.org/product/">Bitbucket</a> เป็นต้น</p><h4>ลักษณะการทำงานของ Git (Lifecycle)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dl140Y3_JfYXgk7rwZ-ysQ.png" /></figure><ul><li>เราเริ่มจากการสร้าง folder สำหรับเก็บไฟล์งานของโปรเจคต่าง ๆ ไว้ในเครื่องของเรา (Local)โดยที่ Git ยังไม่ได้มีการทำงานใด ๆ</li><li>เมื่อเริ่มให้ Git เข้ามาทำงาน และเริ่มขบวนการตรวจสอบไฟล์ต่าง ๆ ที่ถูกเพิ่มเข้ามา หรือแก้ไข เช่น <strong>Add, New หรือ Clone Repository</strong> ถือว่าเป็นการ I<strong>nit Working Directory</strong></li><li>เมื่อเราอนุญาติให้ Git ทำงาน หรือ Track ไฟล์ใน <strong>Working Directory</strong> เรียบร้อยแล้ว การที่เราแก้ไข หรือเพิ่มไฟล์เข้าไปใน <strong>Working Directory</strong> สถานะของไฟล์นั้น ๆ เปลี่ยนเป็น <strong>Staging Area</strong></li><li>ทุกครั้งที่เรา เพิ่ม หรือ แก้ไขไฟล์ และ Commit ข้อมูลการแก้ไขนั้น ๆ จะถูกเก็บไว้ใน Local Repository ก็คือภายในเครื่องของเราเองนี่แหล่ะ และพร้อมสำหรับการ Push หรือ การส่งขึ้นไปเก็บไว้บน Server เรียกว่า <strong>Local Repository</strong></li><li>หลังจากที่เราทำงานไปได้ซักพัก เราก็จัดการใช้คำสั่ง Push เพื่อนำการแก้ไขแต่ละเวอร์ชั่นทั้งหมด ขึ้นไปเก็บไฟล์บน Remote Server หลังจากการ commit ซึ่งสิ่งนั้นเรียกว่า <strong>Remote Repository</strong></li></ul><h4>วิธีการดาวน์โหลด Git</h4><p>สามารถเข้าไปดาวน์โหลดในเว็บไซต์ของ Git ได้เลย มีตัวติดตั้งให้ติดตั้งกันง่ายๆ โหลดไฟล์จากหน้าเว็บได้เลย <a href="https://git-scm.com/downloads">git-download</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dk8bzw9M7WOJAJroG9Fp8A.png" /></figure><h4>คำสั่ง Git พื้นฐานและการใช้งาน</h4><p>คำสั่งที่สำคัญสำหรับใช้งาน Git หลัก ๆ ประกอบไปด้วย 6คำสั่งด้วยกันคือ init, clone, add, commit, push และ pull</p><ul><li><strong>init : </strong>คำสั่งที่ต้องการใช้งาน git บนโฟลเดอร์นั้น ๆ</li></ul><pre>cd workspace<br>git init</pre><ul><li><strong>clone : </strong>เป็นการคัดลอกโปรเจคจำลองมาจากโปรเจคหลัก ซึ่งสามารถเปลี่ยนแปลงไฟล์ในโปรเจคจำลองนี้ได้โดยที่ไม่กระทบโปรเจคหลัก (ไฟล์จำลองที่เราทำการเปลี่ยนแปลงจะเรียกว่า local repository และไฟล์หลักที่อยู่คนละที่จะเรียกว่า remote repository)</li></ul><pre><em>git clone</em></pre><ul><li><strong><em>add : </em></strong><em>ใช้สำหรับเพิ่มไฟล์เข้าไปใน stage (เพื่อระบุว่าต้องการที่จะเปลี่ยนแปลงไฟล์ไหนใน git บ้าง)</em></li></ul><pre><em>git add &lt;filename&gt;<br>git add .</em></pre><ul><li><strong><em>commit : </em></strong><em>เป็นคำสั่งที่ใช้ต่อจาก </em><em>git add เพื่อยืนยันการเปลี่ยนแปลงไฟล์ที่ถูก add ลงใน stage ของ Remote Repository โดยสามารถใส่ option </em><em>-m เพื่อ comment file</em></li></ul><pre><em>git commit -m “comment”</em></pre><blockquote><em>ควรใส่ comment file ตามหลักการของ </em><a href="https://www.conventionalcommits.org/en/v1.0.0/"><em>Commit Conventional</em></a></blockquote><ul><li><strong><em>push : </em></strong><em>เป็นการส่งไฟล์ที่ commit แล้วเข้าสู่ remote repository</em></li></ul><pre><em>git push</em></pre><ul><li><strong><em>pull : </em></strong><em>เป็นการดึงไฟล์ที่มีการเปลี่ยนแปลงใน remote มาเปลี่ยนแปลงใน local ซึ่งมาจากการใช้ </em><em>git fetch และตามด้วย </em><em>git merge</em></li></ul><pre><em>git pull</em></pre><h4><strong><em>ข้อมูลอ้างอิง :</em></strong></h4><ul><li><em>https://www.borntodev.com/2020/03/30/git-%E0%B8%9E%E0%B8%B7%E0%B9%89%E0%B8%99%E0%B8%90%E0%B8%B2%E0%B8%99%E0%B8%AA%E0%B8%B8%E0%B8%94%E0%B9%86/</em></li><li><a href="https://devahoy.com/blog/2015/08/introduction-to-git-and-github/"><em>https://devahoy.com/blog/2015/08/introduction-to-git-and-github/</em></a></li><li><a href="https://www.codebee.co.th/labs/git-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-git/"><em>https://www.codebee.co.th/labs/git-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99-git/</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98c1a54ae38e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“AWS” Identity and Access Management — IAM to IAM Multi account strategy (Part 1)]]></title>
            <link>https://phisinees.medium.com/aws-identity-and-access-management-iam-to-iam-multi-account-strategy-part-1-e8ea35736436?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8ea35736436</guid>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-cloud]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-iam]]></category>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Sun, 21 Feb 2021 07:49:44 GMT</pubDate>
            <atom:updated>2021-02-21T07:53:40.876Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS Identity and Access Management (IAM) — Part 1</h3><p><strong>Objective: </strong>This blog is a basic concept before go through IAM Multi account because we must understand the purpose and basic components of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QT1sLVMS7nQ7aZR2ZDHtdw.png" /></figure><h3>What’s IAM ?</h3><p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html">AWS Identity and Access Management (IAM)</a> is services that uses for <strong>manage users and permission levels</strong> for staff or 3rd parties requiring to access and help securely control in AWS resources. We use it to control who is <strong>authenticated</strong> to AWS account and <strong>authorized</strong> (has permission). It seems to be the <strong>security center</strong> in an AWS account and define who can do what in AWS resources</p><h3>How’s secure ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HlMb87C6SvdE950NAPFQdQ.png" /></figure><p>When we’re talking about IAM, just thought about it as <strong>a front door to the cloud</strong>. If you want to access anything, any resources or services in AWS. IAM will provide you the access key to those things and we can configure the level of permissions to access them. <strong>Just keep in your mind, please give it the least privilege access.</strong></p><h3>IAM’s Component :</h3><p>If you need to interact with the AWS resources, they require 2 things that IAM can interact to AWS resources via <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html">AWS API</a>.</p><ul><li><strong>Authentication:</strong> it will be implemented in term of <strong>Principles.</strong></li><li><strong>Authorization: </strong>it will be implemented in term of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html"><strong>Policies</strong></a> using JSON document.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQF2JAEXQ_Td8PAYk71GYg.png" /></figure><p>The IAM policy, there are 3 parts of request that <strong>represents somebody who wants to do something with something </strong>defined by an access elements.</p><ul><li><strong>Principal</strong> is something who is the <strong>user</strong>, the <strong>role</strong> or the <strong>AWS service</strong> which want to interact inside AWS resources.</li><li><strong>Action</strong> will define what the principle wants to do such as <em>“GetObject”</em> from <em>S3</em>. <strong>It’s the operation thing</strong>.</li><li><strong>Resource</strong> is the <strong>target of the operation</strong>.</li></ul><p>This is an example of policy access elements.</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Action&quot;: [<br>                &quot;iam:GetContextKeysForCustomPolicy&quot;,<br>                &quot;iam:GetContextKeysForPrincipalPolicy&quot;,<br>                &quot;iam:SimulateCustomPolicy&quot;,<br>                &quot;iam:SimulatePrincipalPolicy&quot;<br>            ],<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Resource&quot;: &quot;*&quot;<br>        }<br>    ]<br>}</pre><p><strong><em>Principle</em></strong> is all AWS resources.</p><p><strong><em>Action </em></strong>can be operation as following as inside-array above.</p><p><strong><em>Resource</em></strong> is IAM.</p><blockquote><strong><em>Meaning of this policy</em></strong><em> allow </em>“All resources in AWS can be GetContextKeysForCustomPolicy<em>, </em>GetContextKeysForPrincipalPolicy<em>, </em>SimulateCustomPolicy and SimulatePrincipalPolicy on IAM services”</blockquote><h3>Reference guide &amp; recommended book:</h3><p><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html">IAM Introduction</a></p><p><a href="https://books.google.co.th/books/about/A_Practical_Guide_to_AWS_IAM.html?id=3ykWEAAAQBAJ&amp;redir_esc=y">A Practical Guide to AWS IAM</a></p><p>Let’s see an IAM Multi account strategy <strong>at AWS Identity and Access Management (IAM) : IAM Multi account — Part 2”</strong></p><p>❤… Thank you for reading … ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8ea35736436" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Github Flow with Github action ⚙]]></title>
            <link>https://phisinees.medium.com/github-flow-with-github-action-5d4f0bbd7eab?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d4f0bbd7eab</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 10:56:17 GMT</pubDate>
            <atom:updated>2021-02-03T02:34:42.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>Github Flow with Github action</h3><h3>Getting Started</h3><p>The <a href="https://guides.github.com/introduction/flow/">GitHub Flow</a> is a lightweight, branch-based for projects with regular deployments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c6X9MmuJegNcQLuJUuadmg.png" /></figure><p>As the workflow above, we just touch only 2 branches; master(Currently is main branch) and feature branch (own branch for develop).</p><h3>Step of Github flow work</h3><ol><li>Clone resources from main branch and checkout to feature branch (your own branch).</li><li>Edit, change or fix the code in resources on your own branch then commit.</li><li>Push to the original branch.</li><li>Open <strong>pull request</strong> and tag reviewer to review your code.</li><li>When reviewing finish, the reviewer will merge the code to main branch.</li></ol><h3>Example</h3><p>A complete example demonstrating a Feature Branch Flow is as follows. Assuming we have a repo setup with a main branch.</p><blockquote>git checkout main git checkout -b &lt;feature_branch&gt;</blockquote><p>So, the work happens on feature branch (edit, change, fix the code)</p><blockquote>git add .</blockquote><blockquote>git commit -m &lt;commit message&gt;</blockquote><blockquote>git push origin &lt;feature_branch&gt;</blockquote><blockquote>git request-pull main ./</blockquote><p><a href="https://docs.github.com/en/free-pro-team@latest/actions">Github action</a> is the best way for supercharge the Github workflow using event-driven design. It’s fully built-in in the Github that’s responsible to automate, customize, and execute your software development workflows in your repository likes the <a href="https://en.wikipedia.org/wiki/CI/CD">CI/CD</a> pipeline.</p><h3>Basic concepts of Github Action</h3><p>Here’s the prove concept of Github action integrate with the workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLV0JR3vB8CYtznxsxw96Q.png" /></figure><ul><li><strong>Workflows:</strong> Every repository contain <strong>workflow</strong> (one or more workflows) that were defined be separate <strong>YAML</strong> file in<em> .github/workflows </em>directory of the repo and each workflows can run parallel at the same time. As following as <a href="https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions">workflow syntax</a></li><li><strong>Event:</strong> A workflows will trigger if we create one or more <strong>events</strong> that consist of internal Github event such as a pull request, a release or a push, a schedule event likes a cron job or external event that triggered be Webhook or API.</li><li><strong>Jobs:</strong> A workflow can have one or more <strong>jobs</strong> that contains a set of commands and then run when the workflow is triggered. Jobs can run parallel. Also can define run sequentially when we have dependencies between jobs.</li><li><strong>Runner:</strong> Each job runs on a specific <strong>runner. </strong>A runner is virtual machine hosted by Github with an operating system (Linux, MacOS or Window). You can choose them and also use <a href="https://docs.github.com/en/free-pro-team@latest/actions/hosting-your-own-runners/about-self-hosted-runners">self-hosted runner</a>.</li><li><strong>Steps: </strong>A sequence of <strong>steps</strong> are under a job that are either shell command or action. All the steps of a job run sequentially on runner.</li><li><strong>Actions: </strong>An <a href="https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/about-actions">action</a> is reusable unit of code which can be included as a step of a job.</li></ul><p>P.S. for example of Github action workflow, can see in<em> the reference guide below</em>.</p><h3>Reference guide</h3><ul><li><a href="https://guides.github.com/introduction/flow/">Github flow</a></li><li><a href="https://docs.github.com/en/free-pro-team@latest/actions/quickstart">Quickstart for GitHub Actions</a></li><li><a href="https://docs.github.com/en/free-pro-team@latest/rest/reference">GitHub REST API</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d4f0bbd7eab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Infrastructure as code using google cloud deployment manager to create the VM instance with…]]></title>
            <link>https://phisinees.medium.com/https-medium-com-darkbabybeau-infrastructure-as-code-using-deployment-manager-382c4820fe90?source=rss-a8f7da446833------2</link>
            <guid isPermaLink="false">https://medium.com/p/382c4820fe90</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Phisinee Sagulvanitchaporn]]></dc:creator>
            <pubDate>Fri, 15 Mar 2019 11:46:15 GMT</pubDate>
            <atom:updated>2022-06-06T15:35:03.231Z</atom:updated>
            <content:encoded><![CDATA[<h3>“Infrastructure as code using google cloud deployment manager to create the VM instance with docker service”</h3><p>… นี่เป็น blog แรกของเราที่เราเขียนขึ้นมา ก่อนอื่น เราขอบอกไว้ก่อนเลยว่า เราไม่เคยเขียน blog ที่ไหนมาก่อน โดยเฉพาะอะไรที่มันเป็นสาระนี่ ยิ่งไม่เค๊ย ไม่เคย เลยจริงๆ ถ้าผิดพลาดประการใด เราขออภัยมา ​ณ ที่นี้ด้วย รวมถึงมาช่วยกันเสนอแนะได้เช่นกันนะคะ … :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y78o8z4WY9j2dtbMJJjX4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*3MkGtCsqlAXrK7sEkoS6TQ.png" /><figcaption>GCE management with deployment manager</figcaption></figure><p>จริง ๆ แล้วหลายคน คงรู้จัก และเคยใช้ google cloud platform or GCP มาบ้างแล้ว แต่เนื่องด้วย GCP มี product ต่าง ๆ มากมายเต็มไปหมดให้เราเลือกใช้ เเละจากที่ไปไล่ลาตามหา ค้นคว้าข้อมูลจากในโลก internet ไอ้เจ้า deployment manger ซึ่งเป็นหนึ่งใน product ของ GCP เนี่ย กลับมีคนใช้งานมันน้อย (เอาเป็นว่าบทความที่เป็นภาษาไทยเนี่ย เราแทบจะไม่เห็นเลยล่ะ แต่ภาษาอังกฤษก็พอมีอยู่ใช้ได้อยู่) อาจเพราะความซับซ้อนอะไรบางอย่างในด้านการใช้งาน รวมถึงผู้ใช้จะต้องมีทักษะในการอ่าน script หรือ code ต่าง ๆ พอสมควร และใช้เวลาในการศึกษา document มากอยู่ เลยทำให้คนที่ไม่ถนัดในสาย coding เนี่ย อาจจะมองว่า ใช้ GUI ก็คงจะง่ายและรวดเร็วกว่าเหมือนกัน</p><p>ดังนั้นเราจึงอยากมาอธิบายมันแบบง่าย ๆ เพื่อเป็นเเนวทางให้คนที่ไม่ถนัดในการอ่าน code หรือไม่เข้าใจว่ามันดียังไงให้ได้รับทราบ และมาลองใช้งานมันดู</p><p>ก่อนอื่น เรามาทำความรู้จัก ไอ้เจ้าที่เรียกว่า deployment manager หรือ dm กันก่อนดีกว่า … (ต่อไปเราจะใช้คำย่อนี้อ้างถึง feature นี้ละกันนะ)</p><blockquote><a href="https://cloud.google.com/deployment-manager"><strong>Deployment manager (DM)</strong></a> เป็น Feature หนึ่งบน GCP ที่จะช่วยให้เราสามารถจัดการทรัพยากรบน google cloud engine or GCE เพื่อทำ automate deployment ในการสร้าง VM instance or appication โดยเรียกใช้งาน deployment ผ่าน YAML configuration file นอกจากนี้ ยังสามารถใช้ Python หรือ Jinja2 template เพื่อกำหนดค่าพารามิเตอร์ต่าง ๆ สำหรับ instance ที่ต้องการการใช้งานที่ซับซ้อนยิ่งขึ้นได้อีกด้วย ซึ่งดูได้จากแผนภาพโครงสร้างของการทำงานด้านล่างค่ะ</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*ePqsyISD27SOPAHl6HyggA.png" /><figcaption>Google deployment-manager workflow management</figcaption></figure><p>ต่อไปมาเรามาเข้าสู่วิธีการสร้าง VM instance โดยใช้ deployment-manager กันเลยค่ะ …</p><blockquote><em>เนื่องจาก DM สามารถใช้งานผ่าน Cloud SDK command line tools ได้ เราก็จะมาใช้งานด้วยวิธีนี้ ดังนั้น ก่อนที่จะเข้าไปทำอะไรกับ google console ผ่านทาง command line ได้นั้น ก็ต้องมี package ไว้สำหรับรัน command เหล่านั้น บน terminal ของเครื่องเราเองได้ก่อน วิธีการ install สามารถทำตาม </em><a href="https://cloud.google.com/sdk/"><em>Cloud SDK Document</em></a><em> ได้เลยค่ะ</em></blockquote><p>ต่อไปมาถึงวิธีการสร้าง template เพื่อ build VM instance บน google cloud กันเลยดีกว่าค่ะ</p><p>สิ่งที่ต้องเตรียมก่อนที่จะสร้าง template ผ่าน DM ได้นั้นต้องมีเงื่อนไขดังนี้</p><p>*** ต้องมี os image ที่ลง docker service เอาไว้เรียบร้อยแล้ว *** <br>โดยวิธีการคร่าว ๆ สามารถดูได้จากด้านล่างค่ะ</p><ul><li>ต้อง<a href="https://cloud.google.com/compute/docs/instances/create-start-instance">สร้าง VM instance</a> บน GCP ก่อน ซึ่งสามารถทำได้ผ่าน console ของ google cloud ได้เลยค่ะ แต่ถ้าใครมี instance ที่สามารถใช้งานได้อยู่แล้ว ก็สามารถทำตามสเตปถัดไปได้เลย</li><li>เมื่อมี instance ต้นแบบเรียบร้อยแล้ว ก็ลง <a href="https://docs.docker.com/install/">docker service</a> ใน instance นั้นให้เรียบร้อย หรือถ้าใครมี instance ที่ลง docker ไว้ใช้งานเรียบร้อยอยู่แล้ว ก็ข้ามไปสเตปถัดไปได้เลย (ในตัวอย่างจะเป็นการทำงานบน linux debian os ทั้งหมด)</li><li>หลังจากนั้นทำการ <a href="https://cloud.google.com/compute/docs/disks/create-snapshots">snapshot disk</a> ของ VM instance ต้นแบบนั้น (อย่าลืม stop instance ก่อนนะคะ)</li><li>แล้วก็<a href="https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#bundle_image">สร้าง image</a> ต้นแบบ จาก snapshot disk ลูกนั้นได้เลย ก็เป็นอันเสร็จขั้นตอนในการเตรียมเรียบร้อยแล้ว</li></ul><p>ต่อไปมาถึงขั้นตอนจริงๆ แล้วที่เราจะมาทำการใช้ DM เพื่อทำ automate ในการ create VM instance ขึ้นมา ก่อนอื่นในเราต้องเตรียมไฟล์ทั้งหมดดังนี้ค่ะ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c69e990d93fbb8d9cbec77ae203babb/href">https://medium.com/media/2c69e990d93fbb8d9cbec77ae203babb/href</a></iframe><p><strong>config.yaml file:</strong> เป็นไฟล์ที่ใช้ในการ deployment โดยกำหนดค่าพารามิเตอร์ต่าง ๆ ลงไป หรือกำหนดให้ไปเรียกพารามิเตอร์ในการสร้างทรัพยากรบน GCE ใต้การเขียน Python หรือ Jinja2 template ได้อีกด้วย</p><p>ซึ่งจาก code จะเห็นว่า config.yaml ได้ไปเรียกพารามิเตอร์จากไฟล์ที่ชื่อ “instance.jinja” และสร้างทรัพยากรโดยมีการเรียกใช้ startup-scripts จัดการ ในส่วนของการทำ pre-installation</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0c9b1ead227739eb2348356aa1c419f/href">https://medium.com/media/c0c9b1ead227739eb2348356aa1c419f/href</a></iframe><p><strong>instance.jinja file: </strong>เป็นไฟล์ที่มีการระบุพารามิเตอร์ของทรัพยากรต่าง ๆ ทั้ง Type ของ disk ที่ต้องการใช้, OS ที่ต้องการใช้, ค่าพารามิเตอร์ network ต่าง ๆ ซึ่งในตัวอย่างเราได้ใช้ default network</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5eadaf0b899fef91307217723a401e8e/href">https://medium.com/media/5eadaf0b899fef91307217723a401e8e/href</a></iframe><p><strong>startup-script.sh file: </strong>หลักการง่าย ๆ ของไฟล์นี้คือ ใช้ทำการ pre-installation นั่นเอง (ถ้ามองผ่าน ๆ ก็ออกจะคล้าย ๆ การทำ kickstart ของ linux ล่ะจ้า ^.^)<br>โดยในที่นี่ startup-script ของเราได้ทำการสร้าง disk เป็นสองก้อน เพื่อที่จะเเยก docker data ออกไปไว้อีกลูก เพื่อความปลอดภัยของ data ใน container ต่าง ๆ ที่จะสร้างขึ้นด้วยค่ะ</p><p>&lt; เพิ่มเติม: คลิ๊ก <a href="https://cloud.google.com/deployment-manager/docs/step-by-step-guide/create-a-configuration">การสร้างไฟล์เพื่อใช้ในการดีพลอย</a> &gt;</p><p>และแล้วก็เป็นอันสิ้นสุดการเตรียม … ต่อไป ในการ deploy VM instance ใหม่จากสิ่งที่เตรียมไว้ง่ายยิ่งกว่าปอกกล้วยเข้าปาก เพียงแค่รัน command ข้างล่างนี้ ก็เป็นอันเสร็จเรียบร้อย</p><pre>gcloud deployment-manager deployments create &lt;instance name&gt; \<br>--config config.yaml</pre><p>สามารถดู VM instance ใหม่ของเราได้จาก GCE บน google console ได้เลย และนอกจากนี้ ยังสามารถนำไป deploy ได้หลาย ๆ instance ผ่านการสร้าง template เหล่านี้อีกด้วย</p><p>เห็นมั้ยล่ะคะว่าถ้าสำหรับสาย developer ที่ไม่อยากยุ่งยากในการมานั่งคลิ๊ก ๆ บน GUI ก็สามารถเตรียม template ต่าง ๆ ได้เป็นหลาย ๆ template แล้วนำมาดีพลอย รวมถึงสามารถแชร์ code เหล่านี้ไปให้เพื่อน ๆ ในทีม หรือเพื่อนคนอื่นใช้สร้าง infrastruce ใหม่ได้อีกด้วย</p><p>… อาจจะดูเยอะอย่างในช่วงขั้นตอนการเตรียม แต่เมื่อเตรียมครั้งแรกเสร็จเรียบร้อยแล้วหลังจากนั้นทุกอย่างก็ง่ายไปหมดเลยค่ะ… งั้นเรามาสรุปข้อดี ข้อเสียของมันสักหน่อย !!!</p><p>ข้อดี:<br>1. สามารถ scale instance ได้ตามใจปรารถนา<br>2. ใช้เวลาดีพลอยรวดเร็ว<br>3. สามารถแชร์ soruce code ให้ผู้อื่นนำไปใช้งานเพื่อสร้าง infrastructure ได้เหมือนกัน<br>4. Jinja2 template ใช้งานง่าย ไม่จำเป็นต้องเป็น developer ก็สามารถดู code แล้วอ่านออกได้ง่าย และ custom ได้เองแบบง่ายๆ เช่นกัน</p><p>ข้อเสีย:<br>ใช้เวลาเตรียมก่อนจะสร้าง template พอสมควร เนื่องจากต้องมี image ที่เราต้องการ</p><p>เป็นอันว่าจบขั้นตอนในการใช้งาน deployment manager เพื่อสร้าง infrastructure พร้อมทั้งมี docker service ลงไว้ตั้งแต่ต้น เพื่อสามารถ scale vm ได้เพิ่มขึ้น ประหยัดค่าใช้จ่าย ง่ายต่อการที่ developer สามารถนำไปทำงานโดยไม่ต้องเสียเวลามานั่งกดๆ ผ่าน GUI ถือว่าเหมาะ และเซฟเวลาไปเยอะเลยทีเดียวค่ะ …</p><p>…. แล้วลองไปใช้งานกันดูนะคะ ใครมีอะไรเจ๋ง ๆ มาแชร์ ก็นำมาบอกกล่าวกันได้เลย … !!! <br>และขอบคุณที่อ่านมาจนถึงบรรทัดสุดท้ายนะคะ ถ้าดีเดี๋ยวเราไว้กลับมาเขียนใหม่เรื่อย ๆ ตอนนี้ ประสบการณ์อาจจะยังน้อย แต่ถ้าเรามีเพิ่มเติมเมื่อไหร่เราจะมาเเชร์เพิ่มขึ้นค่ะ :)</p><p>สามารถศึกษาเพิ่มเติมได้ที่<br>อ้างอิง: <a href="https://cloud.google.com/deployment-manager/docs/how-to">https://cloud.google.com/deployment-manager/docs/how-to</a><br>(เอกสาร google อาจจะดูเยอะ แต่เข้าใจง่ายมากเลยทีเดียว ^^)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=382c4820fe90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>