{"id":402,"date":"2019-08-18T11:42:30","date_gmt":"2019-08-18T09:42:30","guid":{"rendered":"https:\/\/www.petersplanet.nl\/?p=402"},"modified":"2019-08-18T11:55:14","modified_gmt":"2019-08-18T09:55:14","slug":"redhat-openshift-on-aws","status":"publish","type":"post","link":"https:\/\/www.petersplanet.nl\/index.php\/2019\/08\/18\/redhat-openshift-on-aws\/","title":{"rendered":"RedHat Openshift installation on AWS"},"content":{"rendered":"\n<p>To get some hands on experience with OpenShift I have installed OpenShift 4.1 on AWS using the defaults.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>Configure DNS<\/strong><br>Documentation:  <a href=\"https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/installing-aws-account.html\">https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/installing-aws-account.html<\/a> <\/p>\n\n\n\n<p>First I had to configure DNS. As my domain name is not registered at AWS I had to delegate a subdomain to AWS.<br>Create a Hosted Zone at AWS in Route 53. In my case aws.petersplanet.nl<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"333\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2019\/08\/image.png\" alt=\"\" class=\"wp-image-403\" srcset=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2019\/08\/image.png 838w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2019\/08\/image-300x119.png 300w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2019\/08\/image-768x305.png 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p>Then delegate aws.petersplanet.nl to AWS Route 53 by adding NS-records for petersplanet.nl. I only configured 2 for the test.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/ViQvEM3m__sen4IVghGLWqkauFgoeC0Sw2Ucsikhzc3-yPyt7nXs1Foz_xO6f2zNqEH43cVu0SaxxTr5Y-h1IFcryMfnNko4ht2Vxa9xdt1OTMLYsKUgQ7HDbbkMRgnEfH_5lPym\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now you only have to wait some time before the records are active in DNS.<\/p>\n\n\n\n<p><strong>Default installation<\/strong><br>Then I did the default install of OpenShift at AWS.<br>Documentation: <a href=\"https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/installing-aws-default.html\">https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/installing-aws-default.html<\/a><\/p>\n\n\n\n<p>Login with SSH to AWS. Download the installation program from RedHat and unpack it in an installation folder and pull the secret for your cluster.<\/p>\n\n\n\n<p><code>.\/openshift-install create cluster<\/code> <br><br>Choose AWS as your target platform<br>Enter AWS key and secret<br>Select your AWS region<br>Select your base domain<br>Enter a name for the cluster<br>Paste the pull secret form RedHat<br>And wait some time for everything to complete.<\/p>\n\n\n\n<p><code>time=\"2019-08-11T18:23:22+02:00\" level=debug msg=\"Still waiting for the cluster to initialize: Working towards 4.1.9: 100% complete, waiting on authentication\"<br> time=\"2019-08-11T18:24:46+02:00\" level=debug msg=\"Cluster is initialized\"<br> time=\"2019-08-11T18:24:46+02:00\" level=info msg=\"Waiting up to 10m0s for the openshift-console route to be created\u2026\"<br> time=\"2019-08-11T18:24:46+02:00\" level=debug msg=\"Route found in openshift-console namespace: console\"<br> time=\"2019-08-11T18:24:46+02:00\" level=debug msg=\"Route found in openshift-console namespace: downloads\"<br> time=\"2019-08-11T18:24:46+02:00\" level=debug msg=\"OpenShift console route is created\"<br> time=\"2019-08-11T18:24:46+02:00\" level=info msg=\"Install complete!\"<br> time=\"2019-08-11T18:24:46+02:00\" level=info msg=\"To access the cluster as the system:admin user when using 'oc', run 'export KUBECONFIG=\/home\/centos\/openshift-install\/auth\/kubeconfig'\"<br> time=\"2019-08-11T18:24:46+02:00\" level=info msg=\"Access the OpenShift web-console here: https:\/\/console-openshift-console.apps.openshift.aws.petersplanet.nl\"<br> time=\"2019-08-11T18:24:46+02:00\" level=info msg=\"Login to the console with user: kubeadmin, password: XXXX-XXXX-XXXX-XXXX\"<\/code><\/p>\n\n\n\n<p>The web-console for this cluster can be found at:<br>https:\/\/console-openshift-console.apps.openshift.aws.petersplanet.nl <br>Login in with user kubeadmin and the password found in the installation log.<\/p>\n\n\n\n<p>Download and unpack the commandline interface.<br>Login to the cluster with oc<\/p>\n\n\n\n<p><code>$ export KUBECONFIG=&lt;installation_directory&gt;\/auth\/kubeconfig  <br>$ oc whoami <br>system:admin<\/code><\/p>\n\n\n\n<p>The password for user kubeadmin can be found in<\/p>\n\n\n\n<p><code>&lt;installation_directory&gt;\/auth\/kubeadmin-password<\/code><\/p>\n\n\n\n<p>The AWS configuration uses a lot of resources so don&#8217;t forget to at least stop the EC2 servers after the test.<br>You can also completely delete your cluster via the openshift-install command.  <br><a href=\"https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/uninstalling-cluster-aws.html\">https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/uninstalling-cluster-aws.html<\/a> <a href=\"https:\/\/docs.openshift.com\/container-platform\/4.1\/installing\/installing_aws\/uninstalling-cluster-aws.html\"><br><\/a>But I did it the hard way and deleted the cluster on AWS manually which I do not recommend.<\/p>\n\n\n\n<p>A default install on AWS is fairly straightforward but it becomes more complicated if you want to customize the installation. And even more if it is not on AWS but on vSphere or bare metal because then you need to configure the prerequisites all by yourself.<br>Also for version 4.1 the OpenShift Container Platform requires all machines, including the computer that you run the installation process on, to have direct internet access to pull images for platform containers and provide telemetry data to Red Hat. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get some hands on experience with OpenShift I have installed OpenShift 4.1 on AWS using the defaults.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,5],"tags":[],"class_list":["post-402","post","type-post","status-publish","format-standard","hentry","category-cloud","category-linux"],"_links":{"self":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":22,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/402\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}