Skip to content

Latest commit

 

History

History

Lab18

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Deploying MySQL in Openshift (using minishift)

Openshift platform is fast becoming the most widely used microservices platform for enterprise application platform. In this lab, we will learn how to deploy InnoDB cluster to Openshift platform

Install minishift

Download and install minishift from https://github.com/minishift/minishift/releases. Once downloaded, run minishft

minishift start --cpus 4 --memory 11962

What happens is that minishift will check the prerequisites such as Virtualbox installed, etc, as well as to download the minishift ISO file from github and install it to Virtualbox.

minishift start --cpus 4 --memory 11962
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- 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 http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 20% used OK
-- Writing current configuration for static assignment of IP address ... OK
-- OpenShift cluster will be configured with ...
   Version: v3.11.0
-- 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 ...
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.101 as the host IP
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0330 08:36:07.255531    5190 flags.go:30] Running "create-kubelet-flags"
I0330 08:36:08.014445    5190 run_kubelet.go:49] Running "start-kubelet"
I0330 08:36:08.429295    5190 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I0330 08:38:08.490979    5190 interface.go:26] Installing "kube-proxy" ...
I0330 08:38:08.492246    5190 interface.go:26] Installing "kube-dns" ...
I0330 08:38:08.492268    5190 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I0330 08:38:08.492278    5190 interface.go:26] Installing "openshift-apiserver" ...
I0330 08:38:08.492326    5190 apply_template.go:81] Installing "openshift-apiserver"I0330 08:38:08.495171    5190 apply_template.go:81] Installing "kube-proxy"
I0330 08:38:08.498402    5190 apply_template.go:81] Installing "kube-dns"
I0330 08:38:08.498768    5190 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I0330 08:39:22.526057    5190 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
I0330 08:40:30.624092    5190 run_self_hosted.go:242] openshift-apiserver available
I0330 08:40:30.624913    5190 interface.go:26] Installing "openshift-controller-manager" ...
I0330 08:40:30.624934    5190 apply_template.go:81] Installing "openshift-controller-manager"
I0330 08:40:37.052959    5190 interface.go:41] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding persistent-volumes ...
Adding centos-imagestreams ...
Adding registry ...
Adding router ...
Adding sample-templates ...
Adding web-console ...
I0330 08:40:37.145333    5190 interface.go:26] Installing "persistent-volumes" ...
I0330 08:40:37.145351    5190 interface.go:26] Installing "centos-imagestreams" ...
I0330 08:40:37.145363    5190 interface.go:26] Installing "openshift-image-registry" ...
I0330 08:40:37.145371    5190 interface.go:26] Installing "openshift-router" ...
I0330 08:40:37.145380    5190 interface.go:26] Installing "sample-templates" ...
I0330 08:40:37.145391    5190 interface.go:26] Installing "openshift-web-console-operator" ...
I0330 08:40:37.145929    5190 apply_template.go:81] Installing "openshift-web-console-operator"
I0330 08:40:37.146890    5190 apply_list.go:67] Installing "centos-imagestreams"
I0330 08:40:37.148650    5190 interface.go:26] Installing "sample-templates/mongodb" ...
I0330 08:40:37.148666    5190 interface.go:26] Installing "sample-templates/mariadb" ...
I0330 08:40:37.148674    5190 interface.go:26] Installing "sample-templates/mysql" ...
I0330 08:40:37.148778    5190 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
I0330 08:40:37.148796    5190 interface.go:26] Installing "sample-templates/django quickstart" ...
I0330 08:40:37.148809    5190 interface.go:26] Installing "sample-templates/sample pipeline" ...
I0330 08:40:37.148819    5190 interface.go:26] Installing "sample-templates/postgresql" ...
I0330 08:40:37.148826    5190 interface.go:26] Installing "sample-templates/dancer quickstart" ...
I0330 08:40:37.148833    5190 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
I0330 08:40:37.148840    5190 interface.go:26] Installing "sample-templates/rails quickstart" ...
I0330 08:40:37.148847    5190 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0330 08:40:37.148940    5190 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
I0330 08:40:37.149315    5190 apply_list.go:67] Installing "sample-templates/mongodb"
I0330 08:40:37.150041    5190 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
I0330 08:40:37.150084    5190 apply_list.go:67] Installing "sample-templates/mariadb"
I0330 08:40:37.150180    5190 apply_list.go:67] Installing "sample-templates/mysql"
I0330 08:40:37.150326    5190 apply_list.go:67] Installing "sample-templates/rails quickstart"
I0330 08:40:37.150332    5190 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
I0330 08:40:37.150564    5190 apply_list.go:67] Installing "sample-templates/django quickstart"
I0330 08:40:37.150041    5190 apply_list.go:67] Installing "sample-templates/dancer quickstart"
I0330 08:40:37.150803    5190 apply_list.go:67] Installing "sample-templates/sample pipeline"
I0330 08:40:37.150994    5190 apply_list.go:67] Installing "sample-templates/postgresql"
I0330 08:40:56.036920    5190 interface.go:41] Finished installing "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/cakephp quickstart" "sample-templates/django quickstart" "sample-templates/sample pipeline" "sample-templates/postgresql" "sample-templates/dancer quickstart" "sample-templates/nodejs quickstart" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral"
I0330 08:40:58.216885    5190 interface.go:41] Finished installing "persistent-volumes" "centos-imagestreams" "openshift-image-registry" "openshift-router" "sample-templates" "openshift-web-console-operator"
Server Information ...
OpenShift server started.

The server is accessible via web console at:
    https://192.168.99.101:8443/console

Configure Openshift SCC policy

Use Openshift CLI to configure the policies

oc login -u system:admin
oc edit scc anyuid