<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>minishift Archives - Tech Chronicles</title>
	<atom:link href="http://kostacipo.stream/tag/minishift/feed/" rel="self" type="application/rss+xml" />
	<link>https://kostacipo.stream/tag/minishift/</link>
	<description>Ramblings of a Tech Dude</description>
	<lastBuildDate>Mon, 25 Nov 2019 15:01:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://kostacipo.stream/wp-content/uploads/2019/12/cropped-profile-32x32.jpg</url>
	<title>minishift Archives - Tech Chronicles</title>
	<link>https://kostacipo.stream/tag/minishift/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To run Local Openshift Cluster with Minishift</title>
		<link>http://kostacipo.stream/is-drinking-from-a-jar-really-better-than-using-a-glass/</link>
					<comments>http://kostacipo.stream/is-drinking-from-a-jar-really-better-than-using-a-glass/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 18 Jan 2019 00:18:16 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[minishift]]></category>
		<category><![CDATA[openshift]]></category>
		<guid isPermaLink="false">https://demo.mekshq.com/johannes/dc/?p=205</guid>

					<description><![CDATA[<p>&#160; This article has been written to walk you through the simplest way to get a running Openshift OKD environment on a Linux system. If you’re unfamiliar with the core concepts of OKD, don’t worry as this guide is easy to follow and doesn’t need prior understanding of Openshift Container platform. What is Minishift? Minishift is an [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/is-drinking-from-a-jar-really-better-than-using-a-glass/">How To run Local Openshift Cluster with Minishift</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>

<p>This article has been written to walk you through the simplest way to get a running Openshift OKD environment on a Linux system. If you’re unfamiliar with the core concepts of OKD, don’t worry as this guide is easy to follow and doesn’t need prior understanding of Openshift Container platform.</p>



<h2>What is Minishift?</h2>
<p>Minishift is an open source tool that helps you run a single-node OpenShift cluster locally inside a VM. You can try out OpenShift or develop with it, day-to-day, on your local host.</p>
<div id="compu-3b322da34e33d87358f2b412187528f6"> </div>
<p>Minishift requires a hypervisor to start the virtual machine on which the OpenShift cluster is provisioned. We will start with the installation of hypervisor of your choice before Minishift setup.</p>
<h2>Step 1: Install Hypervisor</h2>
<p>For Linux users, the common hypervisor choices are KVM and VirtualBox. Check below guides:</p>
<p>How to Install VirtualBox on <a href="https://computingforgeeks.com/how-to-install-vagrant-and-virtualbox-on-fedora-29-fedora-28/" target="_blank" rel="noreferrer noopener" aria-label="Fedora (opens in a new tab)">Fedora</a>, <a href="https://computingforgeeks.com/how-to-install-virtualbox-6-0-on-kali-linux-linux-mint/" target="_blank" rel="noreferrer noopener" aria-label="Kali Linux (opens in a new tab)">Kali Linux</a>, <a href="https://computingforgeeks.com/how-to-install-virtualbox-6-0-on-kali-linux-linux-mint/" target="_blank" rel="noreferrer noopener" aria-label="Kali Linux (opens in a new tab)">Linux Mint</a>, <a href="https://computingforgeeks.com/install-virtualbox-6-0-on-ubuntu-18-04-debian-9-ubuntu-16-04/" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Ubuntu 18.04/16.04/Debian 9</a></p>
<p>How to install KVM on <a href="https://computingforgeeks.com/how-to-install-kvm-on-rhel-8/" target="_blank" rel="noreferrer noopener" aria-label="RHEL/CentOS 8 (opens in a new tab)">RHEL/CentOS 8</a>, <a href="https://computingforgeeks.com/how-to-install-kvm-on-fedora-29-fedora-28/" target="_blank" rel="noreferrer noopener" aria-label="Fedora (opens in a new tab)">Fedora</a>,<a href="https://computingforgeeks.com/complete-installation-of-kvmqemu-and-virt-manager-on-arch-linux-and-manjaro/" target="_blank" rel="noreferrer noopener" aria-label=" Arch Linux (opens in a new tab)"> Arch Linux</a>, <a href="https://computingforgeeks.com/install-kvm-on-centos-7-ubuntu-16-04-debian-9-sles-12-arch-linux/" target="_blank" rel="noreferrer noopener" aria-label="CentOS, Ubuntu/Debian, SLES (opens in a new tab)">CentOS, Ubuntu/Debian, SLES</a></p>
<h2>Step 2: Setting up Minishift hypervisor Driver</h2>
<p>Minishift embeds the VirtualBox driver plug-in, so no additional steps are required to configure it. However, KVM users needs to manually install the driver plug-in.</p>
<h3>Install KVM Driver ( For KVM users)</h3>
<p>For Ubuntu / Debian</p>
<pre class="wp-block-preformatted">sudo usermod -a -G libvirt $(whoami)<br />newgrp libvirt || newgrp libvirtd<br />curl -L <a class="vglnk" href="https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04" rel="nofollow">https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04</a> -o docker-machine-driver-kvm<br />sudo mv docker-machine-driver-kvm /usr/local/bin/docker-machine-driver-kvm<br />sudo chmod +x /usr/local/bin/docker-machine-driver-kvm</pre>
<p>For Fedora / CentOS</p>
<pre class="wp-block-preformatted">sudo usermod -a -G libvirtd $(whoami)<br />newgrp libvirt<br />curl -L <a class="vglnk" href="https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7" rel="nofollow">https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7</a> -o docker-machine-driver-kvm<br />sudo mv docker-machine-driver-kvm /usr/local/bin/docker-machine-driver-kvm<br />sudo chmod +x /usr/local/bin/docker-machine-driver-kvm</pre>
<p>For Arch Linux / Manjaro</p>
<pre class="wp-block-preformatted">sudo usermod -a -G kvm,libvirt $(whoami)<br />sudo sed -ri 's/.?group\s?=\s?".+"/group = "kvm"/1' /etc/libvirt/qemu.conf<br />newgrp libvirt<br />curl -L <a class="vglnk" href="https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7" rel="nofollow">https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7</a> -o docker-machine-driver-kvm<br />sudo mv docker-machine-driver-kvm /usr/local/bin/docker-machine-driver-kvm<br />chmod +x /usr/local/bin/docker-machine-driver-kvm</pre>
<p>Start the default KVM network.</p>
<pre class="wp-block-preformatted">sudo virsh net-start default<br />sudo virsh net-autostart default</pre>
<h2>Step 3: Install Minishift</h2>
<p>Download the archive for your operating system from the <a href="https://github.com/minishift/minishift/releases" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Minishift Releases</a> page and extract its contents.</p>
<pre class="wp-block-preformatted">export VER="1.34.1"
curl -L <a class="vglnk" href="https://github.com/minishift/minishift/releases/download/v$VER/minishift-$VER-linux-amd64.tgz" rel="nofollow">https://github.com/minishift/minishift/releases/download/v$VER/minishift-$VER-linux-amd64.tgz</a> -o minishift-$VER-linux-amd64.tgz
tar xvf minishift-$VER-linux-amd64.tgz</pre>
<p>Add the <strong>minishift</strong> binary to your <em>$PATH</em> environment variable.</p>
<pre class="wp-block-preformatted">sudo mv minishift-$VER-linux-amd64/minishift /usr/local/bin </pre>
<p>Confirm installation.</p>
<pre class="wp-block-preformatted">$ <strong>minishift version</strong>
minishift v1.34.1+c2ff9cb</pre>
<h2>Step 4: Starting Minishift</h2>
<p>We have all the required dependencies installed and we’re ready to start a single node Openshift cluster using Minishift. Please note that this cluster is optimized for development workflows.</p>
<p>The following steps describe how to get started with Minishift on a Linux operating system with the KVM hypervisor driver.</p>
<p>1.. Run the <em>minishift start</em> command:</p>
<pre class="wp-block-preformatted">$ minishift start</pre>
<figure class="wp-block-image"><img decoding="async" class="wp-image-15924 td-animation-stack-type1-2" src="https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-1024x370.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-1024x370.png 1024w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-300x108.png 300w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-768x278.png 768w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-696x252.png 696w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-1068x386.png 1068w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm-1161x420.png 1161w, https://computingforgeeks.com/wp-content/uploads/2019/04/minishift-start-cluster-kvm.png 1919w" alt="" /></figure>
<p>This will do a number of check then provision Minishift VM with below configurations:</p>
<ul>
<li>Memory: 4 GB</li>
<li>vCPUs : 2</li>
<li>Disk size: 20 GB</li>
</ul>
<p>Sample output:</p>
<pre class="wp-block-code"><code>-- Starting Minishift VM .................. OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ... 
   Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ... 
   Retrieving <a class="vglnk" href="http://minishift.io/index.html" rel="nofollow">http://minishift.io/index.html</a> ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 1% used OK
-- Writing current configuration for static assignment of IP address ... WARN
   Importing 'openshift/origin-control-plane:v3.11.0'  CACHE MISS
   Importing 'openshift/origin-docker-registry:v3.11.0'  CACHE MISS
   Importing 'openshift/origin-haproxy-router:v3.11.0'  CACHE MISS
-- OpenShift cluster will be configured with ...
   Version: v3.11.0
-- Pulling the OpenShift Container Image ................................................ OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster .........................................................................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
..........................................
Login to server ...
Creating initial project "myproject" ...
Server Information ...
OpenShift server started.

The server is accessible via web console at:
    <a class="vglnk" href="https://192.168.42.106:8443/console" rel="nofollow">https://192.168.42.106:8443/console</a>

You are logged in as:
    User:     developer
    Password: &lt;any value&gt;

To login as administrator:
    oc login -u system:admin


-- Exporting of OpenShift images is occuring in background process with pid 11207.</code></pre>
<p>If you’re running VirtualBox, use the <em><code>--vm-driver virtualbox</code></em> flag when starting Minishift VM.</p>
<pre class="wp-block-preformatted">$ minishift start --vm-driver virtualbox</pre>
<p>To persistent configuration so that you to run <em>minishift start</em> without explicitly passing the<em> –vm-driver virtualbox</em> flag each time, run:</p>
<div id="compu-1015722658" class="compu-midarticle" data-cfpa="38883"> </div>
<pre class="wp-block-preformatted">$ minishift config set vm-driver virtualbox</pre>
<p>The IP is dynamically generated for each OpenShift cluster. To check the IP, run the <em>minishift ip</em> command.</p>
<h2>Accessing Openshift</h2>
<p>You can access your newly deployed Openshift cluster from the web console or CLI. For access from web console, use the URL shown after cluster start.</p>
<pre class="wp-block-code"><code>The server is accessible via web console at:
    <a class="vglnk" href="https://192.168.42.106:8443/console" rel="nofollow">https://192.168.42.106:8443/console</a></code></pre>
<p>You can run this command in a shell after starting Minishift to get the URL of the Web console:</p>
<pre class="wp-block-preformatted">$ minishift console --url<br /><a class="vglnk" href="https://192.168.42.106:8443/console" rel="nofollow">https://192.168.42.106:8443/console</a></pre>
<p>Alternatively, after starting Minishift, you can use the following command to directly open the console in a browser:</p>
<pre class="wp-block-preformatted">$ <strong>minishift console</strong><br />Opening the OpenShift Web console in the default browser…<br /> [16398:16398:0416/224729.206639:ERROR:sandbox_linux.cc(364)] InitializeSandbox() called with multiple threads in process gpu-process.<br /> [16359:16381:0416/224729.313961:ERROR:browser_process_sub_thread.cc(209)] Waited 5 ms for network service<br /> Opening in existing browser session.</pre>
<figure class="wp-block-image"><img decoding="async" class="wp-image-15922 td-animation-stack-type1-2" src="https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-1024x435.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-1024x435.png 1024w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-300x127.png 300w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-768x326.png 768w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-696x296.png 696w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-1068x454.png 1068w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01-989x420.png 989w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-01.png 1836w" alt="" /></figure>
<p>To login as administrator, use:</p>
<pre class="wp-block-preformatted">Username: <strong>system</strong><br />Password: <strong>admin</strong></pre>
<figure class="wp-block-image"><img decoding="async" class="wp-image-15923 td-animation-stack-type1-2" src="https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-1024x379.png" sizes="(max-width: 1024px) 100vw, 1024px" srcset="https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-1024x379.png 1024w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-300x111.png 300w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-768x284.png 768w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-696x257.png 696w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-1068x395.png 1068w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02-1136x420.png 1136w, https://computingforgeeks.com/wp-content/uploads/2019/04/Openshift-access-web-console-02.png 1852w" alt="" /></figure>
<p>For operation of Openshift from CLI, proceed to step 5.</p>
<h2>Step 5: Install OpenShift Client Binary (oc)</h2>
<p>The minishift start command creates an OpenShift cluster and copies the <code>oc</code>binary onto your host. This binary is located in the <em><strong>~/.minishift/cache/oc/v(VER)</strong></em> directory. We need to copy it to<em> /usr/local/bin</em> for all users to access it.</p>
<pre class="wp-block-preformatted">sudo cp ~/.minishift/cache/oc/v3.11.0/linux/oc /usr/local/bin</pre>
<p>Alternatively, you can add this binary to your <em>PATH</em> using <em>minishift oc-env</em>, which displays the command you need to type into your shell.</p>
<pre class="wp-block-preformatted">$ <strong>minishift oc-env</strong><br />export PATH="/home/jmutai/.minishift/cache/oc/v3.11.0/linux:$PATH"<br /><br /># Run this command to configure your shell:<br /># eval $(minishift oc-env)</pre>
<p>Check if it is working.</p>
<pre class="wp-block-preformatted">$ <strong>oc version</strong><br />oc v3.11.0+0cbc58b<br />kubernetes v1.11.0+d4cacc0<br />features: Basic-Auth GSSAPI Kerberos SPNEGO<br />Server <a class="vglnk" href="https://192.168.42.106:8443/" rel="nofollow">https://192.168.42.106:8443</a><br />kubernetes v1.11.0+d4cacc0</pre>
<p>This tells you the server IP address and port. To login as administrator, use the system account:</p>
<pre class="wp-block-preformatted">$ <strong>oc login -u system:admin</strong><br />Logged into "<a class="vglnk" href="https://192.168.42.106:8443/" rel="nofollow">https://192.168.42.106:8443</a>" as "system:admin" using existing credentials.<br /> You have access to the following projects and can switch between them with 'oc project ':<br /> <code>default kube-dns kube-proxy kube-public kube-system</code><br />myproject<br />openshift<br />openshift-apiserver<br />openshift-controller-manager<br />openshift-core-operators<br />openshift-infra<br />openshift-node<br />openshift-service-cert-signer<br />openshift-web-console <br />Using project "myproject".</pre>
<p>The client certificates used for access are stored in <strong><em>~/.kube/config</em></strong></p>
<p>To view the available login contexts, run:</p>
<pre class="wp-block-preformatted">$ <strong>oc config view</strong><br /> apiVersion: v1<br /> clusters:<br /> cluster:<br /> certificate-authority-data: REDACTED<br /> server: <a class="vglnk" href="https://192.168.42.106:8443/" rel="nofollow">https://192.168.42.106:8443</a><br /> name: 192-168-42-106:8443<br /> contexts:<br /> context:<br /> cluster: 192-168-42-106:8443<br /> namespace: myproject<br /> user: developer/192-168-42-106:8443<br /> name: minishift<br /> context:<br /> cluster: 192-168-42-106:8443<br /> namespace: myproject<br /> user: developer/192-168-42-106:8443<br /> name: myproject/192-168-42-106:8443/developer<br /> context:<br /> cluster: 192-168-42-106:8443<br /> namespace: myproject<br /> user: system:admin/192-168-42-106:8443<br /> name: myproject/192-168-42-106:8443/system:admin<br /> current-context: myproject/192-168-42-106:8443/system:admin<br /> kind: Config<br /> preferences: {}<br /> users:<br /> name: developer/192-168-42-106:8443<br /> user:<br /> token: QdSKNK5DbaLA2AOFM__8-_fJ-Pt7BikZP1uFwsqyNx0<br /> name: system:admin/192-168-42-106:8443<br /> user:<br /> client-certificate-data: REDACTED<br /> client-key-data: REDACTED </pre>
<h2>Stop Minishift</h2>
<p>To stop your Openshift cluster and Minishift VM, run:</p>
<pre class="wp-block-preformatted">$ <strong>minishift stop</strong><br />Stopping the OpenShift cluster…<br />Cluster stopped.</pre>
<p>You can restart OpenShift cluster at any time by running</p>
<pre class="wp-block-preformatted">$ minishift start</pre><p>The post <a href="http://kostacipo.stream/is-drinking-from-a-jar-really-better-than-using-a-glass/">How To run Local Openshift Cluster with Minishift</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/is-drinking-from-a-jar-really-better-than-using-a-glass/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
