OpenShift: Difference between revisions

From Bitpost wiki
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 9: Line 9:
So to get our open source PaaS, we install CentOS, then install Openshift-Origin on it.  I think.
So to get our open source PaaS, we install CentOS, then install Openshift-Origin on it.  I think.


=== Quick Start ===
=== Quick Start (binary on existing VM/metal) ===


For a quick rampup, you can install a minishift cluster on VirtualBox.  Minishift puts everything in one simplified package.
For a quick rampup, stand up a CentOS machine, and run a Red Hat Origin binary.
 
* Install prerequisites on your CentOS system:
yum install nano wget git net-tools bind-utils yum-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct
yum update
systemctl reboot
yum install atomic
yum install docker
[root@C68 openshift-origin-server-v3.9.0-191fece-linux-64bit]# docker-storage-setup create first /etc/sysconfig/docker-storage-setup
  Created storage configuration first
nano /etc/docker/daemon.json
    add: { "insecure-registries": ["172.30.0.0/16"] }
systemctl enable docker
systemctl start docker
systemctl is-active docker
iptables -F
* [https://docs.openshift.org/latest/getting_started/administrators.html#downloading-the-binary Binary instructions]
* [https://github.com/openshift/origin/releases Binary releases] - get client and server
* Untar the client, initialize it, and let it start the server:
cd ~/apps
tar -xvzf (client).tar.gz
cd /usr/local/bin
ln -s /root/apps/openshift-origin-client-tools-v3.10.0-dd10d17-linux-64bit/oc .
oc cluster up --public-hostname=192.168.241.58
# WAIT.... for this finally...
  Login to server ...
  Creating initial project "myproject" ...
  Server Information ...
  OpenShift server started.
 
  The server is accessible via web console at:
      https://192.168.240.95:8443
 
  You are logged in as:
      User:    developer
      Password: <any value>
 
  To login as administrator:
      oc login -u system:admin
# Now you can browse to it using the provided url!
 
* Put this in a startup script, should work even after reboot:
iptables -F
oc cluster up --public-hostname=192.168.241.58
 
=== Quick Start (minishift on existing VirtualBox) ===
 
The next-easier way is to install a minishift cluster on VirtualBox.  Minishift puts everything in one simplified package. But you need metal to install it!


* [https://github.com/minishift/minishift/releases Download the minishift command] for your OS, put it in your path
* [https://github.com/minishift/minishift/releases Download the minishift command] for your OS, put it in your path

Latest revision as of 18:46, 17 September 2018

Intro

OpenShift is a PaaS (Platform aas) that lets you easily manage containers, using both Docker and Kubernetes.

Openshift-Origin is the open source upstream of OpenShift (like Fedora is to RHEL).

Redhat Atomic is the Enterprise release of Red Hat that is configured for containers. CentOS Atomic is the open source version. HOWEVER it seems that the base CentOS will work just fine. So let's skip this layer since it doesn't seem necessary.

So to get our open source PaaS, we install CentOS, then install Openshift-Origin on it. I think.

Quick Start (binary on existing VM/metal)

For a quick rampup, stand up a CentOS machine, and run a Red Hat Origin binary.

  • Install prerequisites on your CentOS system:
yum install nano wget git net-tools bind-utils yum-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct
yum update
systemctl reboot
yum install atomic
yum install docker
[root@C68 openshift-origin-server-v3.9.0-191fece-linux-64bit]# docker-storage-setup create first /etc/sysconfig/docker-storage-setup 
 Created storage configuration first
nano /etc/docker/daemon.json
   add: { "insecure-registries": ["172.30.0.0/16"] }
systemctl enable docker
systemctl start docker
systemctl is-active docker
iptables -F
cd ~/apps
tar -xvzf (client).tar.gz
cd /usr/local/bin
ln -s /root/apps/openshift-origin-client-tools-v3.10.0-dd10d17-linux-64bit/oc .
oc cluster up --public-hostname=192.168.241.58
# WAIT.... for this finally...
  Login to server ...
  Creating initial project "myproject" ...
  Server Information ...
  OpenShift server started.
  
  The server is accessible via web console at:
      https://192.168.240.95:8443
  
  You are logged in as:
      User:     developer
      Password: <any value>
  
  To login as administrator:
      oc login -u system:admin

# Now you can browse to it using the provided url!
  • Put this in a startup script, should work even after reboot:
iptables -F
oc cluster up --public-hostname=192.168.241.58

Quick Start (minishift on existing VirtualBox)

The next-easier way is to install a minishift cluster on VirtualBox. Minishift puts everything in one simplified package. But you need metal to install it!

$ minishift start --vm-driver=virtualbox
-- Checking if VirtualBox is installed ... OK
-- Downloading OpenShift binary 'oc' version 'v3.7.1'
-- Starting local OpenShift cluster using 'virtualbox' hypervisor ...
-- Minishift VM will be configured with ...
   Memory:    2 GB
   vCPUs :    2
   Disk size: 20 GB
Downloading ISO 'https://github.com/minishift/minishift-b2d-iso/releases/download/v1.2.0/minishift-b2d.iso'
Pulling image openshift/origin:v3.7.1
OpenShift server started.
The server is accessible via web console at:
    https://192.168.99.100:8443
You are logged in as:
    User:     developer
    Password: <any value>
To login as administrator:
    oc login -u system:admin