Openshift 4 Operating
Total Page:16
File Type:pdf, Size:1020Kb
1 V0000000 OpenShift 4 Operating Alfred Bach Partner Enablement Manager Cloud 2 V0000000 About me Alfred Bach Tech. Partner Enablement Manager Cloud 4 years with Rat Hat abach@redhat .com 3 V0000000 OpenShift Installation 4 V0000000 OpenShift 4 Architectural Principles DAY 1 & 2 IMMUTABLE OPERATOR OPERATIONS INFRASTRUCTURE FRAMEWORK Installer + bootstrapping Red Hat Enterprise Linux CoreOS SDK & testing tools Autoscale out of the box Discourage SSH/node mutation OperatorHub for discovery MachineSet node pools Ignition for Machine config OLM delivers upper stack services 5 V0000000 OpenShift 4 Architectural Principles DAY 1 & 2 IMMUTABLE OPERATOR OPERATIONS INFRASTRUCTURE FRAMEWORK Installer + bootstrapping Red Hat Enterprise Linux CoreOS SDK & testing tools Autoscale out of the box Discourage SSH/node mutation OperatorHub for discovery MachineSet node pools Ignition for Machine config OLM delivers upper stack services 6 V0000000 OPENSHIFT CONTAINER PLATFORM | Installation Installation Paradigms OPENSHIFT CONTAINER PLATFORM HOSTED OPENSHIFT Red Hat OpenShift on IBM Cloud * Full Stack Automated (IPI) Pre-existing Infrastructure (UPI) Deploy directly from the IBM Cloud Simplified opinionated “Best Customer managed resources & console. An IBM service, master nodes Practices” for cluster provisioning infrastructure provisioning are managed by IBM Cloud engineers. Fully automated installation and Plug into existing DNS and security Azure Red Hat OpenShift ** updates including host container boundaries Deploy directly from the Azure console. OS. A MSFT service, jointly managed by Red Hat and Microsoft Azure engineers. OpenShift Dedicated ** Get a powerful cluster, fully managed by Red Hat engineers and support; a Red Hat service. 7 * Based on OCP v4.3 GA slated for March; public beta available now ** Entitlements of OCP obtained through a Cloud Pak purchase are not transferable to these environments V0000000 OPENSHIFT PLATFORM What's new in OpenShift 4.3 4.3 Supported Providers Full Stack Automation (IPI) Pre-existing Infrastructure (UPI) * * * Support planned for an upcoming 4.3 z-stream release Generally Available PMs: Katherine Dubé (AWS, Azure, GCP), Maria Bracho (BM UPI, VMware, Upgrades), Peter Lauterbach (RHV), Ramon Acedo Rodriguez (OSP, BM IPI), Mike Barrett (IBM Z & Power) Provider Roadmap & Minimum Supported Version Full Stack Automation Pre-existing Infrastructure Provider (Installer provisioned infra) (User provisioned infra) 4.1 4.1 4.2 4.3+ (z-stream) Bare Metal 4.4 (TBD) 4.1 4.2 4.2 4.2 4.4 4.4 4.4 4.4 4.1 - 4.2+ (z-stream) IBM Power Systems - 4.3+ (z-stream) 9 4.5 - PMs: Katherine Dubé (AWS, Azure, GCP), Maria Bracho (BM UPI, VMware, Alibaba), Peter Lauterbach (RHV), Ramon Acedo Rodriguez (OSP, BM IPI), Mike Barrett (IBM Z & Power) OpenShift Architecture Red Hat® OpenShift® Kibana | Elasticsearch Kibana | Elasticsearch services Infrastructure Registry Registry services Router Router Developers Kubernetes services Prometheus | Grafana Prometheus | Grafana Alertmanager Alertmanager etcd Monitoring | Logging | Tuned Monitoring | Logging | Tuned Admins SDN | DNS | Kubelet SDN | DNS | Kubelet MASTER WORKER WORKER COMPUTE NETWORK STORAGE 10 V0000000 10 OCP Cloud Layout Virtual Environments 11 V0000000 12 V0000000 OpenShift 4 Installer 13 V0000000 OPENSHIFT CONTAINER PLATFORM | Installation Full-stack Automated Installation (aka IPI) User managed Operator managed Control Plane Worker Nodes OCP Cluster Resources OCP Cluster openshift-install deployed RH CoreOS RH CoreOS RHELRH CoreOS CoreOS RHELRH CoreOS CoreOS Cloud Resources Cloud Resources 14 V0000000 OPENSHIFT PLATFORM Full Stack Automated Deployments Simplified Cluster Creation Designed to easily provision a “best practices” OpenShift $ ./openshift-install --dir ./demo create cluster cluster ? SSH Public Key /Users/demo/.ssh/id_rsa.pub ● New CLI-based installer with interactive guided workflow ? Platform aws ? Region us-west-2 that allows for customization at each step ? Base Domain example.com ? Cluster Name demo ● Installer takes care of provisioning the underlying ? Pull Secret [? for help] Infrastructure significantly reducing deployment complexity ************************************************************* INFO Creating cluster... ● Leverages RHEL CoreOS for all node types enabling full INFO Waiting up to 30m0s for the Kubernetes API... INFO API v1.11.0+c69f926354 up stack automation of installation and updates of both INFO Waiting up to 30m0s for the bootstrap-complete event... INFO Destroying the bootstrap resources... platform and host OS content INFO Waiting up to 10m0s for the openshift-console route to be created... INFO Install complete! Faster Install INFO Run 'export KUBECONFIG=<your working directory>/auth/kubeconfig' to manage the cluster with 'oc', the OpenShift CLI. The installer typically finishes within 30 minutes INFO The cluster is ready when 'oc login -u kubeadmin -p <provided>' ● Only minimal user input needed with all non-essential succeeds (wait a few minutes). INFO Access the OpenShift web-console here: install config options now handled by component operator https://console-openshift-console.apps.demo.example.com CRD’s INFO Login to the console with user: kubeadmin, password: <provided> ● See the OpenShift documentation for more details 15 V0000000 OpenShift Installation How everything deployed comes under management Masters (Special) ● Terraform provisions initial masters* ● Machine API adopts existing masters post-provision ● Each master is a standalone Machine object ● Termination protection (avoid self-destruction) Workers ● Each Machine Pool corresponds to MachineSet ● Optionally autoscale (min,max) and health check (replace if not ready > X minutes) Multi-AZ ● MachineSets scoped to single AZ ● Installer stripes N machine sets across AZs by default ● Post-install best effort balance via cluster autoscaler 16 V0000000 INSTALL A OPENSHIFT CLUSTER CONFIDENTIAL Designator Deployment Server RHEL 8 or Centos HAProxy BIND or DNSMasq Control Plane Worker Nodes CNS (Optional) CoreOS CoreOS or Container Native optional RHEL 7 Storage (CEPH) 3 Master Nodes CoreOS 17 Boot Strap Registry DIrect att. Disk V0000000 CoreOS Hubscribe an OpenShift 4 cluster CONFIDENTIAL Designator OCS 2 OCS 2 CNS CORE CORE OCS 2 OCS 2 CNS CORE CORE RHEL OCS 2 OCS 2 CNS CORE CORE Deployment Server RHEL 8 or Centos OCS 2 HAProxy CORE BIND or DNSMasq Control Plane Worker Nodes CNS (Optional) CoreOS CoreOS or Container Native Optional RHEL 7 Storage (CEPH) 3 Master Nodes CoreOS 18 Boot Strap Registry DIrect att. Disk V0000000 CoreOS OPENSHIFT CONTAINER PLATFORM | Installation Pre-existing Infrastructure Installation (aka UPI) User managed Operator managed Control Plane Worker Nodes OCP Cluster Resources openshift-install deployed OCP Cluster Note: Control plane nodes must run RHEL CoreOS! RH CoreOS RHEL RHELRH CoreOS CoreOS RHEL 7 CoreOS Customer deployed Cloud Resources Cloud Resources 19 V0000000 OPENSHIFT CONTAINER PLATFORM | Installation Comparison of Paradigms Full Stack Automation Pre-existing Infrastructure Build Network Installer User Setup Load Balancers Installer User Configure DNS Installer User Hardware/VM Provisioning Installer User OS Installation Installer User Generate Ignition Configs Installer Installer OS Support Installer: RHEL CoreOS User: RHEL CoreOS + RHEL 7 Node Provisioning / Autoscaling Yes Only for providers with OpenShift Machine API support 20 V0000000 Disconnected “Air-gapped” Installation & Upgrading # mirror update image: $ oc adm -a <secret_json> release mirror \ --from=quay.io/<repo>/<release:version> \ --to=<local registry>/<repo> \ --to-release-image=<local registry>/<repo:version> # provide cluster with update image to update to: $ oc adm upgrade --to-mirror=<local repo:version> Customer Cluster Local Copy of Red Hat sourced Update Image Update Image Disconnected Local Container Quay.io OpenShift Cluster Cluster Registry Container Mirrored to updated Registry local registry locally Admin Overview Installation Procedure ● 4.2 introduces support for installing and updating OpenShift ● Mirror OpenShift content to local container registry in the disconnected environment clusters in disconnected environments ● Generate install-config.yaml: $ ./openshift-install create install-config --dir <dir> ● Requires local Docker 2.2 spec compliant container registry to ○ Edit and add pull secret (PullSecret), CA certificate (AdditionalTrustBundle), host OpenShift content and image content sources (ImageContentSources) to install-config.yaml ● Designed to work with the user provisioned infrastructure ● Set the OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE environment variable deployment method during the creation of the ignition configs ○ Note: Will not work with Installer provisioned ● Generate the ignition configuration: $ ./openshift-install create ignition-configs --dir infrastructure deployments <dir> ● 21 Use the resulting ignition files to bootstrap the cluster deployment V0000000 OpenShift 4 Cluster Management Powered by Operators, OpenShift 4 automates many cluster management activities 22 V0000000 OpenShift Architecture Over-the-air updates Release Payload Info machine-config-operato r Machine Cluster Machine Machine machine-os-content Rolling ConfigMachine Version Config Config OperatorConfig ... Operator Operator Operator Daemons ... Machine Machine Config Config Daemon Daemon Download and Update host mount update using mounted content into host content 23 V0000000 OpenShift Architecture Cloud API MachineDeployment MachineSet Machine Machine Machine Set Machine Deployment