<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jan Egil Ring | powershell.no</title>
    <description>Jan Egil Ring`s blog about automation, DevOps and IT technologies
</description>
    <link>http://www.powershell.no/</link>
    <atom:link href="http://www.powershell.no/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Mon, 26 Oct 2026 05:23:28 +0000</pubDate>
    <lastBuildDate>Mon, 26 Oct 2026 05:23:28 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Introduction to Red Hat OpenShift Container Platform</title>
        <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;Having worked with Kubernetes for some time, as well as Red Hat Enterprise Linux, I was eager to learn more about Red Hat’s container product - Red Hat OpenShift Container Platform (OCP).&lt;/p&gt;

&lt;p&gt;It is part of Red Hat’s containernization software family OpenShift, and based on Kubernetes.&lt;/p&gt;

&lt;p&gt;In this post, I am going to share my perspectives based on my learnings so far.&lt;/p&gt;

&lt;h2 id=&quot;architecture-and-core-concepts&quot;&gt;Architecture and core concepts&lt;/h2&gt;

&lt;p&gt;Based on Kubernetes - the defacto standard for orchestrating containers - OpenShift Container Platform adds additional functionality and features.
It is based on Red Hat Enterprise Linux CoreOS as the foundational operating system for the control plane and worker nodes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-architecture.png&quot; alt=&quot;alt&quot; height=&quot;483px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://docs.openshift.com/container-platform/4.10/welcome/oke_about.html&quot;&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just like Kubernetes, it supports deployment to a variety of targets:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Physical servers&lt;/li&gt;
  &lt;li&gt;Virtual machines&lt;/li&gt;
  &lt;li&gt;Private Cloud&lt;/li&gt;
  &lt;li&gt;Public Cloud&lt;/li&gt;
  &lt;li&gt;Edge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The deployment process for manual installations might be more complex compared to the other options. Ben Weissman have a course on Pluralsight I can recommend - &lt;a href=&quot;https://app.pluralsight.com/library/courses/openshift-getting-started/table-of-contents&quot;&gt;Getting Started with OpenShift 4&lt;/a&gt;, which goes through the requried steps.&lt;/p&gt;

&lt;p&gt;The easiest way to get started is probably using a public cloud offering, such as &lt;a href=&quot;https://azure.microsoft.com/en-us/services/openshift/#overview&quot;&gt;Azure Red Hat OpenShift&lt;/a&gt; - a highly available, fully managed OpenShift cluster on demand, monitored and operated jointly by Microsoft and Red Hat.&lt;/p&gt;

&lt;p&gt;The lifecycle of a Red Hat OCP cluster is described by Red Hat as follows:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-lifecycle.png&quot; alt=&quot;alt&quot; height=&quot;213px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://docs.openshift.com/container-platform/4.10/welcome/oke_about.html&quot;&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a cluster has been provisioned and is ready for use by developers - which we may see as the users of a clusters - Red Hat OCP have a lof of features making it easier to get started with less plumbing required as we can see in the following section.&lt;/p&gt;

&lt;h2 id=&quot;features&quot;&gt;Features&lt;/h2&gt;

&lt;h3 id=&quot;console&quot;&gt;Console&lt;/h3&gt;

&lt;p&gt;A web-based interface provided by the Red Hat OCP cluster that allows developers and administrators to interact with cluster resources.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-web-console.jpg&quot; alt=&quot;alt&quot; height=&quot;488px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;project&quot;&gt;Project&lt;/h3&gt;

&lt;p&gt;An OpenShift extension of Kubernetes’ namespaces, which allows the definition of user access control to cluster resources - providing an application or workload isolation from other resources in the same cluster.&lt;/p&gt;

&lt;h3 id=&quot;networking&quot;&gt;Networking&lt;/h3&gt;

&lt;p&gt;As with Kubernetes - the concept of services enables network access internally between pods in a cluster - and acts as an abstration layer on top of pods and deployments.&lt;/p&gt;

&lt;p&gt;External access is provided by resources called Routes. A route is an object describing DNS names and ports external to the cluster (potentially the internet) pointing to a service inside the cluster.
A router (the same as an ingress controller) is responsible for forwarding requests (HTTP and TLS) to the service addresses inside the Kubernetes SDN.&lt;/p&gt;

&lt;p&gt;OpenShift is by default leveraging &lt;a href=&quot;https://en.wikipedia.org/wiki/HAProxy&quot;&gt;HAProxy&lt;/a&gt; as its router.&lt;/p&gt;

&lt;p&gt;OpenShift relays on a wildcard DNS domain for exposing applications outside of the cluster. When installing a cluster, a name and a base DNS domain is provided. Both of these are used in the wildcard DNS domain for exposing applications:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.apps.&amp;lt;cluster_name&amp;gt;.&amp;lt;base_domain&amp;gt;.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.apps.ocp.powershell.no&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When exposing services as routes, the naming convention &lt;em&gt;route-name-project-name.default-domain&lt;/em&gt; is used:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc expose service wordpress&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However, this can be overriden if needed:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc expose service wordpress --name blog&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The routes can also be managed via the Web Console if desired:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-web-console-02.jpg&quot; alt=&quot;alt&quot; height=&quot;299px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;registry&quot;&gt;Registry&lt;/h3&gt;

&lt;p&gt;As oposed to Kubernetes, Red Hat OCP by default provides an internal container registry for storing and pulling container images from - eliminating the need for provisioning a registry ourselfes.&lt;/p&gt;

&lt;h3 id=&quot;continuous-integration-and-continuous-delivery&quot;&gt;Continuous integration and continuous delivery&lt;/h3&gt;

&lt;p&gt;Part of Red Hat OCP is OpenShift Pipelines, a continuous integration and continuous delivery (CI/CD) solution based on Kubernetes resources. It uses &lt;a href=&quot;https://tekton.dev&quot;&gt;Tekton&lt;/a&gt; building blocks to automate builds and deployments, which is running in isolated containers.&lt;/p&gt;

&lt;h3 id=&quot;source-to-image-s2i&quot;&gt;Source-to-Image (S2I)&lt;/h3&gt;

&lt;p&gt;This is a tool to make it possible for developers to deploy their applications from source code - without needing any knowledge about Dockerfiles or container images.&lt;/p&gt;

&lt;p&gt;Built on a base image - code from a specified Git repository is injected into image and a new image which can run the application is produced by a build pipeline. Several pre-built base images is available, and one may choose based on the language or framework being used in the application being built.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-s2i.jpg&quot; alt=&quot;alt&quot; height=&quot;225px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://cloud.redhat.com/blog/guide-to-openshift-pipelines-part-2-using-source-2-image-build-in-tekton&quot;&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although one might prefer to use traditional methods to build container images based on Dockerfiles, the S2I tool has a number of advantages:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;When the base image has been patched, for example due to a critical security issue, the S2I pipeline can be triggered to rebuild the application image using the updated base image - without the need for any actions from the developer.&lt;/li&gt;
  &lt;li&gt;No need for the developer to learn how to install required packages, such as yum install.&lt;/li&gt;
  &lt;li&gt;There is a shared ecosystem of base images where customizations, scripts and other artifacts can be shared across organizations&lt;/li&gt;
  &lt;li&gt;Efficiency - a large number of complex operations can be performed by the build process, resulting in smaller images with fewer layers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When leveraging S2I, a BuildConfig where the source (typically a Git repository) is defined is being deployed in the current project along with an ImageStream to track the built images, a DeploymentConfig to create updated images when there are changes either to the base image or the source code, a Service to expose the application inside the cluster and optionally a Route to expose it externally.&lt;/p&gt;

&lt;h3 id=&quot;the-red-hat-openshift-container-platform-command-line-tool&quot;&gt;The Red Hat OpenShift Container Platform Command-line Tool&lt;/h3&gt;

&lt;p&gt;While it is possible to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt; to interact with the API server, the recommended way is to use oc command-line tool.&lt;/p&gt;

&lt;p&gt;Similar to the way &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podman&lt;/code&gt; has mostly the same syntax and sub commands as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc&lt;/code&gt; is very similar to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Examples of basic usage:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc login &amp;lt;clusterUrl&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc get pods&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The main reason one should use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc&lt;/code&gt; over &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt; when working with Red Hat OCP clusters is being able to manage OCP-specific functionality.&lt;/p&gt;

&lt;p&gt;One of the most important ones being the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc new-app&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;This command can create application pods to run on OpenShift in many different ways. It can create deployments from Docker images, from Dockerfiles, and from raw source code using the Source-to-Image (S2I) process as mentioned previously.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc new-app --help&lt;/code&gt; will show the different options available for creating new applications on OpenShift.&lt;/p&gt;

&lt;p&gt;Some examples:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc new-app --docker-image=registry.com/contoso/app1 --name=app1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc new-app https://github.com/openshift/ruby-hello-world --name=ruby-hello&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Alternativly, all of the deployment options is also available in the OpenShift web console.&lt;/p&gt;

&lt;h3 id=&quot;operators&quot;&gt;Operators&lt;/h3&gt;

&lt;p&gt;Operators is a core Kubernetes concept, which is essentially a “Desired State” mechanism where a controller makes sure that the resources used by the managed application such as pods, services and persistent volumes are configured and running as desired. If not, the operator will take actions to remediate the issue. The Operators are also typically embedded with knowledge of the application by the vendor, so known issues can potentially be remediated without human involvement.&lt;/p&gt;

&lt;p&gt;Red Hat OCP leverages Operators to run its entire platform in an autonomous fashion while exposing the configuration through Kubernetes objects.&lt;/p&gt;

&lt;p&gt;Built-in is also an embedded OperatorHub, which contains multiple sources:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Red Hat Operators - Red Hat products certified and supported by Red Hat&lt;/li&gt;
  &lt;li&gt;Certified Operators - products packaged and supported by independent software vendors (ISVs)&lt;/li&gt;
  &lt;li&gt;Community Operators - Operators from https://github.com/operator-framework/community-operators which can be optionally enabled&lt;/li&gt;
  &lt;li&gt;Custom Operators - created by yourself&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;common-infrastructure&quot;&gt;Common infrastructure&lt;/h3&gt;

&lt;p&gt;Management tools such as the console and API is part of a common Red Hat infrastucture.&lt;/p&gt;

&lt;p&gt;Building on the previous topic of Operators, Red Hat OpenShift Virtualization is a great example of leveraging common infrastructure. It is an Operator based on KubeVirt - a Kubernetes Virtualization technology that makes it possible to run and manage VMs side-by-side with containers. These VMs can be managed both as regular Kubernetes objects via the API as well as via the console:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-vm-virtualization-02.jpeg&quot; alt=&quot;alt&quot; height=&quot;258px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://www.redhat.com/en/technologies/cloud-computing/openshift/virtualization&quot;&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under the hood it is leveraging Linux Kernel-based Virtual Machine (KVM), a Linux Kernel hypervisor, within a container.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022-07-31-rh-ocp-vm-virtualization.png&quot; alt=&quot;alt&quot; height=&quot;211px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Image credit: &lt;a href=&quot;https://www.redhat.com/en/technologies/cloud-computing/openshift/virtualization&quot;&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes it possible to run both modernized container workloads and classic workloads which haven’t or for some reason can’t be containerized - in the same environment.&lt;/p&gt;

&lt;h3 id=&quot;monitoring-and-logging&quot;&gt;Monitoring and logging&lt;/h3&gt;

&lt;p&gt;Red Hat OCP includes a pre-configured, pre-installed, and self-updating monitoring stack that provides monitoring for core platform components. This is based on the Prometheus open source project and its wider eco-system.&lt;/p&gt;

&lt;p&gt;A set of alerts are included by default that can immediately notify cluster administrators about issues within a cluster. Default dashboards in the web console include visual representations of cluster metrics.&lt;/p&gt;

&lt;p&gt;It is also possible to enable monitoring for user-defined projects, but unlike the core cluster resources - this is not enabled by default.&lt;/p&gt;

&lt;h1 id=&quot;learning-resources&quot;&gt;Learning resources&lt;/h1&gt;

&lt;p&gt;In order to get an understanding of Red Hat OCP, I went through the course &lt;a href=&quot;https://rol.redhat.com/rol/app/courses/do180vc-4.10&quot;&gt;DO180 Red Hat OpenShift I: Containers &amp;amp; Kubernetes&lt;/a&gt;. This is highly recommended if you aim to get deeper knowledge and some hands-on experience.&lt;/p&gt;

&lt;p&gt;The goal for me in addition to getting hands-on experience was taking the &lt;a href=&quot;https://www.redhat.com/en/services/training/ex180-red-hat-certified-specialist-containers-kubernetes-exam?section=Overview&quot;&gt;EX180 Red Hat Certified Specialist in Containers and Kubernetes exam&lt;/a&gt;, which has the following objectives:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Implement images using Podman&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Understand and use FROM (the concept of a base image) instruction.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use RUN instruction.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use ADD instruction.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use COPY instruction.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand the difference between ADD and COPY instructions.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use WORKDIR and USER instructions.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand security-related topics.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand the differences and applicability of CMD vs. ENTRYPOINT instructions.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand ENTRYPOINT instruction with param.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand when and how to expose ports from a Docker file.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use environment variables inside images.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand ENV instruction.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand container volume.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Mount a host directory as a data volume.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand security and permissions requirements related to this approach.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand lifecycle and cleanup requirements of this approach.&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Manage images&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Understand private registry security.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Interact with many different registries.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Understand and use image tags.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Push and pull images from and to registries.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Back up an image with its layers and meta data vs. backup a container state.&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Run containers locally using Podman&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Get container logs.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Listen to container events on the container host.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Use Podman inspect.&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Basic OpenShift knowledge&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Creating applications in OpenShift&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Create, manage and delete projects from a template, from source code, and from an image.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Customize catalog template parameters.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Specifying environment parameters.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Expose public applications.&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Troubleshoot applications in OpenShift&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Understand the description of application resources.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Get application logs.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Inspect running applications.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Connecting to containers running in a pod.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Copy resources to/from containers running in a pod.&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found the course to be really well. Getting to start locally on a workstation using podman and creating Dockerfiles (or Containerfiles, as they are called in Red Hat/podman terminology) - evolving the same application to be built highly available in an OpenShift cluster is very useful in order to understand how everything works.&lt;/p&gt;

&lt;p&gt;If you do not have access to a Red Hat Learning Subscription with access to their courses, an alternative to get hands-on experience is to set up &lt;a href=&quot;https://developers.redhat.com/products/openshift-local/getting-started&quot;&gt;Red Hat OpenShift Local&lt;/a&gt; (formerly Red Hat CodeReady Containers) on your local computer.&lt;/p&gt;

&lt;p&gt;Another alternative is the &lt;a href=&quot;https://developers.redhat.com/developer-sandbox&quot;&gt;OpenShift Sandbox&lt;/a&gt;, which provides 30 days of free access to an OpenShift cluster.&lt;/p&gt;

&lt;p&gt;Back to the exam, I did pass on my first attempt (a score of 269 of 300, where the minimum required is 210). However, time management is critical as usual in these hands-on exams where you get access to a virtual machine where all you have is a browser windows with the assignments as well as a terminal. Being stuck on one of the initial tasks really puts pressure on you, and while I was doubtful during the first 30 minutes - I managed to pull it off at the end.&lt;/p&gt;
&lt;h3 id=&quot;tips-and-tricks&quot;&gt;Tips and tricks&lt;/h3&gt;

&lt;p&gt;One neat trick I learned from the DO180 course was the idea of bringing local tooling into containers during troubleshooting.
I suppose you also have been in a situation where you are opening a terminal session against a container for diagnosing some problem, for example related to networking. Next, you find that basic tools like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ping&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nslookup&lt;/code&gt; is missing. On the smallest images, even tools like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt; may be left out in order to minimize the size of the image.&lt;/p&gt;

&lt;p&gt;The trick suggested in the course is to temporarily access some of these missing commands by mounting the host binaries folders, such as /bin, /sbin, and /lib, as volumes inside the container:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podman run -it -v /bin:/bin image /bin/bash&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;Having seen and experienced the additional value Red Hat brings to the table on top of vanilla Kubernetes has been very interesting, such as learning about the Source-to-Image (S2I) feature.&lt;/p&gt;

&lt;p&gt;Especially for those already in the Red Hat ecosystem - it should be a no-brainer on which container platform to choose.&lt;/p&gt;

&lt;p&gt;For others, your mileage may vary as always - everyone has different needs and requirements. Regardless, I will for sure bring this alternative to the table in my container workshops.&lt;/p&gt;

&lt;h2 id=&quot;useful-resources&quot;&gt;Useful resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://lzone.de/cheat-sheet/Openshift&quot;&gt;OpenShift Command-line Tool cheat sheet&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.mastertheboss.com/soa-cloud/openshift/openshift-cheatsheet/&quot;&gt;Openshift Container Platform cheat sheet for System Administrators and Developers&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector&quot;&gt;Visual Studio Code Extension: OpenShift Connector&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=redhat.vscode-tekton-pipelines&quot;&gt;Visual Studio Code Extension: Tekton Pipelines (used for S2I)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=Kx110kqoHo0&quot;&gt;Deploying a Windows Server 2019 virtual machine using OpenShift virtualization&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.openshift.com/container-platform/4.10/cicd/pipelines/understanding-openshift-pipelines.html&quot;&gt;Understanding OpenShift Pipelines&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.openshift.com/container-platform/4.10/windows_containers/index.html&quot;&gt;Red Hat OpenShift support for Windows Containers overview&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.openshift.com/container-platform/4.10/virt/logging_events_monitoring/virt-openshift-cluster-monitoring.html&quot;&gt;OpenShift Container Platform cluster monitoring, logging, and Telemetry&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://cloud.redhat.com/blog/a-guide-to-controller-ingress-for-azure-red-hat-openshift&quot;&gt;A Guide to Ingress Controllers for Azure Red Hat OpenShift&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Mon, 01 Aug 2022 13:00:00 +0000</pubDate>
        <link>http://www.powershell.no/linux,/containers,/devops/2022/08/01/red-hat-openshift.html</link>
        <guid isPermaLink="true">http://www.powershell.no/linux,/containers,/devops/2022/08/01/red-hat-openshift.html</guid>
        
        
        <category>Linux,</category>
        
        <category>containers,</category>
        
        <category>DevOps</category>
        
      </item>
    
      <item>
        <title>How To Get Started with VS Code Development containers</title>
        <description>&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;

&lt;p&gt;When working with code, whether it is software, Infrastructure as Code or other purposes, there are some common challenges.
One of them is the lead time for onboarding new members to a team or a project, due to prerequisites needed for the tasks the new person will be working on.&lt;/p&gt;

&lt;p&gt;In this article, we will use the Infrastructure as Code and cloud automation as our main scenario.&lt;/p&gt;

&lt;p&gt;The specific tools needed will of course vary from project to project, but some common ones might be Terraform for declarative configurations, PowerShell for scripting and administrative tasks and VS Code as an editor. Along with these example stack of tools comes additional prerequisites, such as VS Code extensions, PowerShell modules, linting tools and so on. Lastly, there are different versions of the tools mentioned as well as the related prerequisites such as PowerShell modules and various libraries.&lt;/p&gt;

&lt;p&gt;Another aspect is that people use different platforms, such as Linux, macOS and Windows. Even when using the same operating system, there might be differences related to versions and patch levels.&lt;/p&gt;

&lt;p&gt;In the end, there is a whole lot of variations which can make it very challenging to have a consistent development environment.&lt;/p&gt;

&lt;p&gt;This is not a problem new to the world of software and infrastructure. Container technologies was born with these exact challenges as one of their main tasks to solve. Portability, being able to run the software consistently across different environments such as on-premises or different cloud vendors, is another advantage containers brings to the table.&lt;/p&gt;

&lt;p&gt;So how can containers assist with the development environment challenges discussed above? What if we could leverage containers and host each project we are working on in VS Code inside a fully isolated environment?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/zGqoi2Z.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;https://www.docker.com/resources/what-container&quot;&gt;Docker&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this guide, you will learn how to set up VS Code development containers - which makes this possible:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/GuWn0Ms.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image credit: &lt;a href=&quot;https://code.visualstudio.com/docs/remote/containers&quot;&gt;Microsoft&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you’re finished, you’ll be able to leverage dev containers both for your personal projects as well as for team projects and have a consistent development environment.&lt;/p&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;Before you begin this guide you’ll need the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A computer running either Linux, macOS or Windows&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.docker.com/products/docker-desktop&quot;&gt;Docker Desktop&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://code.visualstudio.com&quot;&gt;Visual Studio Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-1--install-the-visual-studio-code-remote---containers-extension&quot;&gt;Step 1 — Install the Visual Studio Code Remote - Containers extension&lt;/h2&gt;

&lt;p&gt;The first thing we are going to do after installing the prerequisites is to install the VS Code Remote - Containers extension.&lt;/p&gt;

&lt;p&gt;Open VS Code and navigate to the Extensions item in the sidebar. Next, search for “remote containers”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/nWNiYNh.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on “Remote - Containers” and click the Install button which becomes available after clicking on the button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; &lt;em&gt;Alternatively, you may install the “Remote Development” extension pack at the bottom of the above screenshot. This contains the “Remote - Containers” extension as well as two other very useful extensions: “Remote SSH” for connecting to remote SSH targets as well as “Remote - WSL” which makes it very convenient to work with the Windows Subsystem for Linux from VS Code on Windows.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-2--create-a-new-folder&quot;&gt;Step 2 — Create a new folder&lt;/h2&gt;

&lt;p&gt;Create a new, empty folder with the purpose of creating your first dev container. Open that folder in VS Code.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd ~
mkdir myfirstdevcontainer
code .\myfirstdevcontainer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/zWHDogO.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Select “Yes, I trust the authors” when the new empty folder is being opened in VS Code.&lt;/p&gt;

&lt;p&gt;We are now ready to create our first dev container.&lt;/p&gt;

&lt;h2 id=&quot;step-3--create-a-dev-container&quot;&gt;Step 3 — Create a dev container&lt;/h2&gt;

&lt;p&gt;Open the &lt;a href=&quot;https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette&quot;&gt;Command pallette&lt;/a&gt; in VS Code by using Ctrl+Shift+P (Linux/Windows) or Cmd+Shift+P (macOS) and search for Remote Containers&lt;/p&gt;

&lt;p&gt;Choose &lt;em&gt;Add Development Container Configuration Files&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A number of templates is available. You may choose the one you want, but for this demo we will be using the Ubuntu template:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/GZcQLkp.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, we will use the focal distro for our testing purposes:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/MZSmqqN.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, we may choose to install additional tools into our new container image. Here are the ones I chose:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/z2yjCnV.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click Ok when finished.&lt;/p&gt;

&lt;p&gt;Next, we will be prompted which version of the tools we selected we want to install. In a real world scenario, we would typically pin specific versions for consistency and stability. For this demo, I chose &lt;strong&gt;latest&lt;/strong&gt; for all prompts.&lt;/p&gt;

&lt;p&gt;At the end, we should now automatically get a subfolder called .devcontainer along with two files: devcontainer.json and Dockerfile:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/z9HhbVY.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This folder is typically stored at the root of a source control repository, hence it becomes available for all other people who have cloned the repository.&lt;/p&gt;

&lt;h1 id=&quot;step-4---open-the-newly-created-dev-container&quot;&gt;Step 4 - Open the newly created dev container&lt;/h1&gt;

&lt;p&gt;When VS Code detects the two files we created in the previous step at the root of a folder, it will prompt whether we want to “Reopen in Container”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/MryErHW.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Should the “Remote - Containers” extension not be installed, you will be prompted to install it.&lt;/p&gt;

&lt;p&gt;An alternative approach to reopen the current folder inside the dev container is to once again open the Command pallette and search for Remote Containers. Next, select “Reopen in Container”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/72WNZUT.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;VS Code will now reopen and the following status will be shown:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/hGfFjsX.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Under the hood, the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker build&lt;/code&gt; is now being run against the Dockerfile we created previously. This will result in a local container image becoming available on our machine.&lt;/p&gt;

&lt;p&gt;The build step might take from a few seconds until a few minutes depending upon the size of the base image we chose, the number of tools to install, the bandwidth of our internet connection as well as the performance of the local machine.&lt;/p&gt;

&lt;p&gt;The build step is only needed whenever a change has been made to the configuration files for the development container, so the next time you open the folder inside the dev container, it will typically open in seconds - similar to when opening a regular local folder.&lt;/p&gt;

&lt;h1 id=&quot;step-5---using-the-dev-container&quot;&gt;Step 5 - Using the dev container&lt;/h1&gt;

&lt;p&gt;When the build process has completed, you should see the folder opened in the VS Code file explorer as usual. The difference is that it is now opened within the dev container, which is indicated here:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/rANmKHB.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can click on the green “Dev Container” button to bring up a menu with relevant options such as reopening the folder locally and so on:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/Mi6Ao4V.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, let us explore how extensions comes into play when working with dev containers. Navigate to the Extensions item on the sidebar. You should see the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/lhNjWL3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This means we can have separate VS Code extensions per container, and we don`t have to “clutter” our local VS Code instance with numerous extensions (which may also decrease performance/load times).&lt;/p&gt;

&lt;p&gt;To install extensions inside the dev container, simply search and install them from the extensions item as usual. In this example, I will go ahead and install the PowerShell extension by clicking Install on the bottom recommandation.&lt;/p&gt;

&lt;p&gt;After installing the PowerShell extension, I will go ahead and create the file test.ps1 in the root of the myfirstdevcontainer folder. When opening the file in the editor, the PowerShell extension kicks in and opens the PowerShell Integrated Console automatically:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/cI7F4zx.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You are now ready to start using PowerShell inside your newly created dev container.&lt;/p&gt;

&lt;p&gt;If you are not a PowerShell user, feel free to explore the use of the tools you use.&lt;/p&gt;

&lt;h2 id=&quot;6---gotchas&quot;&gt;6 - Gotchas&lt;/h2&gt;

&lt;h3 id=&quot;operating-system&quot;&gt;Operating system&lt;/h3&gt;

&lt;p&gt;A major difference if you are Windows user, is that PowerShell is now running inside a Linux container:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/nKVTZOQ.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;One option could be swapping the base image to for example the mcr.microsoft.com/powershell:lts-7.2.0-windowsserver-ltsc2022 image which can be found on &lt;a href=&quot;https://hub.docker.com/_/microsoft-powershell&quot;&gt;Docker Hub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Unfortunately, Windows-based images is not supported (at the time of this writing) for use in the VS Code Dev container extension.&lt;/p&gt;

&lt;p&gt;However, in this modern world of cloud infrastructure, basic Linux administration is becoming a more and more an relevant skill. Personally, I went through a learning journey in the past couple of years - ending with the &lt;strong&gt;LFCS: Linux Foundation Certified Systems Administrator&lt;/strong&gt; certification. You can read more about my journey in &lt;a href=&quot;https://www.powershell.no/linux,/powershell,/devops/2021/02/25/learning-linux.html&quot;&gt;this article&lt;/a&gt; on my personal blog.&lt;/p&gt;

&lt;h3 id=&quot;containers-are-stateless&quot;&gt;Containers are stateless&lt;/h3&gt;

&lt;p&gt;By nature, containers are stateless. This means that all changes performed inside the container is lost when the container stops and starts. The solution to this is mounting persistent data volumes inside the container.&lt;/p&gt;

&lt;p&gt;This is something the VS Code extension handles for us automatically when it comes to the project folder we reopened from the local computer:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/4u1Gm9v.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This means that all data inside this folder will persist, but if you place data in other folders - they will be lost.
Also, if you install software inside the container manually - they will also be gone the next time the container image is rebuilt. If you want to install something persistently, the solution is to add the installation command to the Dockerfile and rebuild the container.&lt;/p&gt;

&lt;p&gt;In addition to mounting folders from the local machine like the VS Code extension does automatically for the project folder, it is possible to both add additional bind mounts as well as create docker volumes for persistent storage.&lt;/p&gt;

&lt;p&gt;You can read more about this in the &lt;a href=&quot;https://docs.docker.com/storage/&quot;&gt;Docker documentation&lt;/a&gt; as well as the &lt;a href=&quot;https://code.visualstudio.com/remote/advancedcontainers/add-local-file-mount&quot;&gt;VS Code documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;7---under-the-hood&quot;&gt;7 - Under the hood&lt;/h2&gt;

&lt;p&gt;Let us have a deeper look at the two configuration files that the VS Code extension created for us in the previous steps.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;devcontainer.json&lt;/code&gt; contains the settings for the VS Code - Remote Containers extension:&lt;/p&gt;
&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Ubuntu&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;dockerfile&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Dockerfile&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Update&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&apos;VARIANT&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;pick&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;an&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Ubuntu&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;version:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;hirsute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;focal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;bionic&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Use&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;hirsute&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;or&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;bionic&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;arm&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;/Apple&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Silicon.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;args&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VARIANT&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;focal&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Set&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;*default*&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;specific&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;settings.json&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;create.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;settings&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;


	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;IDs&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;extensions&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;you&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;want&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;installed&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;when&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;is&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;created.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;extensions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Use&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&apos;forwardPorts&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;make&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;ports&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;inside&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;available&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;locally.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;forwardPorts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Use&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&apos;postCreateCommand&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;to&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;commands&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;after&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;is&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;created.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;postCreateCommand&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;uname -a&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

	&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Comment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;out&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;instead.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;More&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;info:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;https://aka.ms/vscode-remote/containers/non-root.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;remoteUser&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;vscode&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;features&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;kubectl-helm-minikube&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;latest&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;terraform&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;latest&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;github-cli&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;latest&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;azure-cli&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;latest&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
		&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;powershell&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;latest&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
	&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As we can see, we can customize it further by adding extensions for example. If adding the id of the PowerShell extension (ms-vscode.PowerShell) to the “extensions” property in the json-file - it will get installed automatically when the image is built.&lt;/p&gt;

&lt;p&gt;Here is an example for the extensions I typically use in my Infrastructure as Code dev containers:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;	&quot;extensions&quot;: [&quot;ms-vscode.powershell&quot;,&quot;ms-vscode.azure-account&quot;,&quot;hashicorp.terraform&quot;,&quot;takumii.markdowntable&quot;,&quot;ms-kubernetes-tools.vscode-kubernetes-tools&quot;,&quot;ms-kubernetes-tools.vscode-aks-tools&quot;],
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next is the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dockerfile&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-dockerfile highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.205.2/containers/ubuntu/.devcontainer/base.Dockerfile&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# [Choice] Ubuntu version (use hirsuite or bionic on local arm64/Apple Silicon): hirsute, focal, bionic&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;ARG&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; VARIANT=&quot;hirsute&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# [Optional] Uncomment this section to install additional OS packages.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# RUN apt-get update &amp;amp;&amp;amp; export DEBIAN_FRONTEND=noninteractive \&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#     &amp;amp;&amp;amp; apt-get -y install --no-install-recommends &amp;lt;your-package-list-here&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you have worked with containers before, there is nothing special about this file. It is a regular Dockerfile which you can define as you want. In our example, we happened to use a predefined base-image - but we could choose to replace this with your own image. For example, you can choose to use the official PowerShell image as a base - which I actually do for a few of my own dev containers:&lt;/p&gt;

&lt;div class=&quot;language-dockerfile highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; mcr.microsoft.com/powershell:7.2.1-ubuntu-focal&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;apt-get update &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; upgrade

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;apt-get update &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;azure-cli

&lt;span class=&quot;k&quot;&gt;SHELL&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; [&quot;pwsh&quot;, &quot;-Command&quot;, &quot;$ErrorActionPreference = &apos;Stop&apos;; $ProgressPreference = &apos;SilentlyContinue&apos;;&quot;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;Install-Module PSDepend &lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;COPY&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; [&quot;powershell/requirements.psd1&quot;, &quot;/tmp/requirements.psd1&quot;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;Invoke-PSDepend /requirements.psd1 &lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;az aks install-cli &lt;span class=&quot;nt&quot;&gt;--install-location&lt;/span&gt; /usr/local/bin/kubectl &lt;span class=&quot;nt&quot;&gt;--kubelogin-install-location&lt;/span&gt; /usr/local/bin/kubelogin &lt;span class=&quot;nt&quot;&gt;--client-version&lt;/span&gt; 1.22.0

&lt;span class=&quot;c&quot;&gt;# Switch to non-root user:&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;useradd &lt;span class=&quot;nt&quot;&gt;--create-home&lt;/span&gt; vscode
&lt;span class=&quot;k&quot;&gt;WORKDIR&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; /home/vscode&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;USER&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; vscode&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;Install-Module &lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt; oh-my-posh &lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;RUN &lt;/span&gt;Install-Module &lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt; PSReadLine &lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-AllowPreRelease&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As you can see, I also install the PSDepend PowerShell module in order to install a set of pre-defined PowerShell modules as defined in requirements.psd1.&lt;/p&gt;

&lt;p&gt;Alternatively, you may install PowerShell modules the regular way using Install-Module as seen on the last two lines in the Dockerfile.&lt;/p&gt;

&lt;p&gt;Or of course any package you need using apt-get or the relevant package manager/setup file for the software you need.&lt;/p&gt;

&lt;h2 id=&quot;8---tips-and-tricks&quot;&gt;8 - Tips and tricks&lt;/h2&gt;

&lt;h3 id=&quot;1---personalizing-the-environment-with-dotfile-repositories&quot;&gt;1 - Personalizing the environment with dotfile repositories&lt;/h3&gt;

&lt;p&gt;As stated in the &lt;a href=&quot;https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories&quot;&gt;documentation&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Dotfiles are files whose filename begins with a dot (.) and typically contain configuration information for various applications. Since development containers can cover a wide range of application types, it can be useful to store these files somewhere so that you can easily copy them into a container once it is up and running.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;A common way to do this is to store these dotfiles in a GitHub repository and then use a utility to clone and apply them. The Remote - Containers extension has built-in support for using these with your own containers. If you are new to the idea, take a look at the different dotfiles bootstrap repositories that exist.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For PowerShell users, a tip for having a synchronized PowerShell profile across machines and containers is using a GitHub Gist like PowerShell team member Steve Lee describes is the article &lt;a href=&quot;https://devblogs.microsoft.com/powershell/optimizing-your-profile/&quot;&gt;Optimizing your $Profile&lt;/a&gt;.
For anyone interested, my profile is available in &lt;a href=&quot;https://gist.github.com/janegilring/a4e366e6b01f0b70eae90557dfc9d21d&quot;&gt;this&lt;/a&gt; Gist.&lt;/p&gt;

&lt;h3 id=&quot;2---cpu-architectures&quot;&gt;2 - CPU architectures&lt;/h3&gt;

&lt;p&gt;I recently got a Mac with the new &lt;a href=&quot;https://support.apple.com/en-us/HT211814&quot;&gt;Apple silicon&lt;/a&gt; based CPU - also referred to as &lt;a href=&quot;https://en.wikipedia.org/wiki/ARM_architecture#ARMv8&quot;&gt;arm64 or ARMv8&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After trying to leverage amd64-based images defined in my existing dev-container files, it sort of worked. However, the performance was very poor and very noticeable when working interactively via the command line. I also experienced some occasianal errors regarding segmentation faults when building the Docker image for my dev-container. It mostly does work due to an emulation layer, but performance is expected to be significantly slower.
As this was not going to work in practice, I looked into changing the following into arm64-based versions:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;mcr.microsoft.com/dotnet/runtime:6.0.1-focal-arm64v8&quot;&gt;Docker image&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/PowerShell/PowerShell/releases/download/v7.2.1/powershell-7.2.1-linux-arm64.tar.gz&quot;&gt;PowerShell&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v7.5.1/posh-linux-arm64&quot;&gt;oh-my-posh&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://packages.microsoft.com/repos/azure-cli/dists/focal/Contents-arm64.gz&quot;&gt;Azure CLI&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://releases.hashicorp.com/terraform/1.1.4/terraform_1.1.4_darwin_arm64.zip&quot;&gt;Terraform&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After rebuilding and testing the updated dev-container, performance was outstanding for interactive use. I have not conducted any performance tests, but at least the responsiveness and speed in interactive use was the fastest I have worked with.&lt;/p&gt;

&lt;p&gt;Fundamentally, amd64 cores are similar but arm64 have different cores for different tasks. arm64 is typically more efficient, both with regards to performance and energy use. However, due to the underlying differences, software must be compiled against the new architecture in order to run natively.&lt;/p&gt;

&lt;p&gt;All of the tooling I needed was available in arm64 editions, but not all software is. Hence, it is recommended to check arm64 availability for the software you are working with before trying to use it on the new Apple silicon.&lt;/p&gt;

&lt;p&gt;Another important aspect is team projects. It is becoming more and more common to have devcontainer-files in source control which everyone on a team or project can leverage for consistent development environments. Be aware of the CPU architecture challenge in this situation, in case team members are working on different hardware. One possible workaround to this challenge is to leverage a &lt;a href=&quot;https://leimao.github.io/blog/VS-Code-Development-Remote-Host-Docker/&quot;&gt;remote host&lt;/a&gt; or &lt;a href=&quot;https://docs.github.com/en/codespaces&quot;&gt;GitHub Codespaces&lt;/a&gt; for common projects if your team is working with amd64-based hardware and you are on arm64, for example.&lt;/p&gt;

&lt;h3 id=&quot;3---sharing-git-credentials-with-your-container&quot;&gt;3 - Sharing Git credentials with your container&lt;/h3&gt;

&lt;p&gt;Also from the &lt;a href=&quot;https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container&quot;&gt;documentation&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The Remote - Containers extension provides out of box support for using local Git credentials from inside a container.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the documentation, they will walk through the two supported options.&lt;/p&gt;

&lt;p&gt;I would encourage you to read through the &lt;a href=&quot;https://code.visualstudio.com/docs/remote/containers#_getting-started&quot;&gt;documentation&lt;/a&gt; for the &lt;em&gt;VS Code - Remote containers&lt;/em&gt; extension for additional information and configuration options you might want to customize.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;In this article you learned how to get started with VS Code Development containers.&lt;/p&gt;

&lt;p&gt;The extension makes it very convenient to perform development work inside a running container based on a standardized setup which can be shared across teams using regular source control.&lt;/p&gt;

&lt;p&gt;Now you can start using them both for your personal projects as well as team projects in order to benefit from consistent development environments.&lt;/p&gt;
</description>
        <pubDate>Mon, 31 Jan 2022 16:00:00 +0000</pubDate>
        <link>http://www.powershell.no/vscode,/docker,/containers,/productivity,/powershell/2022/01/31/how-to-get-started-with-vs-code-dev-containers.html</link>
        <guid isPermaLink="true">http://www.powershell.no/vscode,/docker,/containers,/productivity,/powershell/2022/01/31/how-to-get-started-with-vs-code-dev-containers.html</guid>
        
        
        <category>vscode,</category>
        
        <category>docker,</category>
        
        <category>containers,</category>
        
        <category>productivity,</category>
        
        <category>powershell</category>
        
      </item>
    
      <item>
        <title>Getting started with AWS from an Azure perspective</title>
        <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;In recent years I have been working with the Microsoft Azure cloud platform at many customers, and gained experience among several of the many services available.
As I have been expanding my horizon and learned new technologies such as containers (Docker and Kubernetes), Infrastructure as Code (Terraform) and operating systems (Linux) in the past couple of years - I also wanted to learn more about multiple cloud providers.
Not necessarily because I want to change my focus from Azure, but in order to gain more insight into other providers - and maybe get some hands-on and real world experiences as well.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-08_azure_aws.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As I have a couple of customers who are likely going into multi cloud scenarios with both Azure and AWS (for various reasons), I found it to be a good opportunity to spend time learn the basics of AWS and aim for a certification.
During my studies towards the &lt;strong&gt;&lt;a href=&quot;https://aws.amazon.com/certification/certified-solutions-architect-associate/&quot;&gt;AWS Certified Solutions Architect – Associate&lt;/a&gt;&lt;/strong&gt;, I made several interesting findings with regards to similarities and differences between Azure and AWS and wanted to share some of my perspective on this topic based on my study notes.&lt;/p&gt;

&lt;p&gt;In the Azure Application Architecture Guide, Microsoft has an &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/aws-professional/&quot;&gt;Azure for AWS professionals&lt;/a&gt; section, which contains comparisons between various services in Azure and AWS. The tables outlined in the sections below is sourced from that documentation, with my own observations at the end.&lt;/p&gt;

&lt;h2 id=&quot;compute&quot;&gt;Compute&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic Compute Cloud (EC2) Instances&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Virtual Machines&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Virtual servers allow users to deploy, manage, and maintain OS and server software. Instance types provide combinations of CPU/RAM. Users pay for what they use with the flexibility to change sizes.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Batch&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Batch&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Run large-scale parallel and high-performance computing applications efficiently in the cloud.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Auto Scaling&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Virtual Machine Scale Sets&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Allows you to automatically change the number of VM instances. You set defined metric and thresholds that determine if the platform adds or removes instances.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;VMware Cloud on AWS&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Azure VMware Solution&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Seamlessly move VMware-based workloads from your datacenter to Azure and integrate your VMware environment with Azure. Keep managing your existing environments with the same VMware tools you already know while you modernize your applications with Azure native services. Azure VMware Solution is a Microsoft service, verified by VMware, that runs on Azure infrastructure.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Parallel Cluster&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;CycleCloud&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Create, manage, operate, and optimize HPC and big compute clusters of any scale&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Auto Scaling in AWS manages standard EC2 instances, while VM Scale Sets in Azure manages scale set child virtual machines which uses a separate API than regular VMs. A new VM Scale Set feature called &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-orchestration-modes#what-has-changed-with-flexible-orchestration-mode&quot;&gt;Flexible orchestration mode&lt;/a&gt; is currently in Public preview, and provides orchestration features over standard Azure IaaS VMs, instead of scale set child virtual machines. Also, when you create a VM and add it to a Flexible scale set, you have full control over instance names within the Azure Naming convention rules.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Spread Placement Groups in AWS = Availability Sets in Azure&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;AWS has it’s own Linux distro: &lt;a href=&quot;https://aws.amazon.com/amazon-linux-2/&quot;&gt;Amazon Linux 2&lt;/a&gt;, which is an LTS Kernel tuned for better performance on Amazon EC2. Microsoft also have it’s own Linux distro, &lt;a href=&quot;https://github.com/microsoft/CBL-Mariner&quot;&gt;CBL-Mariner&lt;/a&gt;. However, it is not a general purpose distribution, but highly specialized for use internally in the Azure infrastructure. &lt;a href=&quot;https://blog.jreypo.io/2021/07/09/a-look-into-cbl-mariner-microsoft-internal-linux-distribution/?s=09&quot;&gt;This article&lt;/a&gt; contains more in-depth information. A quote:&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;CBL-Mariner follows the secure-by-default principle, most aspects of the OS have been built with an emphasis on security. It comes with a hardened kernel, signed updates, ASLR, compiler-based hardening and tamper-resistant logs amongst many features.
CBL-Mariner consumes limited disk and memory resources. The lightweight characteristics of CBL-Mariner also provides faster boot times and a minimal attack surface.
However, let’s make an important clarification: CBM-Mariner is not a general purpose Linux distro. Its purpose is to be used as an internal lightweight Linux distro for Microsoft’s engineering teams into the Azure infrastructure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;containers-and-container-orchestrators&quot;&gt;Containers and container orchestrators&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic Container Service (ECS), Fargate&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Container Instances&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Azure Container Instances is the fastest and simplest way to run a container in Azure, without having to provision any virtual machines or adopt a higher-level orchestration service.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic Container Registry&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Container Registry&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Allows customers to store Docker formatted images. Used to create all types of container deployments on Azure.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic Kubernetes Service (EKS)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Kubernetes Service (AKS)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Deploy orchestrated containerized applications with Kubernetes. Simplify monitoring and cluster management through auto upgrades and a built-in operations console. See AKS solution journey.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;App Mesh&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Service Fabric Mesh&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Having worked quite a bit with Kubernetes on Azure in the past year, it was interesting to see the mapping of the same services in AWS. Although I haven’t tested the AWS services in-depth yet, the only main difference I noticed during my studies was that AWS also offers an option to run containers on EC2 instance by leveraging an agent inside the VMs. The similar service in Azure, Container Instances, have a single option - which is to run the Container Instances on managed infrastructure - which means no VMs. Fargate provides a similar experience on the AWS side - where there are no EC2 instances to manage.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Container techology really provides major benefits when it comes to multi cloud architectures. A great example is showcased in &lt;a href=&quot;https://pulse.microsoft.com/nb-no/work-productivity-nb-no/na/fa2-recap-of-cloud-stories-from-norway-episode-3-onboarding-to-kubernetes-and-building-resilient-services-on-azure-in-nrk-content/&quot;&gt;the third episode of the “Cloud stories from Norway”&lt;/a&gt; videoshow. &lt;a href=&quot;https://en.wikipedia.org/wiki/NRK&quot;&gt;NRK&lt;/a&gt; - a Norwegian radio and television public broadcasting company and the largest media organization in Norway - shows how they run infrastructure across 2 cloud providers as well as their own datacenter by leveraging containers and Kubernetes.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;databases&quot;&gt;Databases&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Type&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS Service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure Service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Relational database&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;RDS&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;SQL Database, Database for MySQL, Database for PostgreSQL&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Managed relational database service where resiliency, scale, and maintenance are primarily handled by the platform.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;NoSQL / Document&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;DynamoDB, SimpleDB, Amazon DocumentDB&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Cosmos DB&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;A globally distributed, multi-model database that natively supports multiple data models: key-value, documents, graphs, and columnar.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Caching&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;ElastiCache&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Cache for Redis&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;An in-memory–based, distributed caching service that provides a high-performance store typically used to offload nontransactional work from a database.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Database migration&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Database Migration Service&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Database Migration Service&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Migration of database schema and data from one database format to a specific database technology in the cloud.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Amazon Aurora is a MySQL and PostgreSQL-compatible relational database part of the Amazon Relational Database Service. It was interesting to learn that this offering was initially developed and highly cloud optimized for internal use, and later offered to customers.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;networking&quot;&gt;Networking&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Area&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Cloud virtual networking&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Virtual Private Cloud (VPC)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Virtual Network&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Provides an isolated, private environment in the cloud. Users have control over their virtual networking environment, including selection of their own IP address range, creation of subnets, and configuration of route tables and network gateways.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Cross-premises connectivity&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;VPN Gateway&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;VPN Gateway&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Connects Azure virtual networks to other Azure virtual networks, or customer on-premises networks (Site To Site). Allows end users to connect to Azure services through VPN tunneling (Point To Site).&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;DNS management&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Route 53&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;DNS&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Manage your DNS records using the same credentials and billing and support contract as your other Azure services&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Route 53&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Traffic Manager&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;A service that hosts domain names, plus routes users to Internet applications, connects user requests to datacenters, manages traffic to apps, and improves app availability with automatic failover.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Dedicated network&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Direct Connect&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;ExpressRoute&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Establishes a dedicated, private network connection from a location to the cloud provider (not over the Internet).&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Load balancing&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Network Load Balancer&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Load Balancer&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Azure Load Balancer load balances traffic at layer 4 (TCP or UDP). Standard Load Balancer also supports [cross-region load balancing] (https://docs.microsoft.com/en-us/azure/load-balancer/cross-region-overview)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt; &lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Application Load Balancer&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Application Gateway&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Application Gateway is a layer 7 load balancer. It supports SSL termination, cookie-based session affinity, and round robin for load-balancing traffic.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;When creating a new Virtual Private Cloud in AWS - similar to a Virtual Network in Azure - unlike in Azure, there are no internet connectivity by default. An internet gateway will need to be created and attached to the desired subnets. An exception is the &lt;a href=&quot;https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html&quot;&gt;Default VPC and default subnets&lt;/a&gt;, which do have an Internet gateway configured and according to the documentation is “suitable for getting started quickly, and for launching public instances such as a blog or simple website”.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;In AWS, a subnet is tied to Availability Zone (note: subnet, not VPC). This is a key difference from Azure, where a Virtual Network including subnets spans across Availability Zones.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;In AWS, Security Group rules are based on ALLOWs and there is no concept of DENY when in comes to Security Groups. This means you cannot explicitly deny or blacklist specific ports via Security Groups, you can only implicitly deny them by excluding them in your ALLOWs list&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;In AWS, Security groups control inbound and outbound traffic for your instances (they act as a Firewall for EC2 Instances) while NACLs control inbound and outbound traffic for your subnets (they act as a Firewall for Subnets). In Azure, a Security Group can be bound to either a virtual machine network interface or a subnet. In addition, Azure have the concept of Deny in Security Groups.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Features in AWS Route53 is supported in Azure, but spread across multiple services such as Azure DNS, Azure Private DNS and Azure Traffic Manager.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;object-storage&quot;&gt;Object storage&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Simple Storage Services (S3)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Blob storage&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Object storage service, for use cases including cloud applications, content distribution, backup, archiving, disaster recovery, and big data analytics.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;virtual-machine-disks&quot;&gt;Virtual machine disks&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic Block Store (EBS)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;managed disks&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;SSD storage optimized for I/O intensive read/write operations. For use as high-performance Azure virtual machine storage.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;By default, an EC2 instance with an attached AWS Elastic Block Store (EBS) root volume will be deleted together when the instance is terminated. This differs from Azure, where both the OS-disk and data disks is kept when deleting a virtual machine.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;You can change EBS volumes on the fly, including the size and storage type. In Azure, a virtual machine must be shutdown in order to resize both the OS disk as well as data disks.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;EBS Multi Attach in AWS = Shared Disk in Azure, and is only supported  for io1/io2 tiers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;shared-files&quot;&gt;Shared files&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Elastic File System&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Files&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Provides a simple interface to create and configure file systems quickly, and share common files. Can be used with traditional protocols that access files over a network.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;My observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;AWS Transfer Family has AWS Transfer for FTP, FTPS and SFTP supporting LDAP, AD, Cognito and custom authentication mechanisms. Currently, there are no SFTP (and FTPS) protocol support for Azure storage, but according to &lt;a href=&quot;https://feedback.azure.com/forums/217298-storage/suggestions/33001027-sftp-and-ftps-protocol-support-for-azure-files?page=1&amp;amp;per_page=20&quot;&gt;this&lt;/a&gt; UserVoice item, Microsoft are working on this and will share their plans for this offering soon.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Lifecycle management is supported for EFS in AWS, but Files in Azure does not currently support this.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;AWS EFS supports Linux (NFS) only. For Windows, there is a separate service called Amazon FSx for Windows File Server - which is managed EC2 instances under the hood. Azure Files on the other hand, is a new implementation of SMB on the highly scalable Azure storage platform. Also, AWS’ offer is SSD-based only, whereas Azure Files is available in both premium (SSD) and standard (HDD) - which might make it more cost effective in certain scenarios.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;archiving-and-backup&quot;&gt;Archiving and backup&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;S3 Infrequent Access (IA)&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Storage cool tier&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Cool storage is a lower-cost tier for storing data that is infrequently accessed and long-lived.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;S3 Glacier, Deep Archive&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Storage archive access tier&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Archive storage has the lowest storage cost and higher data retrieval costs compared to hot and cool storage.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Backup&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Backup&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Back up and recover files and folders from the cloud, and provide offsite protection against data loss.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;hybrid-storage&quot;&gt;Hybrid storage&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Storage Gateway&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;StorSimple&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Integrates on-premises IT environments with cloud storage. Automates data management and storage, plus supports disaster recovery.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;DataSync&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;File Sync&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Azure Files can be deployed in two main ways: by directly mounting the serverless Azure file shares or by caching Azure file shares on-premises using Azure File Sync.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;bulk-data-transfer&quot;&gt;Bulk data transfer&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;AWS service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Azure service&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Import/Export Disk&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Import/Export&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;A data transport solution that uses secure disks and appliances to transfer large amounts of data. Also offers data protection during transit.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Import/Export Snowball, Snowball Edge, Snowmobile&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Data Box&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;Petabyte- to exabyte-scale data transport solution that uses secure data storage devices to transfer large amounts of data to and from Azure.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;miscellanous&quot;&gt;Miscellanous&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Observations&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Naming&lt;/strong&gt; of resources (such as virtual machines) is a bit different in AWS, as they do get automatic IDs (for example, i-10a64379) by default and there is no requirement to specify a name. However, one can optionally add tags such as Name - and it will appear in the Name column in the AWS portal.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Resource groups&lt;/strong&gt; are quite different in the two providers. Quote from the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/aws-professional/resources&quot;&gt;Resource management on Azure and AWS&lt;/a&gt; section in the Azure for AWS professionals:&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Both Azure and AWS have entities called “resource groups” that organize resources such as VMs, storage, and virtual networking devices. However, Azure resource groups are not directly comparable to AWS resource groups.While AWS allows a resource to be tagged into multiple resource groups, an Azure resource is always associated with one resource group. A resource created in one resource group can be moved to another group, but can only be in one resource group at a time. Resource groups are the fundamental grouping used by Azure Resource Manager.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Management interfaces&lt;/strong&gt;: Both cloud providers provides multiple interfaces including a web interface, REST APIs, command line utilities and templating capabilities, as one would expect. Personally, I was particularly interested in the AWS PowerShell module, which is structured into multiple sub-modules per service as with the Azure PowerShell module. To give an idea how the experience with the AWS PowerShell module looks like, here is a snippet from my initial explorations:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Set-AWSCredential&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AccessKey&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;get-from-lastpass&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-SecretKey&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;get-from-lastpass&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-StoreAs&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;janegilring-iam-user&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Set-AWSCredential&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProfileName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;janegilring-iam-user&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Set-DefaultAWSRegion&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Region&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;eu-north-1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Stockholm&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AWS.Tools.Common&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-Command&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-mod&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AWS.Tools.Common&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-AWSCredential&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ListProfileDetail&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AWS.Tools.Installer&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Install-AWSToolsModule&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AWS.Tools.EC2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AWS.Tools.S3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-AWSPowerShellVersion&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Get-AWSPowerShellVersion&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ListServiceVersionInfo&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Update-AWSToolsModule&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-CleanUp&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-AWSService&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$amiId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-SSMLatestEC2Image&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ami-windows-latest&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ImageName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Windows_Server-2019-English-Core-EKS_Optimized-1.17&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$instance&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;New-EC2Instance&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ImageId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$amiId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-InstanceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;t3.medium&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-SubnetId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$subnetId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-KeyName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;jerlabkeypair&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AssociatePublicIp&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$false&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-SecurityGroupId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$securityGroup&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;a href=&quot;https://docs.aws.amazon.com/powershell/latest/userguide/pstools-welcome.html&quot;&gt;AWS Tools for PowerShell&lt;/a&gt; was greatly enhanced after several former PowerShell team members joined AWS, where things like performance and memory usage was enhanced by modularizing the module into sub-modules per service as well as enabling auto-importing of the AWS.Tools cmdlets.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Infrastructure as Code&lt;/strong&gt;: Like Azure have it’s Azure Resource Manager templates (ARM templates), AWS have Cloudformation which describes your desired resources and their dependencies so you can launch and configure them together as a so-called stack. An overview from the &lt;a href=&quot;https://aws.amazon.com/cloudformation/&quot;&gt;documentation&lt;/a&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-08-CloudFormation.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Both ARM and Cloudformation leverages JSON (or alternatively YAML for Cloudformation), which can be cumbersome to work with.&lt;/p&gt;

&lt;p&gt;To mitigate this and make IaC easier to working, Azure created &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview&quot;&gt;Bicep&lt;/a&gt; - a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources.&lt;/p&gt;

&lt;p&gt;An alternative which many companies use for IaC is Terraform, which in addition to having providers for both AWS and Azure have many other providers - for example for Kubernetes. Contininuing on that example, one could provision a Kubernetes cluster in either cloud provider and use the Terraform Kubernetes provider to do configuration of Kubernetes specific elements inside the cluster after provisioning the infrastructure. This might make sense in many scenarios, especially in multi-cloud environments where the same underlying templating language can be used.&lt;/p&gt;

&lt;p&gt;On the DevOps side of things, similarly to Azure DevOps, which contains many services such as Azure Repos for source control and Azure Pipelines for Continuous Integration/Continous Deployment, AWS has the corresponding AWS Code Commit and AWS CodePipeline services.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Managed services&lt;/strong&gt;: Both providers have several managed service offerings, where customers can run services as PaaS. One such example is AWS Managed Active Directory and Azure Active Directory Domain Services, which provides similar capabilities.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;A successful cloud application will focus on five pillars of software quality: &lt;strong&gt;Cost optimization, Operational excellence, Performance efficiency, Reliability, and Security&lt;/strong&gt;.
Microsoft have the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/architecture/framework/&quot;&gt;Azure Well-Architected Framework&lt;/a&gt; to assess your architecture across these five pillars. Similarly, AWS have the &lt;a href=&quot;https://docs.aws.amazon.com/wellarchitected/latest/framework/wellarchitected-framework.pdf&quot;&gt;AWS Well-Architected Framework&lt;/a&gt;. Both of these is well worth reading, as they provide useful guidance and insights into the topics outlined.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lastly, I would like to recommend Mike Pfeiffer’s video &lt;a href=&quot;https://www.youtube.com/watch?v=m94tlNJCjSI&quot;&gt;
AWS for Azure Pros: The Ultimate AWS to Azure Service Comparison&lt;/a&gt;, which provides great insight into the foundational differences between the two providers. Having worked in AWS, as well as working a lot with Azure these days, Mike have a lot of useful insight to share.&lt;/p&gt;

&lt;h2 id=&quot;exam-tips&quot;&gt;Exam tips&lt;/h2&gt;

&lt;p&gt;How we learn the best varies from person to person. For me, a combination of video lectures and hands-on lab exploration works great.&lt;/p&gt;

&lt;p&gt;I started out following along on the project-focused &lt;a href=&quot;https://cloudskills.io/courses/aws-cloud-architect&quot;&gt;AWS Cloud Architect Bootcamp&lt;/a&gt; on CloudSkills.io earlier this year.&lt;/p&gt;

&lt;p&gt;When ramping up my studies, I went through Stephane Maarek’s online course &lt;a href=&quot;https://www.udemy.com/course/aws-certified-solutions-architect-associate-saa-c02&quot;&gt;AWS Certified Solutions Architect Associate 2021&lt;/a&gt; (on a 1.5x speed). This was a great asset, where I performed lab explorations while following along. It was also convenient that the course is available via the Udemy app, so I could watch through some lectures when I found a spare moment.&lt;/p&gt;

&lt;p&gt;Another useful resource was the &lt;a href=&quot;https://github.com/keenanromain/AWS-SAA-C02-Study-Guide&quot;&gt;AWS SAA-C02 Study Guide&lt;/a&gt; by Keenan Romain. This guide contains a lot of compressed information about the various exam objectives.&lt;/p&gt;

&lt;p&gt;The last tip is to go through a number of practice exams. I did not manage to find time for that before taking the exam after a couple of intense weeks of studies, but I have seen many people recommend the exams from &lt;a href=&quot;https://portal.tutorialsdojo.com/courses/aws-certified-solutions-architect-associate-practice-exams/&quot;&gt;Tutorials Dojo&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;I &lt;a href=&quot;https://www.credly.com/badges/834d9c2d-d60e-4f0d-a8da-f978ea131efe/linked_in&quot;&gt;passed&lt;/a&gt; the exam, and it has been very interesting to learn more about the similarities and differences between Azure and AWS during my exam studies. Even if working with one primary cloud provider, I think it is useful to get to know at least the basics and what capabilities other providers have. Also, given that more and more companies is moving towards multi cloud infrastructures, you might be facing such scenario sooner rather than later. Reasons for this can be many, such as company mergings or strategic decisions to spread the risk across providers for enhanced business continuity.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-08-AWS-SolArchitect-Associate.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 01 Aug 2021 13:00:00 +0000</pubDate>
        <link>http://www.powershell.no/aws,/azure,/cloud,/devops/2021/08/01/azure-aws-comparison.html</link>
        <guid isPermaLink="true">http://www.powershell.no/aws,/azure,/cloud,/devops/2021/08/01/azure-aws-comparison.html</guid>
        
        
        <category>AWS,</category>
        
        <category>Azure,</category>
        
        <category>Cloud,</category>
        
        <category>DevOps</category>
        
      </item>
    
      <item>
        <title>Getting into the Linux world as a PowerShell user</title>
        <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;p&gt;Up until the past couple of years or so I have mainly been working with Windows-based systems. However, as mentioned in a &lt;a href=&quot;https://www.powershell.no/devops,/kubernetes,/docker,/containers/2020/08/11/certified-kubernetes-administrator.html&quot;&gt;previous post&lt;/a&gt; - when technology evolves, there is a need to adapt - and getting into the Linux side of things is one key area given the frequent use of Linux in modern technologies such as containers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-ps_tux.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Since starting working more and more with containers and Kubernetes, I have been exposed more and more to Linux and learned some fundamentals such as looking into logs and managing services. As time passed I found a need to dig a little deeper and learn the basics on Linux system administration, as these skills is useful both when working inside containers but also in general as we see more and more greenfield deployments being based on Linux server distributions rather than Windows Server.&lt;/p&gt;

&lt;p&gt;I think one advantage before starting is that I have been working a lot with PowerShell since it was released as Windows PowerShell 1.0 back in 2006 - which is both a command-line administration shell, a scripting language and an automation engine. It was a very important tool for any IT Pro managing Windows-based systems (both desktops and servers) in the following decade. Then, in August of 2016, Microsoft announced it`s plans to make PowerShell open source and cross-platform - available on Linux and macOS in addition to Windows. Since PowerShell is built on top of the .NET Framework, the decision of that team to make .NET cross-platform also layed the foundation for PowerShell to do the same thing. Generally availability of PowerShell Core 6.0 was announced in January 2018. In the initial version “Core” was added to the name to distinguish it from Windows PowerShell as well as highlight that it was running on the .NET Core version of .NET Framework. However, that lead to some confusion for the user base, as one might get the impression that “Core” meant a stripped down or light version of PowerShell. In fact, it was lacking some APIs and functionality, since porting features to a brand new framework took some time. However, the .NET team changed their branding from .NET Core 3.1 to .NET 5 in the same timeframe -  as they thought feature and compatibility with the older/Windows-only version was sufficient. Hence, from PowerShell 7, which was released in March 2020 - the “Core” part of the branding was removed for PowerShell as well.&lt;/p&gt;

&lt;h1 id=&quot;learning-linux-systems-administration&quot;&gt;Learning Linux Systems Administration&lt;/h1&gt;

&lt;p&gt;I have some experience with PowerShell on Linux, deploying it with SSH-remoting enabled at a customer. This enables cross-platform remoting and is very cool from a technology perspective. Here is one example:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-ps-remoting.gif&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Knowing PowerShell - which is object-oriented, much like the Windows operating system is - is fundamentally very different from Linux - which is largely based on defining configurations in text files. Even system information such as open handles by a process is exposed as text-files using a pseudo file-system.&lt;/p&gt;

&lt;p&gt;Hence, it doesn`t help much knowing PowerShell in this scenario, without also some foundational skills for managing the operating system.
Combining the powerful capabilities of PowerShell with the basic understanding of managing Linux on the other hand, is a great combination in my opinion.&lt;/p&gt;

&lt;p&gt;I started out by setting a goal: I wanted to learn the skills required to pass the Linux Foundation Certified Systems Administrator exam in order to get foundational knowledge of the Linux operating system.&lt;/p&gt;

&lt;p&gt;In the beginning, I must admit I felt a bit lost without my three faithful PowerShell commands:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Get-Command&lt;/code&gt; - The Get-Command cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts and applications (which means binaries in the PATH, such as ipconfig and such). Example: - Get-Command &lt;em&gt;disk&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Get-Help&lt;/code&gt; - Displays information about PowerShell commands and concepts. Examples: Get-Help about_try_catch and Get-Help New-AzVm.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Get-Member&lt;/code&gt; - The Get-Member cmdlet gets the members, the properties and methods, of objects. PowerShell has a rich formatting system, which means only specific properties will be displayed by default (it depends on things like the number of properties and whether a formatting defintion has been made for the specific type of object). By using Get-Member (and sometimes Format-List * to see actual property values) we can discover how an object looks like and pick the information we want by pipine to Select-Object.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I did know about the man command, which can display the manual page for a specified command. However, that does not help much if you do not know the name of the command. Later on, I discovered the apropos command - which in reality is an alias for man -k. This makes it possible to specify a keyword to search through all of the man pages. For example, if one wants to format a partition on a disk, but can`t remember the command one can search for - try: apropos disk. This will return tools like fdisk, gdisk and so on - and you will likely find the tool you want. This helped tremendously for me.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime. –Mainmonides&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think this quote fits very well in this scenario: Get to know the base tools to discover what you need and you can find what you need when you need it.&lt;/p&gt;

&lt;p&gt;Another “quirk” for someone used to work in PowerShell where commands is built on an intuitive syntax based on the Verb-Noun syntax - for example Get-Service, Start-Service and Stop-Service - is the rather non-intuitive nature of command names in Linux.&lt;/p&gt;

&lt;p&gt;For example, the command name awk - which is an incredible powerful command designed for text processing and typically used as a data extraction and reporting tool - and almost a complete language on it`s own - does not describe what the tool does by any means. The name is actually composed by the first letter in the lastname of it’s creators (Alfred Aho, Peter J. Weinberger, Brian Kernighan). Sed is a different example, a utility that parses and transforms text. Its name is short for “stream editor” - which is a little better, but still is hard to guess based on the name alone. The rationale for short names is likely to make it shorter to type for users, but that is largely solved by the concept of aliases in my opinion. For example in PowerShell, there are some really long command (cmdlet) names (such as Enable-AzOperationalInsightsLinuxCustomLogCollection, which is 52 characters long and thus very verbose), but aliases makes it more convenient to use them when working interactively. In scripts, the best practice is to use the full command names for readability and clarity.&lt;/p&gt;

&lt;p&gt;Intellisense and tab-completion is other helpful features in this space.
For example, I have gotten accustomed to use the Linux alias ls instead of Get-ChildItem - which is the PowerShell command to list items in a directory. Even though I might have used the other default alias dir, I tend to choose the shortest ones for effiency. On the topic of efficiency, check out &lt;a href=&quot;https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/&quot;&gt;Predictive Intellisense&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Predictive IntelliSense is an addition to the concept of tab completion that assists the user in successfully completing commands. The prediction suggestion appears as colored text following the user’s cursor. This enables new and experienced users of PowerShell to discover, edit, and execute full commands based on matching predictions from the user’s history and additional domain specific plugins.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-intellisense.jpg&quot; alt=&quot;alt&quot; /&gt;
&lt;em&gt;Image credit: Microsoft&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this example, the gray text after the cursor is Predictive text based on either the history or a plugin (such as the Az.Predictor for the Azure module). By default one can use RightArrow in order to use the Predictive Intellisense.&lt;/p&gt;

&lt;p&gt;Here is a practical example where I first start typing out the Enter-PSSession command and then change to typing the name of a computer I want to connect to:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-intellisense-demo.gif&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Getting all of the command history where the text has been used before is very conventient.&lt;/p&gt;

&lt;p&gt;See the blog post for additional details on how to install and configure Predictive Intellisense. I have used this feature heavily since it was released November 10th 2020, and it has saved me significants amount of time - especially for long commands I use frequently.&lt;/p&gt;

&lt;p&gt;As noted in the article, Predictive Intellisense works on Windows PowerShell 5.1 and PowerShell 7.0+, meaning it also works on Linux and macOS. Hence, I am also using this everywhere I use PowerShell - such as Azure Cloud Shell and WSL2 (Windows Subsystem for Linux).&lt;/p&gt;

&lt;h3 id=&quot;crescendo&quot;&gt;Crescendo&lt;/h3&gt;
&lt;p&gt;Another exciting new module is &lt;a href=&quot;https://devblogs.microsoft.com/powershell/announcing-powershell-crescendo-general-availability-ga/s&quot;&gt;PowerShell Crescendo&lt;/a&gt;, a framework to rapidly develop PowerShell cmdlets for native commands, regardless of platform. Crescendo provides the tools to easily wrap a native command to gain the benefits of PowerShell cmdlets (such as object orientation). As noted in the article, this means that the output objects allow you to take advantage of all the post processing tools such as Sort-Object and Where-Object.
An example provided in the article on the PowerShell team blog is a wrapper around the Linux apt command:&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Get-InstalledPackage&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-match&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;libc&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As we can see, as a PowerShell user one can make use of existing knowledge for filtering output. I think this is a perfect example of what Jeffrey Snover (Microsoft Technical Fellow and “father” of PowerShell) and the PowerShell team has been aiming for since the beginning:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-snover-quote.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Although this is great, we can`t assume that PowerShell is available on every Linux system we manage - hence I believe it is still needed to know some basics of the native tooling. Such as text processing utilities like grep, sed and awk. Another example is container images. They are often stripped down as much as possible to minimize footprint - even tools we take for granted such as ping or ip might be excluded. Hence, we need to use the tools available if doing some interactive debugging in such a  scenario.&lt;/p&gt;

&lt;h3 id=&quot;history&quot;&gt;History&lt;/h3&gt;

&lt;p&gt;A fascinating aspect of learning Linux is all of the history in the operating system. An example is the archiving utility tar. Although its name is short for tape archiver, it is still used today where tape systems is almost non-existent. Now it is used to archive and extract archives to and from any media - as long as it have a supported file system.&lt;/p&gt;

&lt;p&gt;Another example is the previously mentioned sed utility. According to &lt;a href=&quot;https://en.wikipedia.org/wiki/Sed&quot;&gt;Wikipedia&lt;/a&gt;, it was was developed from 1973 to 1974 by Lee E. McMahon of Bell Labs, and is available today for most operating systems. By the time of this writing, that is almost 50 years later. I find this very interesting, that a built-in tool is still actively developed and highly used so long after it was initially developed. In the fast-paced world of computing, 50 years is like centuries!&lt;/p&gt;

&lt;h1 id=&quot;lfcs-linux-foundation-certified-systems-administrator&quot;&gt;LFCS: Linux Foundation Certified Systems Administrator&lt;/h1&gt;

&lt;p&gt;I started out studying for this exam a some weeks before the scheduled exam date. I bought the Course + Exam bundle, and got the course &lt;a href=&quot;https://training.linuxfoundation.org/training/essentials-of-linux-system-administration/&quot;&gt;Essentials of Linux System Administration (LFS201)&lt;/a&gt; in addition to the exam:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Chapter 1. Course Introduction&lt;/li&gt;
  &lt;li&gt;Chapter 2. Linux Filesystem Tree Layout&lt;/li&gt;
  &lt;li&gt;Chapter 3. Processes&lt;/li&gt;
  &lt;li&gt;Chapter 4. Signals&lt;/li&gt;
  &lt;li&gt;Chapter 5. Package Management Systems&lt;/li&gt;
  &lt;li&gt;Chapter 6. RPM&lt;/li&gt;
  &lt;li&gt;Chapter 7. DPKG&lt;/li&gt;
  &lt;li&gt;Chapter 8. yum&lt;/li&gt;
  &lt;li&gt;Chapter 9. zypper&lt;/li&gt;
  &lt;li&gt;Chapter 10. APT&lt;/li&gt;
  &lt;li&gt;Chapter 11. System Monitoring&lt;/li&gt;
  &lt;li&gt;Chapter 12. Process Monitoring&lt;/li&gt;
  &lt;li&gt;Chapter 13. Memory: Monitoring Usage and Tuning&lt;/li&gt;
  &lt;li&gt;Chapter 14. I/O Monitoring and Tuning&lt;/li&gt;
  &lt;li&gt;Chapter 15. I/O Scheduling&lt;/li&gt;
  &lt;li&gt;Chapter 16. Linux Filesystems and the VFS&lt;/li&gt;
  &lt;li&gt;Chapter 17. Disk Partitioning&lt;/li&gt;
  &lt;li&gt;Chapter 18. Filesystem Features: Attributes, Creating, Checking, Mounting&lt;/li&gt;
  &lt;li&gt;Chapter 19. Filesystem Features: Swap, Quotas, Usage&lt;/li&gt;
  &lt;li&gt;Chapter 20. Th ext2/ext3/ext4 Filesystems&lt;/li&gt;
  &lt;li&gt;Chapter 21. The XFS and btrfs Filesystems&lt;/li&gt;
  &lt;li&gt;Chapter 22. Encrypting Disks&lt;/li&gt;
  &lt;li&gt;Chapter 23. Logical Volume Management (LVM)&lt;/li&gt;
  &lt;li&gt;Chapter 24. RAID&lt;/li&gt;
  &lt;li&gt;Chapter 25. Kernel Services and Configuration&lt;/li&gt;
  &lt;li&gt;Chapter 26. Kernel Modules&lt;/li&gt;
  &lt;li&gt;Chapter 27. Devices and udev&lt;/li&gt;
  &lt;li&gt;Chapter 28. Virtualization Overview&lt;/li&gt;
  &lt;li&gt;Chapter 29. Containers Overview&lt;/li&gt;
  &lt;li&gt;Chapter 30. User Account Management&lt;/li&gt;
  &lt;li&gt;Chapter 31. Group Management&lt;/li&gt;
  &lt;li&gt;Chapter 32. File Permissions and Ownership&lt;/li&gt;
  &lt;li&gt;Chapter 33. Pluggable Authentication Modules (PAM)&lt;/li&gt;
  &lt;li&gt;Chapter 34. Network Addresses&lt;/li&gt;
  &lt;li&gt;Chapter 35. Network Devices and Configuration&lt;/li&gt;
  &lt;li&gt;Chapter 36. Firewalls&lt;/li&gt;
  &lt;li&gt;Chapter 37. System Startup and Shutdown&lt;/li&gt;
  &lt;li&gt;Chapter 38. GRUB&lt;/li&gt;
  &lt;li&gt;Chapter 39. System Init: systemd, SystemV and Upstart&lt;/li&gt;
  &lt;li&gt;Chapter 40. Backup and Recovery Methods&lt;/li&gt;
  &lt;li&gt;Chapter 41. Linux Security Modules&lt;/li&gt;
  &lt;li&gt;Chapter 42. Local System Security&lt;/li&gt;
  &lt;li&gt;Chapter 43. Basic Troubleshooting&lt;/li&gt;
  &lt;li&gt;Chapter 44. System Rescue&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had been using Windows Subsystem for Linux (WSL) for a couple of years, so I could do some basic experimenting in that environment.&lt;/p&gt;

&lt;p&gt;However, in order to be able to perform all the labs in the course I also needed some regular virtual machines, so I spun up 3 different distros in Azure in order to be able to try out the different package managers and such:&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;C:\&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Get-AzVM&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Location&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;          &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;VmSize&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;OsType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-----------------&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;----&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;--------&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;          &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;------&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;------&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COMPUTE-RG&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RHEL-AZ-01&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;norwayeast&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Standard_D2s_v3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Linux&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COMPUTE-RG&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SUSE-AZ-01&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;norwayeast&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Standard_D2s_v3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Linux&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;COMPUTE-RG&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;UBNT-AZ-01&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;norwayeast&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Standard_D2s_v3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Linux&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Using the Auto-Shutdown feature for Azure VMs, this did not cost very much. In addition, I spun up an Ubuntu Server 20.04 in a local Hyper-V VM to make it easier to play around with GRUB configurations and system rescue techniques.&lt;/p&gt;

&lt;p&gt;One very cool thing I noticed when deploying the latter is that PowerShell is listed as a Featured Server Snap:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-ps-snap.png&quot; alt=&quot;alt&quot; height=&quot;333px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Although this is very convenient, as far as I know there is one gotcha of using PowerShell as a Snap package: SSH-based PowerShell remoting is not supported, as that relies on pwsh being available as a native binary - not inside a Snap package.&lt;/p&gt;

&lt;p&gt;Since I have close to 20 years of experience managing Windows, I of course knew the basics of many of the topics outlined in the course. This helped a lot not having to spend too much time on the concepts, but rather on how to perform the task in this (for me) new environment.&lt;/p&gt;

&lt;p&gt;The exam experience itself is performance based, where you get access to a terminal windows in a browser. This is very similar to the Katakoda playground, which is a free interactive playground with &lt;a href=&quot;https://www.katacoda.com/learn&quot;&gt;many different environments&lt;/a&gt;. For example an &lt;a href=&quot;https://www.katacoda.com/courses/ubuntu/playground2004&quot;&gt;Ubuntu 20.04&lt;/a&gt; sandbox which becomes available in seconds.&lt;/p&gt;

&lt;p&gt;On the left hand-side, you will have an overview of 24 tasks consisting of one or more sub-tasks. Given that you have 120 minutes available, there are 5 minutes available per task. This means that time management is key to success when taking the exam. I failed at this in my first attempt, as I spent too much time looking up information in man pages and had to rush through the last 5-6 questions without proper time to answer all of them. This was partly due to me not having the muscle memory regarding the various commands and topics needed, and partly due to the fact that the LFS 201 course in fact did not cover all of the topics measured. In the “What it prepares you for” section in the &lt;a href=&quot;https://training.linuxfoundation.org/training/essentials-of-linux-system-administration/&quot;&gt;course page&lt;/a&gt;, the following is stated: “The topics covered are directly aligned with the knowledge domains tested by the Linux Foundation Certified Systems Administrator (LFCS) exam”. This is something I discovered a few days ahead of the exam, by looking at various articles and threads online discussing the exam. Specifically &lt;a href=&quot;https://unix.stackexchange.com/questions/357940/lfcs-exam-vs-lfs201-training-topics/357956&quot;&gt;this thread&lt;/a&gt; was very surprising to read. Although the time I spent in the course was not wasteful by any means, there were additional topics needing attention and upskilling. Especially in the area Essential Commands which 25% of the exam is about.&lt;/p&gt;

&lt;p&gt;I scheduled a second attempt 3 days later and started diving into the missing gaps. In addition I spent some time becoming more efficient in navigating the man pages. In the first attemp I spent too much time skimming through man pages by hitting Space. I did know about the search capability, where one can simply type / followed by a keyword and press Enter. However, what I did not know was the various navigation capabilities within man - such as using N to go to the next match. This is also a little detail that saves a lot of time - not only in the exam but also in real life. Another tip for efficiency is using the terminal multiplexer tmux - which is available and allowed to use during the exam. This makes it possible to create additional terminal windows, splitting them either vertically or horizontally. I typically used one window for looking up man pages or verifying contents in the output files requested in the various task, which made it easier to keep context in the main window.&lt;/p&gt;

&lt;p&gt;After the first attempt, I felt rather confident I did not pass. After the second attempt, I was rather confident I did pass - and 36 hours after the exam I got an e-mail with the confirmation and certificate:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-lfcs.jpg&quot; alt=&quot;alt&quot; height=&quot;561px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Another useful tool I can also recommend is &lt;a href=&quot;https://tldr.sh/&quot;&gt;tldr&lt;/a&gt; - which is simplified and community-driven man pages. This is not allowed during the exam as far as I know, as it is not included in the operating system. However, in day-to-day work it can be a time saver for quickly finding examples. This was initally one of the things I was missing coming from PowerShell, where Get-Help &lt;some-new-command&gt; -Examples is often what I look at to quickly grasp how a command can be used. Tldr is very much filling this gap for me.&lt;/some-new-command&gt;&lt;/p&gt;

&lt;p&gt;It can be installed from the package manager for your distribution, for example on Ubuntu:
sudo apt install tldr&lt;/p&gt;

&lt;p&gt;Example usage:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-tldr.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Another tool, which is available in the operating system and hence allowed during the exam, is the info utility.&lt;/p&gt;

&lt;p&gt;This can be leveraged to read info documents, and the syntax is &lt;em&gt;info command/concept&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For examle, here is the output of &lt;em&gt;info coreutils&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2021-02-25-info.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we can see we can navigate around in the document to read about the various topics. This is typically not something you will have time for during the exam, but the utility is very handy in day-to-day scenarios.&lt;/p&gt;

&lt;p&gt;If you are looking to dive more into using PowerShell on Linux - and maybe also try to take the LFCS exam - feel free to reach out if you have any questions (comment field below, &lt;a href=&quot;https://www.twitter.com/janegilring&quot;&gt;@JanEgilRing on Twitter&lt;/a&gt; or jan.egil.ring (at) powershell.no) ).&lt;/p&gt;

&lt;h2 id=&quot;useful-resources&quot;&gt;Useful resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux&quot;&gt;Installing PowerShell on Linux&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core&quot;&gt;PowerShell remoting over SSH&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://mathieubuisson.github.io/powershell-linux-bash/&quot;&gt;PowerShell equivalents for common Linux/bash commands&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://training.linuxfoundation.org/certification/linux-foundation-certified-sysadmin-lfcs/&quot;&gt;Linux Foundation Certified System Administrator (LFCS)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://mathematicbren.blogspot.com/2014/12/practice-test.html?m=1&quot;&gt;Practice Test&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Thu, 25 Feb 2021 07:00:00 +0000</pubDate>
        <link>http://www.powershell.no/linux,/powershell,/devops/2021/02/25/learning-linux.html</link>
        <guid isPermaLink="true">http://www.powershell.no/linux,/powershell,/devops/2021/02/25/learning-linux.html</guid>
        
        
        <category>Linux,</category>
        
        <category>PowerShell,</category>
        
        <category>DevOps</category>
        
      </item>
    
      <item>
        <title>Introducing the Privileged Identity Management Tools PowerShell module (PIMTools)</title>
        <description>&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;

&lt;blockquote&gt;
  &lt;p&gt;Privileged Identity Management (PIM) is a service in Azure Active Directory (Azure AD) that enables you to manage, control, and monitor access to important resources in your organization. These resources include resources in Azure AD, Azure, and other Microsoft Online Services such as Microsoft 365 or Microsoft Intune.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-10-10_PIM_overview.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The feature provides just-in-time privileged access to Azure AD and Azure resources, and it can be customized per role to for example require approval by designated approvers as well as enforce multi-factor authentication when activating a role.&lt;/p&gt;

&lt;p&gt;More information is available in the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure&quot;&gt;product documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If a user has been made eligible for a role, that means they can activate the role when they need to perform privileged tasks. The role can be either a role in Azure AD or a Role Based Access Control (RBAC) role in Azure on the Management Group, Subscription or Resource Group level.&lt;/p&gt;

&lt;p&gt;The manual way to activate an eligible role is to:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Sign in to the &lt;strong&gt;Azure portal&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Open &lt;strong&gt;Azure AD Privileged Identity Management&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;My roles&lt;/strong&gt;, in the Azure resource or Azure AD roles list&lt;/li&gt;
  &lt;li&gt;Find the role you want to activate&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Activate&lt;/strong&gt; to open the Activate page&lt;/li&gt;
  &lt;li&gt;In the &lt;strong&gt;Reason&lt;/strong&gt; box, enter the reason for the activation request&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Activate&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A common activation time is 8 hours, meaning the role should be active for the duration of the working hours. This means the steps outlined above needs to be performed manually every day.&lt;/p&gt;

&lt;h2 id=&quot;the-privileged-identity-management-tools-powershell-module-pimtools&quot;&gt;The Privileged Identity Management Tools PowerShell module (PIMTools)&lt;/h2&gt;

&lt;p&gt;PIMTools is a PowerShell module with commands for working with Azure AD Privileged Identity Management, initally commands for activating Azure AD and Azure resource roles.&lt;/p&gt;

&lt;h3 id=&quot;getting-started&quot;&gt;Getting started&lt;/h3&gt;

&lt;h4 id=&quot;1---start-windows-powershell&quot;&gt;1 - Start Windows PowerShell&lt;/h4&gt;

&lt;p&gt;Simply press the Start button and search for “PowerShell”. You will likely get two hits:
“Windows PowerShell” and “Windows PowerShell ISE”. For more modern console and editor features you may also want to check out &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/terminal/&quot;&gt;Windows Terminal&lt;/a&gt; and &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;Visual Studio Code&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;2---allow-powershell-scripts-to-be-executed&quot;&gt;2 - Allow PowerShell scripts to be executed&lt;/h4&gt;

&lt;p&gt;PowerShell has a feature called “execution policy” which by default is set to “Restricted”,
meaning that no scripts is allowed to run. In the context of this article, I will recommend
to set the execution policy to “RemoteSigned”. This means that you can run scripts locally
without having to sign it with a digital signature.&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Check current settings&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Get-ExecutionPolicy&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# If the execution policy is set to Restricted, run the following command to configure the execution policy to RemoteSigned&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RemoteSigned&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Make sure you start PowerShell with &quot;Run As Administrator&quot; before running the command. Alternatively, run the following if you do not have Administrator privileges:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RemoteSigned&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Scope&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CurrentUser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;3---install-the-pimtools-module&quot;&gt;3 - Install the PIMTools module&lt;/h4&gt;

&lt;p&gt;The module is available from the &lt;a href=&quot;https://www.powershellgallery.com/packages/PIMTools/&quot;&gt;PowerShell Gallery&lt;/a&gt;, meaning we can install it by simply running the following:&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PIMTools&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Scope&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;CurrentUser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this is the first time you run this command, you will be prompted to install NuGet which is being
 used under the hood to interact with the PowerShell Gallery. Answer &lt;em&gt;Yes&lt;/em&gt; when prompted to install
this prerequisite. Next, you will be warned that the PowerShell Gallery by default is configured
as an untrusted source. Answer &lt;em&gt;Yes&lt;/em&gt; to acknowledge this and install the module.&lt;/p&gt;

&lt;p&gt;Now the module is installed and is ready to be used.&lt;/p&gt;

&lt;h4 id=&quot;4---example-usage&quot;&gt;4 - Example usage&lt;/h4&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Elevate an eligble Azure AD role&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;New-AzureADPIMRequest&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;Global Administrator&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Elevate an eligble Azure role&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;New-AzurePIMRequest&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Owner&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;IT&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ManagementGroup&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;New-AzurePIMRequest&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Contributor&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;MySubscription&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Subscription&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-10-10-PIMTools.gif&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Note that you need to refresh any existing open browser sessions in order to refresh the access token with the elevated permissions.&lt;/p&gt;

&lt;p&gt;After you have installed the module, you can later on run the following to get any new version which may contain bug fixes and new functionality:&lt;/p&gt;
&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Update-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PIMTools&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you encounter any problems, please submit an issue on &lt;a href=&quot;https://github.com/janegilring/PIMTools/issues&quot;&gt;the project’s GitHub page&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;remarks&quot;&gt;Remarks&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;When activating an Azure role, the IDs for resources and role defintions is used. In order for the PIMTools module to lookup these IDs based on the displayname of the roles (for example Owner or Contributor) and resources (for example a Management Group or subscription), the user calling the commands must have the Reader role for the roles they are trying to elevate to.
This is not added by default in PIM, but is common (at least among the customers I work with) to grant Reader access to admin accounts - and require elevation using PIM in order to activate any other privileges. Hence, this is a prerequisite for activating Azure roles using PIMTools.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Per October 2020, the PowerShell commands to work with PIM is included only in the Public Preview release of Azure Active Directory PowerShell Module, hence this is a prerequisite you will be prompted to install if it is not present. When the PIM commands moves into the Generally Available Azure AD module, the prerequisite requirement will be updated.
Another dependency is Windows PowerShell, due to the fact that the AzureAD module relies on the full .NET Framework and hence does not support PowerShell 6/7.
Eventually the functionality in the AzureAD module is expected to be ported to the new Microsoft Graph PowerShell module, which is currently being developed and is &lt;a href=&quot;https://developer.microsoft.com/en-us/microsoft-365/blogs/microsoft-graph-powershell-preview-now-on-powershell-gallery/&quot;&gt;available in preview&lt;/a&gt;.
PIMTools will be updated to work with PowerShell 6/7 when PIM commands is available in the new Graph-based module. Until then, Windows PowerShell will be required.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;useful-resources&quot;&gt;Useful resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure&quot;&gt;Privileged Identity Management documentation&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.anujchaudhary.com/2020/09/azure-ad-powershell-for-azure-resources.html&quot;&gt;Azure AD PowerShell for Azure Resources in PIM
&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sat, 10 Oct 2020 07:00:00 +0000</pubDate>
        <link>http://www.powershell.no/azure,/powershell,/pim,/privileged/identity/management,/azure/ad/2020/10/10/pim-tools.html</link>
        <guid isPermaLink="true">http://www.powershell.no/azure,/powershell,/pim,/privileged/identity/management,/azure/ad/2020/10/10/pim-tools.html</guid>
        
        
        <category>Azure,</category>
        
        <category>PowerShell,</category>
        
        <category>PIM,</category>
        
        <category>Privileged</category>
        
        <category>Identity</category>
        
        <category>Management,</category>
        
        <category>Azure</category>
        
        <category>AD</category>
        
      </item>
    
      <item>
        <title>Getting into the world of containers</title>
        <description>&lt;h1 id=&quot;getting-into-the-world-of-containers&quot;&gt;Getting into the world of containers&lt;/h1&gt;

&lt;p&gt;Up until the past year or so I have mainly been working with Windows-based systems. However, as technology evolves there is a need to adapt - and getting into the Linux side of things is one key area given the use of Linux in a variety of technologies.&lt;/p&gt;

&lt;p&gt;Bryan Liles had a great &lt;a href=&quot;https://twitter.com/bryanl/status/1287409603307810819&quot;&gt;tweet&lt;/a&gt; on this topic recently:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-08-11_CKA_01.png&quot; alt=&quot;alt&quot; height=&quot;347px&quot; width=&quot;600px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When working in IT, continous learning is a fundamental requirement.&lt;/p&gt;

&lt;p&gt;Like the introduction of virtual machines was a revolution in the IT industry 20 years ago, the introduction of containers is a very similar transition. After some initial adoption time, it became the norm. The way I see it, the same is now happening with containers.&lt;/p&gt;

&lt;p&gt;Traditionally when working with software, a common challenge has been getting different software with different dependencies working on the same operating system - being Windows Server, a Linux distribution or other systems - especially when different versions of dependencies has been required.
Containers solves this challenge by packaging and isolating the entire runtime environment.
Container technology is not something new, as it has existed on the Linux/Unix side for decades. There are multiple container runtimes available, such as &lt;a href=&quot;https://containerd.io/&quot;&gt;containerd&lt;/a&gt;, although the most popular one is &lt;a href=&quot;https://www.docker.com/&quot;&gt;Docker&lt;/a&gt;.
Another important concept in the container world is &lt;em&gt;container registries&lt;/em&gt; - a central location to push and pull container &lt;em&gt;images&lt;/em&gt;. This provides a great portability, as container images can be pulled and run basically anywhere - cloud environments such as Amazon Web Services, Microsoft Azure or on-premises.&lt;/p&gt;

&lt;p&gt;Containers is also an important aspect of microservices, and commonly used in lously coupled and independently deployable microservice architectures:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-08-11_CKA_04.png&quot; alt=&quot;alt&quot; /&gt;
&lt;em&gt;Image credit: &lt;a href=&quot;https://www.redhat.com/en/topics/microservices/what-are-microservices&quot;&gt;Red Hat&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Although microservices is not the answer to each and every scenario, if your monolith works - it might not be any point in changing for the sake of changing. However, if you are either starting from scratch or looking into modernise and migrate an on-prem monolith to a more scalable cloud environment, a microservice architecture using containers as one of it’s building blocks is highly relevant. One of the Kubernetes co-founders, Brendan Burns, had a great talk on this topic on .NET Conf 2020 called &lt;em&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=7hY6fggwHqU&amp;amp;feature=youtu.be&quot;&gt;Why You Should Care About Microservices
&lt;/a&gt;&lt;/em&gt; which digs deeper into this topic with some great advice.&lt;/p&gt;

&lt;p&gt;Even though containers is great, there is also a need for &lt;em&gt;orchestration&lt;/em&gt;. A mechanism which can start/stop, distribute and provide the needed resiliceny and scaling of applications running in containers. This is where &lt;a href=&quot;http://kubernetes.io/&quot;&gt;Kubernetes&lt;/a&gt; comes into the picture - a container orchestration system for deploying, scaling and managing containerized applications.&lt;/p&gt;

&lt;p&gt;Kubernetes has become a de-facto standard for container orhestration in a similar way that Docker has become a de-facto container runtime.&lt;/p&gt;

&lt;p&gt;A quote from Microsoft`s whitepaper &lt;a href=&quot;https://azure.microsoft.com/mediahandler/files/resourcefiles/kubernetes-learning-path/Kubernetes%20Learning%20Path_Version%202.0.pdf&quot;&gt;“Kubernetes Learning Path”&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Kubernetes is taking the app development world by storm. By 2022, more than 75% of global organizations will be running containerized applications in production.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This statement is backing up that getting into the world of containers is an important step when working with IT infrastructure in the 2020s.&lt;/p&gt;

&lt;h2 id=&quot;certified-kubernetes-administrator-certification&quot;&gt;Certified Kubernetes Administrator certification&lt;/h2&gt;

&lt;p&gt;In the past year I’ve been exposed to both &lt;a href=&quot;https://www.openshift.com/&quot;&gt;Red Hat OpenShift&lt;/a&gt; (a container application platform based on Kubernetes) and &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/aks/&quot;&gt;Azure Kubernetes Service&lt;/a&gt; working in customer projects, so I felt it was time to sharpen my skills and aim for the &lt;a href=&quot;https://www.cncf.io/certification/cka/&quot;&gt;Certified Kubernetes Administrator(CKA)&lt;/a&gt; certification to gain a base level of skills on Kubernetes.&lt;/p&gt;

&lt;p&gt;The exam was a very different experience than what I’m used to from various Microsoft certifications, since all of it was performance based - no questions.&lt;/p&gt;

&lt;p&gt;When taking the exam, you get access to a web-based terminal window where you have 3 hours to solve 24 practical tasks/problems.&lt;/p&gt;

&lt;p&gt;Everything is running on Ubuntu Server, so for me I also had to invest in learning some core Linux skills.&lt;/p&gt;

&lt;p&gt;Every task has a weight such as 2% or 7%, and you need at least 74% in order to pass the exam.&lt;/p&gt;

&lt;p&gt;There is a lot of learning resources online. What I chose was to read the book &lt;a href=&quot;https://azure.microsoft.com/en-us/resources/kubernetes-up-and-running/&quot;&gt;Kubernetes Up and Running&lt;/a&gt; in addition to going through 6 excellent &lt;a href=&quot;https://www.pluralsight.com/paths/certified-kubernetes-administrator&quot;&gt;PluralSight courses&lt;/a&gt; from Anthony Nocentino. Earlier this year I’ve also attended cloudskill.io’s excellent &lt;a href=&quot;https://portal.cloudskills.io/docker-jumpstart&quot;&gt;Docker&lt;/a&gt; and &lt;a href=&quot;https://portal.cloudskills.io/k8s&quot;&gt;Kubernetes&lt;/a&gt; courses with the great instructors Dan Wahlin, Mike Pfeiffer and again Anthony Nocentino.&lt;/p&gt;

&lt;p&gt;A core requirement before taking the exam is to get hands-on experience and play around with the technology - this can’t be stressed enough. Personally I like to get some theory in place first in order to understand the core concepts, and then start playing around.&lt;/p&gt;

&lt;p&gt;There are a lot of options on that side as well:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://kubernetes.io/docs/setup/learning-environment/minikube/&quot;&gt;Minikube&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop for users looking to try out Kubernetes or develop with it day-to-day.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://kubernetes.io/docs/setup/learning-environment/kind/&quot;&gt;Kind&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;is a tool for running local Kubernetes clusters using Docker container “nodes”.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://www.docker.com/products/kubernetes&quot;&gt;Kubernetes in Docker Desktop&lt;/a&gt;&lt;/strong&gt;  &lt;em&gt;- the Docker client application for MacOS and Windows machines for the building and sharing of containerized applications and microservices.&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal&quot;&gt;Azure Kubernetes Service (AKS)&lt;/a&gt;&lt;/strong&gt; - managed control plane (master nodes), making it very easy to get a cluster up and running.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://aws.amazon.com/eks/&quot;&gt;Amazon Elastic Kubernetes Service&lt;/a&gt;&lt;/strong&gt; - also a managed control plane offering&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://cloud.google.com/kubernetes-engine&quot;&gt;Google Kubernetes Engine&lt;/a&gt;&lt;/strong&gt; - a managed control plane offering from the company who invented Kubernetes. (Fun fact: Kubernetes is the successor of the Google internal large-scale infrastructure systems Borg and Omega).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Manual deployment on either virtual or physical servers&lt;/strong&gt; - a good starting point is Kelsey Hightower’s guide &lt;a href=&quot;https://github.com/kelseyhightower/kubernetes-the-hard-way&quot;&gt;&lt;em&gt;Kubernetes The Hard Way&lt;/em&gt;&lt;/a&gt; and Rudi Martinsen’s article &lt;em&gt;&lt;a href=&quot;https://rudimartinsen.com/2020/08/08/setting-up-a-kubernetes-cluster-vms/&quot;&gt;Setting Up a Kubernetes Cluster on virtual machines&lt;/a&gt;&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, there is a number of (free) online services available for playing with Kubernetes using interactive browser-based scenarios. I’ve used &lt;a href=&quot;https://www.katacoda.com/courses/kubernetes&quot;&gt;Katakoda&lt;/a&gt; many times, both for going through their labs but also when wanting quick access to check or test something ad-hoc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-08-11_CKA_02.png&quot; alt=&quot;alt&quot; /&gt;
&lt;em&gt;Screenshot of the Katakoda web terminal&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Regarding the exam and certification itself there are a number of online articles with tips and tricks. My main take-away is time management: Even though you have 3 hours available, they will fly fast if you get stuck on a task and spend a lot of time trying to solve it. I would recommend going through the tasks as fast as possible and solve the low-hanging fruits first - then come back to the harder ones. Also make sure to prioritize those with the highest weight (5%+).&lt;/p&gt;

&lt;p&gt;Before taking the real exam, I would recommend trying a simulator such as killer.sh - where you in addition to get a score can get answers with detailed explanations.&lt;/p&gt;

&lt;p&gt;Note that you do get 1 free retake when ordering the exam. I was a bit too ambitious when racing through the mentioned book and online courses in 3 weeks, so I got a score of 71% on the first attempt and realized I needed to practice a bit more on a couple of subjects. On the retake August 10th, I passed with a score of 87%.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020-08-11_CKA_03.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Good luck if you also aim for the CKA exam. If not, I would highly recommend to get to know the basics of containers if you work in the IT infrastructure space regardless of the certification.&lt;/p&gt;

&lt;h2 id=&quot;useful-resources&quot;&gt;Useful resources&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://kubernetes.io/docs/&quot;&gt;Kubernetes documentation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.youtube.com/playlist?list=PLLasX02E8BPCrIhFrc_ZiINhbRkYMKdPT&quot;&gt;“Kubernetes Basics” YouTube-series&lt;/a&gt; by Kubernetes co-founder Brendan Burns&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://slack.k8s.io/&quot;&gt;Kubernetes Slack community&lt;/a&gt; - Tip for fellow Norwegians: There is a &lt;em&gt;#norw-users&lt;/em&gt; channel)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.the-aks-checklist.com/&quot;&gt;The Azure Kubernetes Service Checklist&lt;/a&gt; -  ensure your cluster is production-ready&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/ramitsurana/awesome-kubernetes&quot;&gt;Awesome-Kubernetes&lt;/a&gt; - A curated list for awesome kubernetes sources&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://training.linuxfoundation.org/wp-content/uploads/2019/08/CKA-CKAD-Candidate-Handbook-8.5.19.pdf&quot;&gt;Official K8s Certification Candidate Handbook&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/stretchcloud/cka-lab-practice&quot;&gt;CKA Exercises
&lt;/a&gt; - A set of exercises that will help you to prepare for the Certified Kubernetes Administrator exam, offered by the Cloud Native Computing Foundation&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Tue, 11 Aug 2020 17:10:00 +0000</pubDate>
        <link>http://www.powershell.no/devops,/kubernetes,/docker,/containers/2020/08/11/certified-kubernetes-administrator.html</link>
        <guid isPermaLink="true">http://www.powershell.no/devops,/kubernetes,/docker,/containers/2020/08/11/certified-kubernetes-administrator.html</guid>
        
        
        <category>DevOps,</category>
        
        <category>Kubernetes,</category>
        
        <category>Docker,</category>
        
        <category>containers</category>
        
      </item>
    
      <item>
        <title>Getting data from Power BI using PowerShell</title>
        <description>&lt;p&gt;In this article, we are going to have a look at how to access data in Power BI from PowerShell.&lt;/p&gt;

&lt;h2 id=&quot;scenario&quot;&gt;Scenario&lt;/h2&gt;

&lt;p&gt;The scenario I was working with before writing this article was a business process needing a notification based on a threshold for a value available in a tile in a Power BI report.&lt;/p&gt;

&lt;p&gt;The data was being synchronized from an on-premises database into a Power BI data set on an hourly schedule.&lt;/p&gt;

&lt;p&gt;Based on this data set, a dashboard and a report was created in Power BI to gain insight into business processes. The requirement in this case was to alert via multiple channels (e-mail, SMS and Microsoft Teams) based on certain conditions.&lt;/p&gt;

&lt;p&gt;I was asked to assist getting the value out of a dashboard tile using PowerShell in order to configure an automated process using Azure Automation and Logic Apps as building blocks.&lt;/p&gt;

&lt;p&gt;Having helped out with setting up an Azure Automation runbook for scheduled refresh of data sets in Power BI, I had some insight into the official &lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/power-bi/overview?view=powerbi-ps&quot;&gt;Microsoft Power BI PowerShell module&lt;/a&gt;. Hence I started looking around there for a way to retrieve information from the Power BI dashboard tile in question:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/a96a577d1ebc8602044e060f7b8f548d.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;However, none of the Power BI cmdlets seemed to accomplish what we wanted.
There is a &lt;a href=&quot;https://docs.microsoft.com/en-us/rest/api/power-bi/&quot;&gt;REST API for Power BI&lt;/a&gt;, along with a generic Invoke-PowerBIRestMethod cmdlet taking care of authentication.&lt;/p&gt;

&lt;p&gt;We started to look into the following resource in the API:
https://api.powerbi.com/v1.0/myorg/reports/{reportId}/pages/{pageName}&lt;/p&gt;

&lt;p&gt;However, this turned out to only return metadata about the pages in the report. Not the actual data values from tiles.&lt;/p&gt;

&lt;p&gt;It turns out the Power BI PowerShell module is only applicable to the management plane in Power BI - hence it cannot be used to retrieve the actual data. This is similar to working with a resource in Azure like Azure SQL for example: The Az PowerShell module makes it possible to manage all aspects of the Azure SQL Management plane (create logical servers and databases). However, to access the actual content in the database, we must work with the data plane and rather use the &lt;a href=&quot;https://docs.microsoft.com/en-us/sql/powershell/sql-server-powershell?view=sql-server-ver15&quot;&gt;SqlServer PowerShell module&lt;/a&gt; if the goal is to retrieve some SQL-data using PowerShell.&lt;/p&gt;

&lt;h2 id=&quot;the-solution&quot;&gt;The solution&lt;/h2&gt;

&lt;p&gt;For accessing the data plane in Power BI, there is an XMLA endpoint available.&lt;/p&gt;

&lt;p&gt;The Power BI team has written a great article called &lt;a href=&quot;https://powerbi.microsoft.com/en-us/blog/power-bi-open-platform-connectivity-with-xmla-endpoints-public-preview/&quot;&gt;Power BI open-platform connectivity with XMLA endpoints&lt;/a&gt;, where the following client tools for working with the XMLA endpoints is layed out:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Tool&lt;/th&gt;
      &lt;th&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;SQL Server Data Tools&lt;/td&gt;
      &lt;td&gt;Model authoring with a range of enterprise features, integration with source control, and application-lifecycle management processes.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;SQL Server Management Studio&lt;/td&gt;
      &lt;td&gt;Perform fine-grain data refresh, scripting and management.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Tabular Editor&lt;/td&gt;
      &lt;td&gt;Open-source, community tool with extensive set of enterprise modelling features, and easy-to-use experience&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Power BI  ALM Toolkit and  BISM Normalizer&lt;/td&gt;
      &lt;td&gt;Application-lifecycle management, incremental deployments and model merging as described in this whitepaper&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Others&lt;/td&gt;
      &lt;td&gt;Analysis Services has a rich history of open-source community tools. Various third-party software vendors provide tools for monitoring and managing Analysis Services.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;PowerShell would fall into the “Others” category, where we have the option to use the SqlServer PowerShell module. In that module, there is an Invoke-ASCmd cmdlet, which according to the &lt;a href=&quot;https://docs.microsoft.com/en-us/powershell/module/sqlserver/invoke-ascmd?view=sqlserver-ps&quot;&gt;documentation&lt;/a&gt; &lt;em&gt;Enables a database administrator to execute an XMLA script, Multidimensional Expressions (MDX) query, or Data Mining Extensions (DMX) statement against an instance of Microsoft SQL Server Analysis Services.&lt;/em&gt;.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/ada89d75ceb8cc558cd9738873c4b36b.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;This suits our needs perfectly in this scenario, as we can use DMX queries similar to the ones used when building reports and dashboards to query the data.&lt;/p&gt;

&lt;p&gt;In the end, we can see the complete picture regarding how the end result looks like:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200229_PowerBI_Scenario.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;In this article we have seen how to retrieve data from a data set in Power BI, as well as seen the importance of understanding whether to use the management or data plane to get the necessary information.&lt;/p&gt;
</description>
        <pubDate>Sat, 29 Feb 2020 06:30:00 +0000</pubDate>
        <link>http://www.powershell.no/power/bi,/powershell/2020/02/29/power-bi-powershell.html</link>
        <guid isPermaLink="true">http://www.powershell.no/power/bi,/powershell/2020/02/29/power-bi-powershell.html</guid>
        
        
        <category>Power</category>
        
        <category>BI,</category>
        
        <category>PowerShell</category>
        
      </item>
    
      <item>
        <title>2020 Community engagements</title>
        <description>&lt;p&gt;In this article, I am going to tell you about my speaker and community engagements for 2020. I also plan to update the article after each conference with some pictures as well as tell you about how my experience was.&lt;/p&gt;

&lt;h2 id=&quot;nordic-infrastructure-conference&quot;&gt;Nordic Infrastructure Conference&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200206_NIC_welcome.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Nordic Infrastructure Conference was arranged for the 9th year in Oslo, Norway - February 6th - 7th, 2020.
For several years the conference has brought both international and local speakers to Norway, sharing their knowledge and experience with the attendees.&lt;/p&gt;

&lt;p&gt;This year, Executive Vise President of Microsoft Azure, Jason Zander came to NIC doing the keynote session “The cloud`s impact on the future of computing”:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200206_NIC_keynote.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the keynote, Jason of course talked about a lot of the technologies available in Azure, but he also brought up some very interesting scenarios where these technologies can help customers achieve more. Such as IoT-sensors in the fishing industry, and the option to put a Kubernetes deployment in a backpack for use with drones when searching for missing people in disconnected areas to name a couple.&lt;/p&gt;

&lt;p&gt;Conferences is also about meeting friends, colleagues, vendors and customers in order to discuss challenges and find solutions:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200206_NIC_expo.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I held a session on day 1 called “Managing your Azure infrastructure using Terraform”. In this session, I introduced the concept of Infrastructure as Code, before diving into Terraform specifically. After showing the basics, I showed a scenario from a customer engagement where the same configuration was used to deploy infrastructure for an e-commerce application to different environments. The slides and demos from the session is available &lt;a href=&quot;https://github.com/nordicinfrastructureconference/2020/tree/master/Jan%20Egil%20Ring%20-%20Managing%20your%20Azure%20infrastructure%20using%20Terraform&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200206_NIC_JER_01.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;experts-live-norway&quot;&gt;Experts Live Norway&lt;/h2&gt;

&lt;p&gt;The Second Edition of this conference is happening in Oslo, Norway on May 28th, 2020.&lt;/p&gt;

&lt;p&gt;Experts Live is a non-profit organization based in The Netherlands that has a mission to “enable sharing of knowledge and experience about Microsoft technologies worldwide” and was founded by Maarten Goet (MVP, RD), more information about the conference is available &lt;a href=&quot;https://expertslive.no/about-experts-live/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/20200206_ExpertsLiveNorway.jpg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I am looking forward to attending and speaking at this conference for the first time. My session will be about how to manage a hybrid infrastructure using Azure Functions.&lt;/p&gt;

&lt;h2 id=&quot;powershell-conference-europe&quot;&gt;PowerShell Conference Europe&lt;/h2&gt;

&lt;p&gt;Europe`s largest PowerShell-themed annual conference is being held June 2-5, 2020 in Hannover, Germany.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://psconf.eu/schedule&quot;&gt;schedule&lt;/a&gt; to see the many great sessions. No matter if you are a PowerShell beginner, or a seasoned user - there will be lots of content for you.&lt;/p&gt;

&lt;p&gt;I have been attending and speaking at the conference for the last 3 years, and although the sessions is a great part of attending - the atmosphere and the opportunity meet and talk to people from the community is even bigger for me. Numerous times people you only know from online scenes such as Twitter is attending, so being able to meet and chat in person is great.&lt;/p&gt;

&lt;p&gt;Check out the psconf.eu 2019 aftermovie to get a sense of the atmosphere:&lt;/p&gt;
&lt;iframe src=&quot;https://www.youtube.com/embed/oYFw8YNSWAg&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;
&lt;/iframe&gt;

&lt;h2 id=&quot;the-norwegian-mvp-day&quot;&gt;The Norwegian MVP Day&lt;/h2&gt;

&lt;p&gt;In the last couple of years, the Norwegian MVP community have arranged a community day where we share relevant information, targeted at Norwegian customers and organizations. The theme for this year is: “2020 what MS can do for you: Going beyond 365”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/MicrosoftMVPAward.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The event will happen on October 8th, shortly after Microsoft Ignite. Hence, I am planning to do a session with relevant news from there around automation.&lt;/p&gt;

&lt;p&gt;More information about the event is available &lt;a href=&quot;https://mvpdagen.no&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;user-groups&quot;&gt;User groups&lt;/h2&gt;

&lt;p&gt;I am involved as an organizer and board member in two user groups, the first being &lt;a href=&quot;https://www.meetup.com/en-AU/Azure-User-Group-Norway/&quot;&gt;Azure User Group Norway&lt;/a&gt;. We have plans to host a round table event later this year, in addition to regular online meetings.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/AUGNorway.jpeg&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The second user group is being rebranded these days, more information will be published as soon as the new name is official - stay tuned!&lt;/p&gt;

&lt;h2 id=&quot;microsoft-ignite&quot;&gt;Microsoft Ignite&lt;/h2&gt;

&lt;p&gt;Since I started attending IT conferences around 2008 I have always attended the smaller ones. They have been mostly PowerShell focused, but also some others like Microsoft Ignite On Tour. Hence, I have never attended the larger ones such as Microsoft Ignite (formerly Teched).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2020_ignite_01.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This year however, I plan to submit some proposals for &lt;a href=&quot;https://www.microsoft.com/en-us/ignite&quot;&gt;Microsoft Ignite&lt;/a&gt; (September 21–25, 2020) in New Orleans.&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;2020 will be a busy, but also a very exciting year with regards to community engagements. The technologies I work with (mostly Azure and automation) also evolve a lot, and a lot more is to come - fun times!&lt;/p&gt;
</description>
        <pubDate>Wed, 12 Feb 2020 06:30:00 +0000</pubDate>
        <link>http://www.powershell.no/community,/conferences/2020/02/12/speaker-engagements.html</link>
        <guid isPermaLink="true">http://www.powershell.no/community,/conferences/2020/02/12/speaker-engagements.html</guid>
        
        
        <category>Community,</category>
        
        <category>Conferences</category>
        
      </item>
    
      <item>
        <title>Using Azure Key Vault for local administrator password rotation</title>
        <description>&lt;p&gt;In this article, we are going to see how we can leverage Azure Key Vault for storing local administrator passwords configured on Windows Servers. Before we get started, let us have a quick overview of what Azure Key Vault is.&lt;/p&gt;

&lt;h2 id=&quot;azure-key-vault&quot;&gt;Azure Key Vault&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Azure Key Vault is a tool for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, or certificates. A vault is logical group of secrets.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Anybody with an Azure subscription can create and use key vaults. Although Key Vault benefits developers and security administrators, it can be implemented and managed by an organization’s administrator who manages other Azure services. For example, this administrator can sign in with an Azure subscription, create a vault for the organization in which to store keys, and then be responsible for operational tasks like these:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Create or import a key or secret&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Revoke or delete a key or secret&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Authorize users or applications to access the key vault, so they can then manage or use its keys and secrets&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/azure-key-vault.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Source, and more information: &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/key-vault/basic-concepts&quot;&gt;https://docs.microsoft.com/en-us/azure/key-vault/basic-concepts&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Usage is not limited to applications, as we can easily create and retrieve secrets using the Azure CLI, Azure PowerShell module or any other tool which can interact via a REST interface.&lt;/p&gt;

&lt;h2 id=&quot;scenario&quot;&gt;Scenario&lt;/h2&gt;

&lt;p&gt;Best practice when it comes to security involves rotating secrets on a regular basis.
One such example is Active Directory domain joined computers.&lt;/p&gt;

&lt;p&gt;Microsoft provides a product for this scenario:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The &lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=46899&quot;&gt;“Local Administrator Password Solution”&lt;/a&gt; (LAPS) provides management of local account passwords of domain joined computers. Passwords are stored in Active Directory (AD) and protected by ACL, so only eligible users can read it or request its reset.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;While this works great for domain joined computers, we will look at an alternate approach which is not limited for use with Active Directory. Although that is the provided example, it can easily be extended to include other environments - such as root users for Linux machines, for example. Another scenario might be many Active Directory forests consolidating their local password management in Azure Key Vault.&lt;/p&gt;

&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;/h2&gt;

&lt;p&gt;The solution consist of several building blocks:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;An Azure Key Vault&lt;/li&gt;
  &lt;li&gt;A hybrid runbook worker&lt;/li&gt;
  &lt;li&gt;An Azure Automation runbook&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An Azure Key Vault dedicated for storing secrets will need to be provisioned. In this example, a single Key Vault is used to store the local administrator password for all Windows Servers in an Active Directory domain. Access to this vault needs to be restricted, similarly to how access to the Domain Admins security group in Active Directory is restricted to only a limited set of people. The only use case for retrieving passwords from this vault should be when the domain trust is broken and we need to log on to a server with a local administrator account. One way to grant just-in-time access to this vault could be securing it with &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure&quot;&gt;Azure Active Directory Privileged Identity Management&lt;/a&gt;, where approvals can be leveraged before granting access to the vault.&lt;/p&gt;

&lt;p&gt;Next, we will need access to all target servers - in this example all servers within the Active Directory domain - except Domain Controllers, which does not have any local accounts.
In this example, we will leverage Azure Automation to accomplish this. We will then need an &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker&quot;&gt;Azure Automation Hybrid Runbook Worker&lt;/a&gt; where our PowerShell runbook can execute from.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/azure-automation-hybrid-worker.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The final piece is the runbook which will contain the actual code for performing password rotation as well as storing them in the Key Vault.&lt;/p&gt;

&lt;p&gt;I have written an example runbook called &lt;a href=&quot;https://github.com/janegilring/PSCommunity/blob/master/Azure/Automation/Runbooks/Reset-LocalAdministratorPassword.ps1&quot;&gt;Reset-LocalAdministratorPassword.ps1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It accepts 4 parameters:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;PasswordLength&lt;/li&gt;
  &lt;li&gt;SpecialCharCount&lt;/li&gt;
  &lt;li&gt;PasswordAgeThreshold&lt;/li&gt;
  &lt;li&gt;Force&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The runbook logic is the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Retrieve all computer accounts from Active Directory with “Server” present in the operating system property, except domain controllers&lt;/li&gt;
  &lt;li&gt;Connect to Azure Key Vault&lt;/li&gt;
  &lt;li&gt;Foreach Server in Servers
    &lt;ul&gt;
      &lt;li&gt;Check if existing entry for the server is present in Key Vault
        &lt;ul&gt;
          &lt;li&gt;If yes
            &lt;ul&gt;
              &lt;li&gt;Check when password was last updated&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;If older than specified threshold (default 180 days): Update password and store in vault
            &lt;ul&gt;
              &lt;li&gt;Check if Force parameter is true
                &lt;ul&gt;
                  &lt;li&gt;If yes: Update password&lt;/li&gt;
                &lt;/ul&gt;
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;If no: Create password and store in vault&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The runbook would need to be scheduled within Azure Automation to run on a regular basis, for example once every day.&lt;/p&gt;

&lt;p&gt;Example output from the Azure Automation runbook:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/azure-automation-password-runbook.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When re-run after the initial execution, no changes are made since the password threshold is not met yet:
&lt;img src=&quot;/images/azure-automation-password-runbook-02.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Example Azure Key Vault content:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/azure-key-vault-example.png&quot; alt=&quot;alt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/azure-key-vault-example-02.png&quot; alt=&quot;alt&quot; height=&quot;481px&quot; width=&quot;400px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You might notice that there was no error logging configured in the runbook. The reason for that is we can simply &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/automation/automation-manage-send-joblogs-log-analytics&quot;&gt;Forward job status and job streams from Automation to Azure Monitor logs&lt;/a&gt;. After doing so, we can create alert rules in Azure Monitor to notify an action group responsible for monitoring when errors occurs in the runbook - either by SMS, e-mail, a Logic App sending notifications to Slack or Microsoft Teams and so on.&lt;/p&gt;

&lt;p&gt;An example log query to monitor the error stream in our example runbook:
&lt;strong&gt;AzureDiagnostics | where ResourceProvider == “MICROSOFT.AUTOMATION” and Category == “JobStreams” and StreamType_s == “Error”  |
where RunbookName_s == “Reset-LocalAdministratorPassword”&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;

&lt;p&gt;In this article we have looked at the challenge of rotating passwords on Windows Servers on a regular basis, using a PowerShell runbook executing on a hybrid runbook worker to perform the actual work.
Azure Automation works great for hybrid scenarios like this. Another option when working with more cloud native services might be executing the code from Azure Functions, eliminating the need for a server to run the code on. This is something we will look at for a different scenario in a future article.&lt;/p&gt;
</description>
        <pubDate>Sun, 29 Sep 2019 15:30:00 +0000</pubDate>
        <link>http://www.powershell.no/powershell,/azure/2019/09/29/azure-key-vault.html</link>
        <guid isPermaLink="true">http://www.powershell.no/powershell,/azure/2019/09/29/azure-key-vault.html</guid>
        
        
        <category>PowerShell,</category>
        
        <category>Azure</category>
        
      </item>
    
      <item>
        <title>Introducing the Azure File Sync DSC resource module</title>
        <description>&lt;p&gt;In this article, we are going to introduce a new PowerShell DSC resource module called AzureFileSyncDsc. Before we get started, let us have a quick overview of what Azure File Sync is.&lt;/p&gt;

&lt;h1 id=&quot;azure-file-sync&quot;&gt;Azure File Sync&lt;/h1&gt;

&lt;p&gt;Azure File Sync is a cloud service which makes it possible for customers using Windows File servers to centralize file services in Azure storage, while having a cache in multiple locations for fast, local performance. Among the benefits of using the service is offloading local datacenter resources, such as backup infrastructure - by leveraging Azure Backup. It can also be a replacement for DFS-R (Distributed File System Replication).&lt;/p&gt;

&lt;p&gt;The service is based on several building blocks:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;One or more Windows File servers (Windows Server 2012 R2 or newer)&lt;/li&gt;
  &lt;li&gt;An agent deployed to the Windows file servers (referred to as Server Endpoints)&lt;/li&gt;
  &lt;li&gt;An Azure storage account&lt;/li&gt;
  &lt;li&gt;An Azure File Share (referred to as the Cloud Endpoint)&lt;/li&gt;
  &lt;li&gt;An Azure Storage Sync service&lt;/li&gt;
  &lt;li&gt;Optionally, an Azure Recovery Services Vault (for backing up Azure File shares)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A short introduction video is available here:&lt;/p&gt;
&lt;iframe src=&quot;https://www.youtube.com/embed/Zm2w8-TRn-o&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;
&lt;/iframe&gt;

&lt;p&gt;More information about the concept, requirements and planning considerations is available in the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-planning&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would also recommend the following video from Microsoft Ignite 2018 which provides a walkthrough of the features in Azure File Sync:&lt;/p&gt;
&lt;iframe src=&quot;https://www.youtube.com/embed/HAQajyFJ58U&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;
&lt;/iframe&gt;

&lt;h2 id=&quot;azure-file-sync-dsc&quot;&gt;Azure File Sync DSC&lt;/h2&gt;

&lt;p&gt;The Azure File Sync DSC resource module contains a couple of DSC resources, which can provide declarative automation of some of the tasks required to install and configure the Azure File Sync agent on Windows Server.&lt;/p&gt;

&lt;p&gt;The first one is installing the Azure File Sync agent and the Az PowerShell module, which is a prerequisite for the agent. The resource will also register the agent against the specified Azure Storage Sync service.&lt;/p&gt;

&lt;p&gt;Example usage of the AzureFileSyncAgent DSC resource:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/87b812bbb1dbfc1035a9d843a1b86f41.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;The second resource is adding a server endpoint, which will synchronize a cloud endpoint against a local path specified in the configuration.&lt;/p&gt;

&lt;p&gt;Example usage of the AzureFileSyncServerEndpoint DSC resource:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/8eae732b07d0f99306ba7b36d8fc0ff1.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;By combining other existing DSC resources, such as the StorageDsc module, it is possible to fully automate the setup of a hybrid file server from formatting disks, configuring drive letters to installing and registering the Azure File Sync agent - as well as adding a server endpoint. This is not only useful for initial setup, but also for disaster recovery purposes. Imagine a local file server fails for some reason and needs to be rebuilt. By combining fast VM provisioning with PowerShell Desired State Configuration for automating all aspects of the file server (adding file shares and such), the server can be provisioned in minutes and be ready to server client requests. Content will be downloaded on-demand when users tries to access files.&lt;/p&gt;

&lt;p&gt;At PowerShell Conference Europe 2019 in Hannover, I did a presentation on Azure File Sync - where I showed the DSC resource in action. The recording is available here:&lt;/p&gt;
&lt;iframe src=&quot;https://www.youtube.com/embed/Qc9fXuavYXA&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;
&lt;/iframe&gt;

&lt;p&gt;If you encounter any issues, or have suggestions for improvements or new features, feel free to submit an issue in the &lt;a href=&quot;https://github.com/janegilring/AzureFileSyncDsc/issues&quot;&gt;AzureFileSyncDsc repository&lt;/a&gt; on GitHub.&lt;/p&gt;
</description>
        <pubDate>Sun, 04 Aug 2019 15:30:00 +0000</pubDate>
        <link>http://www.powershell.no/powershell,/azure/2019/08/04/azure-filesync-dsc.html</link>
        <guid isPermaLink="true">http://www.powershell.no/powershell,/azure/2019/08/04/azure-filesync-dsc.html</guid>
        
        
        <category>PowerShell,</category>
        
        <category>Azure</category>
        
      </item>
    
  </channel>
</rss>
