redhatdemocentral / ocp-install-demo

OpenShift Container Platform installed in fully automated and repeatable fashion on your laptop. Get started with your containerized development with a private PaaS installed in just minutes.
82 stars 60 forks source link

Make alterations to init.sh to install on Linux #27

Closed wzzrd closed 7 years ago

wzzrd commented 7 years ago

Previously this script was a bit biased towards Windows and Mac systems running Virtualbox.

This patch adds some provisions to deploy the OCP on Linux machines as well. Patch was written and tested on Fedora 25, but I don't see any reason why it shouldn't work on any other flavor of Linux.

It adds a variable to choose the right docker-machine driver on Linux (docker-machine-driver-kvm), but assumes the user has installed that driver manually.

I'm assuming the average Linux user installs docker through the distribution's package manager rather than downloading it directly from the Docker website. This is why I have removed the version check for docker on Linux. For docker as shipped with Fedora 25 (1.12), it works fine.

One thing that is a bit tricky, is that on Fedora, CentOS and RHEL, we only allow root to run the docker command. Hence, I added 'sudo' in front of the 'docker ps' test. This does assume your account can execute docker as root.

If other distributions have other provisions for this (i.e. something like a group that is allowed to run docker without sudo, or similar), the sudo command might not be necessary and even a bit intrusive. Haven't tested that though.

eschabell commented 7 years ago

Merged with a few minor adjustments.