{"id":11176,"date":"2021-12-18T12:37:53","date_gmt":"2021-12-18T11:37:53","guid":{"rendered":"https:\/\/www.origo.io\/info\/?page_id=11176"},"modified":"2022-11-28T11:56:32","modified_gmt":"2022-11-28T10:56:32","slug":"rancher","status":"publish","type":"page","link":"https:\/\/origo.systems\/info\/stabiledocs\/guides\/rancher\/","title":{"rendered":"Rancher with Origo OS Kubernetes Cluster"},"content":{"rendered":"\n<p>In this guide we will install <a rel=\"noreferrer noopener\" href=\"https:\/\/rancher.com\" target=\"_blank\">Rancher<\/a> to a standard Ubuntu stack, install a Origo OS Kubernetes cluster and then import the Kubernetes cluster into Rancher to manage it with Rancher.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"first-install-a-ubuntu-server\">First install a Ubuntu server<\/h2>\n\n\n\n<p>Install a Ubuntu server using the standard Ubuntu stack. If you have not done this before, follow <a href=\"\/info\/stabiledocs\/guides\/install-a-ubuntu-server\/\" data-type=\"page\" data-id=\"8593\">this guide<\/a>.<\/p>\n\n\n\n<p>You should configure your Ubuntu server with at least 4 GB of memory and 2 vCPU&#8217;s.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-rancher\">Install Rancher<\/h2>\n\n\n\n<p>ssh into your newly installed Ubuntu server and install Docker:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install docker.io<\/code><\/pre>\n\n\n\n<p>Now install Rancher: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker run --privileged -d --name rancher --restart=unless-stopped -p 444:443 rancher\/rancher:v2.6.3-rc10<\/code><\/pre>\n\n\n\n<p>We install beta-version 2.6.3 because issues with release 2.6 and newer Linux kernels as well as Kubernetes 1.22, which are resolved in 2.6.3:<br \/>https:\/\/forums.rancher.com\/t\/new-installation-of-rancher-fatal-error-exit-with-status-1\/20777\/7<br \/>https:\/\/stackoverflow.com\/questions\/69452080\/k3s-cluster-is-pending-in-rancher-dashboard<br \/>Once 2.6.3 or greater is released, update the command above appriately.<\/p>\n\n\n\n<p>Now get the password of the admin user of your new Rancher installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker logs rancher  2&gt;&amp;1 | grep \"Bootstrap Password:\"<\/code><\/pre>\n\n\n\n<p>point a browser to https:\/\/external-ip-address-of-rancher-server:444<br \/>type in the password you just found, and (IMPORTANT) set the server URL to: https:\/\/internal-ip-address-of-rancher-server:444<br \/>where you of course replace &#8220;external-ip-address-of rancher-server&#8221; and &#8220;internal-ip-address-of-rancher-server&#8221; with appropriate values.<br \/>You should now be greeted with the Rancher welcome page similar to:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-4.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-4.png\" alt=\"\" class=\"wp-image-11188\" width=\"394\" height=\"274\"\/><\/a><\/figure><\/div>\n\n\n\n<p>In the Rancher UI go to: Menu -&gt; Cluster Management -&gt; Import Existing -&gt; Generic<\/p>\n\n\n\n<p>Type a name, e.g. &#8220;stabilekube&#8221; and click &#8220;Create&#8221;.<\/p>\n\n\n\n<p>You should now get a page displaying a command starting with &#8220;curl&#8221; you should save for typing into the Kubernetes control plane server we will be creating below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-a-multi-node-kubernetes-cluster\"><strong>Install a multi-node Kubernetes cluster<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-1.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-1.png\" alt=\"\" class=\"wp-image-10744\" width=\"215\" height=\"225\"\/><\/a><\/figure><\/div>\n\n\n\n<p>Install a Kubernetes cluster by following this <a href=\"\/info\/stabiledocs\/guides\/multi-node-kubernetes\/\">guide<\/a>.<br \/>NOTE: You can install as many nodes as you need instead of the default 2 (as shown in the image above). For convenience name your cluster &#8220;stabilekube&#8221; or something similar. If you need more storage than the standard 20GB per Kubernetes node, follow the instructions in <a href=\"\/info\/running-a-minio-object-storage-service-in-stabile\/\" data-type=\"post\" data-id=\"10902\">this guide <\/a>to expand the storage after installing the stack.<\/p>\n\n\n\n<p>After the Kubernetes cluster is up and running, you must set a password for the stabile user in the &#8220;security&#8221; tab, and allow ssh access from your current IP address.<br \/>Once you have done this, head straight to your favourite ssh terminal and ssh to the stack administration server (running the control-plane), to execute all the commands in the steps below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-2.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-2.png\" alt=\"\" class=\"wp-image-10809\" width=\"159\" height=\"225\"\/><\/a><\/figure><\/div>\n\n\n\n<p>The administration server running the control plane is the one with a name ending in &#8220;.0&#8221; &#8211; find its IP address in the dashboard (as shown in the image above).<\/p>\n\n\n\n<p>After Kubernetes has finished installing, as the user &#8220;stabile&#8221;, type in the command you noted from the step above. It should be similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --insecure -sfL https:\/\/10.2.1.2:444\/v3\/import\/4q9jlczdbz8zt8q4vv84rjd7wqldwh7mkfsnb2f8hvndshxlc2qmrm_c-m-dkdjmbk4.yaml | kubectl apply -f -<\/code><\/pre>\n\n\n\n<p>with the IP address and the long id being specific to your environment.<\/p>\n\n\n\n<p>Now head back to the Rancher UI at: https:\/\/external-ip-address-of-rancher-server:444<br \/>and voil\u00e1! after a few minutes, your Origo OS Kubernetes cluster should now be available for managing in the Rancher UI.<br \/><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-5.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-5.png\" alt=\"\" class=\"wp-image-11197\" width=\"668\" height=\"204\"\/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-bitnami-helm-repo\">Add Bitnami Helm repo<\/h2>\n\n\n\n<p>If you want to browse, explore and install some of the leading Open Source Linux software projects using the Rancher UI, you can add the Bitnami Helm repository to your Rancher installation. Simply go to: Menu -&gt; [your clouster]&nbsp;-&gt; Apps &amp; Marketplace -&gt; Repositories -&gt; Create<br \/>type any name into the &#8220;Name&#8221; field, and type &#8220;https:\/\/charts.bitnami.com\/bitnami&#8221; into the field &#8220;Index URL&#8221; and click &#8220;Create&#8221;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-6.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-6.png\" alt=\"\" class=\"wp-image-11219\" width=\"710\" height=\"388\"\/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-a-helm-chart\">Install a Helm Chart<\/h2>\n\n\n\n<p>Before installing any Helm charts, you should provide your cluster with one or more dedicated IP addresss by going to the stack&#8217;s management UI in Origo OS and click &#8220;add IP address mapping&#8221;:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"\/info\/wp-content\/uploads\/2021\/12\/image-7.png\" data-gallery><img loading=\"lazy\" decoding=\"async\" src=\"\/info\/wp-content\/uploads\/2021\/12\/image-7.png\" alt=\"\" class=\"wp-image-11220\" width=\"709\" height=\"532\"\/><\/a><\/figure><\/div>\n\n\n\n<p>This will make an Internal Origo OS IP address available to Kubernetes. Corresponding to this internal IP address is an external IP address, you should use for accessing the services your charts make available, like e.g. web services.<\/p>\n\n\n\n<p>You are now ready to install a chart. Go to: Menu -&gt; [your cluster]&nbsp;-&gt; Apps &amp; Marketplace -&gt; Charts<\/p>\n\n\n\n<p>If you&#8217;re into e.g. scientific computing, you can now install the nice JupyterHub chart. In order to access the web UI, simply follow the instructions to get the password, and log into your new JupyterHub using the external IP address from above.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this guide we will install Rancher to a standard Ubuntu stack, install a Origo OS Kubernetes cluster and then import the Kubernetes cluster into Rancher to manage it with Rancher. First install a Ubuntu server Install a Ubuntu server using the standard Ubuntu stack. If you have not done<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7856,"menu_order":23,"comment_status":"open","ping_status":"closed","template":"page-leftsb.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-11176","page","type-page","status-publish","hentry"],"acf":[],"featured_image_src":null,"featured_image_src_square":null,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/11176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/comments?post=11176"}],"version-history":[{"count":27,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/11176\/revisions"}],"predecessor-version":[{"id":12776,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/11176\/revisions\/12776"}],"up":[{"embeddable":true,"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/pages\/7856"}],"wp:attachment":[{"href":"https:\/\/origo.systems\/info\/wp-json\/wp\/v2\/media?parent=11176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}