<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>1. Installation and configuration on OpenShift Operations Training</title><link>/docs/01/</link><description>Recent content in 1. Installation and configuration on OpenShift Operations Training</description><generator>Hugo</generator><language>en-us</language><atom:link href="/docs/01/index.xml" rel="self" type="application/rss+xml"/><item><title>1.1 Installation</title><link>/docs/01/01_installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/01_installation/</guid><description>&lt;p&gt;In this lab, you are going to install an OpenShift 4 cluster on AWS.&lt;/p&gt;
&lt;h2 id="task-111-preparing-the-environment"&gt;Task 1.1.1: Preparing the environment&lt;/h2&gt;
&lt;p&gt;Using the information provided by your trainer, ssh into your bastion host and change into the &lt;code&gt;ocp4-ops&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;It is best practice to create a timestamped directory for each cluster installation, for example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#204a87"&gt;cd&lt;/span&gt; ~/ocp4-ops
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir &lt;span style="color:#204a87;font-weight:bold"&gt;$(&lt;/span&gt;date +&lt;span style="color:#4e9a06"&gt;&amp;#34;%Y-%m-%d&amp;#34;&lt;/span&gt;&lt;span style="color:#204a87;font-weight:bold"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="task-112-customizing-the-installation"&gt;Task 1.1.2: Customizing the installation&lt;/h2&gt;
&lt;p&gt;First, we need an SSH keypair. The public key will be used to grant us access to the OpenShift machines we are going to create. Either use an existing keypair or create a new one by executing:&lt;/p&gt;</description></item><item><title>1.2 Cluster inspection</title><link>/docs/01/02_inspection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/02_inspection/</guid><description>&lt;p&gt;Before diving headfirst into configuring the freshly set-up cluster, let&amp;rsquo;s first take a look at certain features.
As we installed the OpenShift cluster on AWS, some components have already been configured for us to use right away, amongst them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An AWS cloud provider, making it possible for controllers to, e.g., create and update AWS load balancers and do node lifecycle management&lt;/li&gt;
&lt;li&gt;A storage class to provision AWS Elastic Block Store (EBS) volumes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="cloud-provider"&gt;Cloud provider&lt;/h2&gt;
&lt;p&gt;In order to understand what a cloud provider is or does, it&amp;rsquo;s easiest to look at the description of the &lt;a href="https://github.com/kubernetes/cloud-provider-aws" target="_blank" rel="noopener"&gt;AWS cloud provider&lt;/a&gt;
:&lt;/p&gt;</description></item><item><title>1.3 Configuration</title><link>/docs/01/03_configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/03_configuration/</guid><description>&lt;p&gt;After the initial installation, we can start configuring the cluster.
Because of the extended use of operators, nearly everything in OpenShift 4 is configured via custom resources.
In some cases configmaps or templates are used, but this is clearly the minority.&lt;/p&gt;
&lt;p&gt;Most of the configuration is done post-installation and can be used to better adapt the cluster to its environment or change its default behaviour.
We are going to configure our own kubelet arguments and change the default project template in order to automatically create some NetworkPolicy resources.&lt;/p&gt;</description></item><item><title>1.4 Additional components</title><link>/docs/01/04_additional-components/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/04_additional-components/</guid><description>&lt;p&gt;In this lab, you will install additional components that are commonly used in production.&lt;/p&gt;
&lt;h2 id="task-141-install-cert-manager"&gt;Task 1.4.1: Install cert-manager&lt;/h2&gt;
&lt;p&gt;cert-manager massively simplifies certificate management for Kubernetes. It provides easy to use tools to issue, manage and automatically renew certificates and supports the ACME protocol. This allows us to easily and automatically get certificates signed by Let&amp;rsquo;s Encrypt for our cluster.&lt;/p&gt;
&lt;p&gt;Install cert-manager as an Operator using the OperatorHub:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Administrator&lt;/strong&gt; view, navigate to &lt;strong&gt;Operators&lt;/strong&gt; -&amp;gt; &lt;strong&gt;OperatorHub&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Enter &lt;strong&gt;cert-manager&lt;/strong&gt; into the filter box&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;cert-manager Operator for Red Hat OpenShift&lt;/strong&gt; and click &lt;strong&gt;Install&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Leave everything as it is, except that you set the &lt;strong&gt;Update approval&lt;/strong&gt; to &lt;strong&gt;Manual&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Install&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;As soon as it appears, approve the install plan presented to you by clicking &lt;strong&gt;Approve&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Check for the existence of the &lt;code&gt;cert-manager-operator&lt;/code&gt; pod&lt;/li&gt;
&lt;/ul&gt;
&lt;details data-mode="normalexpertmode" class="normalexpertmode"&gt;
 &lt;summary&gt;Hints&lt;/summary&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oc --namespace cert-manager-operator get pods
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;
&lt;ul&gt;
&lt;li&gt;Also, the Operator should already have created at least the webhook and cainjector pods in the &lt;code&gt;cert-manager&lt;/code&gt; namespace&lt;/li&gt;
&lt;/ul&gt;
&lt;details data-mode="normalexpertmode" class="normalexpertmode"&gt;
 &lt;summary&gt;Hints&lt;/summary&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oc --namespace cert-manager get pods
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;
&lt;p&gt;The Operator will also automatically create a &lt;code&gt;CertManager&lt;/code&gt; custom resource named &lt;code&gt;cluster&lt;/code&gt;.
In order to use DNS01 challenges on OpenShift clusters installed on AWS, we need to &lt;a href="https://docs.openshift.com/container-platform/latest/security/cert_manager_operator/cert-manager-operator-issuer-acme.html#cert-manager-acme-dns01-explicit-aws_cert-manager-operator-issuer-acme" target="_blank" rel="noopener"&gt;add some configuration to cert-manager&amp;rsquo;s configuration&lt;/a&gt;
:&lt;/p&gt;</description></item><item><title>1.5 Uptime app</title><link>/docs/01/05_deploy-uptime-app/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/05_deploy-uptime-app/</guid><description>&lt;p&gt;In this lab you&amp;rsquo;re going to deploy an application on your freshly-installed OpenShift cluster.&lt;/p&gt;
&lt;p&gt;The application&amp;rsquo;s availability will be monitored and recorded by an external monitoring system.
Your main goal for the rest of this training is to keep this application up and running, no matter what you do.&lt;/p&gt;


&lt;div class="alert alert-primary" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Note&lt;/h4&gt;

At any time you can view the availability of your cluster console and the uptime app on &lt;a href="https://grafana-ops.training.acend.ch/d/7KmbRHXGz/ocp4monitoring?orgId=1&amp;amp;refresh=5s&amp;amp;var-userdropdown=&amp;#43;username&amp;#43;" target="_blank" rel="noopener"&gt;this&lt;/a&gt;
 dashboard. Credentials to login will be provided by your trainers.

&lt;/div&gt;

&lt;h2 id="uptime-app"&gt;Uptime app&lt;/h2&gt;
&lt;p&gt;The application you&amp;rsquo;re going to install is a simple Python app. It&amp;rsquo;s going to be scaled to 2 replicas in order to achieve high availability.&lt;/p&gt;</description></item><item><title>1.6 Backup</title><link>/docs/01/06_backup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/01/06_backup/</guid><description>&lt;p&gt;In this lab, you will create scheduled backups for the most important cluster components.&lt;/p&gt;
&lt;h2 id="task-161-create-user-workload-backups"&gt;Task 1.6.1: Create user workload backups&lt;/h2&gt;
&lt;p&gt;First, check the &lt;code&gt;backupStorageLocation&lt;/code&gt;&amp;rsquo;s health and name:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;oc -n openshift-adp get backupstoragelocations.velero.io 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output should show you that you&amp;rsquo;ve got &lt;code&gt;backupStorageLocation&lt;/code&gt; resource named &lt;code&gt;default&lt;/code&gt; with &lt;code&gt;PHASE&lt;/code&gt; &lt;code&gt;Available&lt;/code&gt;. If the &lt;code&gt;PHASE&lt;/code&gt; shows something else, there&amp;rsquo;s most probably a permissions or typo problem in your &lt;code&gt;dataProtectionApplication&lt;/code&gt; resource.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000"&gt;NAME PHASE LAST VALIDATED AGE DEFAULT&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#000"&gt;default Available 4s 3m true&lt;/span&gt;&lt;span style="color:#f8f8f8"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, create a daily backup of the resources in namespace &lt;code&gt;uptime-app-prod&lt;/code&gt; with a lifetime of 5 days by creating the following &lt;code&gt;Schedule&lt;/code&gt; manifest:&lt;/p&gt;</description></item></channel></rss>