wiki/literature.suse-cloud-native-fundamentals-scholarship-program.html

102 lines
40 KiB
HTML
Raw Permalink Normal View History

2022-07-29 15:41:17 +00:00
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>SUSE Cloud native fundamentals scholarship program</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
MathJax = {
tex: {
inlineMath: [ [&#x27;$&#x27;,&#x27;$&#x27;], [&#x27;\(&#x27;,&#x27;\)&#x27;] ],
displayMath: [ [&#x27;$$&#x27;,&#x27;$$&#x27;], [&#x27;[&#x27;,&#x27;]&#x27;] ]
},
options = {
processHtmlClass = &quot;math&quot;
}
}
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>SUSE Cloud native fundamentals scholarship program</h1><section class="post-metadata"><span>Date: <!-- -->2021-06-07 18:21:19 +08:00</span><span>Date modified: <!-- -->2021-07-20 18:11:06 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a href="/wiki/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-1-and-2" class="toc-link toc-link-h1">Lesson 1 and 2</a></li><li class="toc-item toc-item-h1"><a href="/wiki/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-3" class="toc-link toc-link-h1">Lesson 3</a></li><li class="toc-item toc-item-h1"><a href="/wiki/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-4" class="toc-link toc-link-h1">Lesson 4</a></li><li class="toc-item toc-item-h1"><a href="/wiki/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-5" class="toc-link toc-link-h1">Lesson 5</a></li></ol></nav><p>A course from Udacity with SUSE from their scholarship program.
If you&#x27;re interested in the exercises for other solutions, see <a href="/wiki/challenges.suse-cloud-native-fundamentals-scholarship-program">Solutions to SUSE Cloud native fundamentals scholarship exercises</a>.
</p><p>Some things to keep in mind:
</p><ul><li><p>Required to interact with the <a href="https://susecloudchallenge.slack.com/">student community</a></p></li><li><p><a href="https://sites.google.com/udacity.com/suse-cloud-native-foundations/home">Hub for all course-related information</a></p></li></ul><h1 id="lesson-1-and-2">Lesson 1 and 2</h1><ul><li><p>There is a dedicated organization for cloud-related called the Cloud Native Computing Foundation (CNCF).
Among the list of projects, they have Kubernetes and Docker.
</p></li><li><p>While cloud-native tools are widely adopted, you need to consider the stakeholders.
From a business perspective, it needs to represent agility and growth.
From a technical perspective, it needs to present automation and observability.
</p></li><li><p>Application architecture:
</p><ul><li><p>One way to construct an application is with the <strong>monolith structure where all of the components are stored in a monorepo</strong>.
</p></li><li><p>Another is through <strong>microservice architecture where each component can live in its own repository</strong>.
</p></li></ul></li></ul><table><thead><tr><th>Monolith</th><th>Microservices</th></tr></thead><tbody><tr><td>Single repository</td><td>Multiple repositories</td></tr><tr><td>Sequential</td><td>Concurrent</td></tr><tr><td>Has to be reproduced holistically</td><td>Only reproduces the component</td></tr><tr><td>One delivery pipeline</td><td>Multiple pipelines</td></tr></tbody></table><p>Best practices for application deployment:
</p><ul><li><p><strong>health checks enable easier way of making sure each component is functional</strong>;
usually implemented as an HTTP endpoint (e.g., <code class="inline-verbatim">/status/</code>)
</p></li><li><p><strong>metrics track the individual counts for each component</strong> from the number of logins, how many times the user has reach the interface, etc.
</p></li><li><p><strong>logs are the most important component enabling easier debugging</strong>;
this process could be passively printing to stdout/stderr or actively logs through a log handler;
oftentimes, log levels are used to easily identify the type of information a developer may need — e.g., debug, info, warn, error, fatal;
furthermore, it is often recommended to attach a log with a timestamp
</p></li><li><p><strong>tracing enables easier debugging by recording certain information to make reproducible steps</strong>;
oftentimes, these involves recording the number of times to call a function or indicating whether it entered a state
</p></li><li><p>implementing to <strong>record resource consumption makes sure that the application is ready to fight while not going above certain limits</strong>;
these often involves knowing the upper boundary of the network bandwidth and CPU consumption, creating benchmarks or stress tests for the application
</p></li><li><p>to make it easier to memorize, know the word &quot;HuMLTR&quot;
</p></li></ul><h1 id="lesson-3">Lesson 3</h1><ul><li><p>containers versus virtual machines
</p><ul><li><p>virtual machines are software that emulates the full stack of a computer including the operating system, applications, and hardware
</p></li><li><p>containers are similar to virtual machines except they have less components — e.g., there is no need for hardware emulation, the operating system is removed
</p></li><li><p>by their nature, containers are lightweight compared to virtual machines
</p></li><li><p>nowadays, both features make use of OS-level virtualization — e.g., chroot, FreeBSD jails, Linux containers (LXC)
</p></li></ul></li><li><p>Docker is one of the more popular platforms for containers;
as a platform, it is composed of a daemon that has to be activated first before you can do container stuff and also hosts a <a href="https://hub.docker.com/">large library of images</a> to make as a foundation
</p></li><li><p>an application can be packaged with Docker images as a distribution method — e.g., <a href="https://github.com/ArchiveBox/ArchiveBox">ArchiveBox</a></p></li><li><p>container workflow: configuring what image to create, then build an image from the configuration (i.e., Dockerfile), run the image for testing purposes, tagging it, then pushing the image to a registry
</p></li><li><p>while managing containers is viable, you may have to manage a lot of containers;
while possible, it does scale a lot for the developer;
for this, you can use a container orchestrator
</p></li><li><p>among the list of orchestrators, we have Docker Swarm, Apache Mesos, and Kubernetes among others;
but for this topic, we&#x27;ll go with Kubernetes as it is popular and also goes with the building blocks structure (a set of primitive blocks that can be customized to create more complex operations)
</p></li><li><p>Kubernetes manages several resources:
</p><ul><li><p>it manages a cluster, the entire group of nodes where each node (service or master)
</p></li><li><p>worker nodes is a group of pods
</p></li><li><p>pods are a group of containers
</p></li><li><p>deployments indicate the state of the pod
</p></li><li><p>replica sets ensure at least one similar pod is running at a time
</p></li><li><p>services
</p></li><li><p>ConfigMaps handles pod configurations
</p></li><li><p>namespaces provide separation of logic between different applications, that is, application context
</p></li></ul></li></ul><h1 id="lesson-4">Lesson 4</h1><ul><li><p>small organizations do not often have the resources to manage their own clusters thus often use third-party providers;
while some organizations do have the resources, the scope to manage clusters often overshadow the team managing it
</p></li><li><p>in cases like those, it make sense to use Platform-as-a-Service platforms (PaaS)
</p></li><li><p>there are different components in a technology stack that an organization can manage:
starting from servers, storage, virtualization, operating system, runtime, data, and application
</p></li><li><p>several providers are offering the above components and usually go into several umbrellas:
</p><ul><li><p>the organization can choose no provider and instead manage their own with their own hardware, infrastructure, and all;
having an on-premises instance lets the organization full control of the whole stack but it can take a while to setup before the team can manage their deployments
</p></li><li><p>some organizations will choose a provider that offers a infrastructure-as-a-service (IaaS) — e.g., Google Cloud Platform, Amazon Web Services — just not providing a way to manage the hardware (e.g., servers, storage)
</p></li><li><p>others will choose platform-as-a-service (PaaS), reducing further what the organization can manage, only the application and the data
</p></li><li><p>some providers offer functions-as-a-service (FaaS) — e.g., Amazon Lambda, Netlify Lambda — that only invokes the application on-demand
</p></li></ul></li><li><p>the point is the more the organization has full control of, the more complexity the organization has to worry about;
while they have full control over the stack, they have also to cover the full expense for managing it;
having more control also means less chances of being vendor lock-in, thus, more flexibility with more options to add and remove features into the market
</p></li><li><p>the less components they have control over, the less complexity;
with less things to worry about, it takes less time to create prototypes and less overall expenses;
but since they delegate the tasks to a third-party provider, they are vulnerable to vendor lock-in, thus, can only move from the limitations of the platform;
</p></li></ul><h1 id="lesson-5">Lesson 5</h1><ul><li><p>most organizations want to polish the end-product as much as possible before it reach their customers;
in software, most applications go through a variety of steps such as putting through a testing suite, building the image with reproducible results, and packaging it for enabling everyone be able to open the app, and deploying it (or an actual release)
</p></li><li><p>to make application development faster, they usually divide it into several environments: one for development where they can change things with minimal risk and one for production, that is, the customer-facing interface
</p></li><li><p>to make it easier, some of them delegate the usual tasks of testing, building, packaging, and deployment to the cloud
</p></li><li><p>this has resulted into the usual practice of continuous integration (CI) and continuous delivery (CD)
</p><ul><li><p>CI is a tool for automating testing, building, and packaging the application
</p></li><li><p>CD is a tool for automatic deployment of the application
</p></li></ul></li><li><p>there are many cloud services that offer CI/CD like CircleCI, Jenkins, Travis CI, Gitlab CI, and GitHub Actions
</p><ul><li><p>for this lesson, we&#x27;ll go with GitHub Actions which is the integrated CI/CD workflow for GitHub repos
</p></li><li><p>GitHub Actions enables event-listening jobs
</p></li><li><p>each job are then divided into steps
</p></li><li><p>you can configure GitHub Actions through <code class="inline-verbatim">.github/workflows</code> inside of the GitHub repo
</p></li></ul></li><li><p>in this chapter, they go with ArgoCD which is an application deployment frontend to Kubernetes clusters
</p></li><li><p>with similar configurations, you may want to use templates;
this is where configuration managers come in;
this course chooses Helm as the tool of the trade as it is integrated into ArgoCD
</p></li><li><p>Helm is a configuration manager
</p><ul><li><p>it mainly manages charts which are basically packages in a package manager
</p></li><li><p>a chart contains parameterized values which is mainly done through Go templates
</p></li><li><p>Helm recognizes a chart with the <code class="inline-verbatim">Chart.yaml</code> file that contains metadata about the deployment
</p></li></ul></li><li><p>ArgoCD can accept multiple sources including Helm, making it easy to integrate Helm into it
</p></li><li><p>CI/CD tools can be categorized based on the push/pull methodology
</p><ul><li><p>traditionally, CI/CD platforms are push, delivering updates once changes have been pushed into the repository;
the changes will also be pushed to the CD where it will create new clusters;
while it makes update flow from new version easier, it also requires more resources and more awareness as it has more chance of a disruption, requiring more resources;
on the other hand, this makes versioning easier making it easier to debug and analyze
</p></li><li><p>pull-based CI/CD platforms is mostly similar except it will detect changes and apply them to the cluster;
while this is easier to apply new changes, it also makes it harder to analyze for future improvements
</p></li></ul></li></ul></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-06-07 18:21:19 +08:00\"","date_modified":"2021-07-20 18:11:06 +08:00","language":"en","source":""},"title":"SUSE Cloud native fundamentals scholarship program","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"lesson-1-and-2"},"children":[{"type":"text","value":"Lesson 1 and 2"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-1-and-2"},"children":[{"type":"text","value":"Lesson 1 and 2"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"lesson-3"},"children":[{"type":"text","value":"Lesson 3"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-3"},"children":[{"type":"text","value":"Lesson 3"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"lesson-4"},"children":[{"type":"text","value":"Lesson 4"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-4"},"children":[{"type":"text","value":"Lesson 4"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"lesson-5"},"children":[{"type":"text","value":"Lesson 5"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/literature.suse-cloud-native-fundamentals-scholarship-program#lesson-5"},"children":[{"type":"text","value":"Lesson 5"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A course from Udacity with SUSE from their scholarship program.\nIf you're interested in the exercises for other solutions, see "},{"type":"element","tagName":"a","properties":{"href":"/challenges.suse-cloud-native-fundamentals-scholarship-program"},"children":[{"type":"text","value":"Solutions to SUSE Cloud native fundamentals scholarship exercises"}]},{"type":"text","value":".\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Some things to keep in mind:\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Required to interact with the "},{"type":"element","tagName":"a","properties":{"href":"https://susecloudchallenge.slack.com/"},"children":[{"type":"text","value":"student community"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://sites.google.com/udacity.com/suse-cloud-native-foundations/home"},"children":[{"type":"text","value":"Hub for all course-related information"}]}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"lesson-1-and-2"},"children":[{"type":"text","value":"Lesson 1 and 2"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There is a dedicated organization for cloud-related called the Cloud Native Computing Foundation (CNCF).\n Among the list of project