Install v1.5 on Ubuntu 16.04 server (OpenShift Origin)
1. Introduction
This page details how to install OpenShift Origin 1.5, in an Ubuntu 16.04 64-bit server, following the "Method 2: Downloading the Binary" described at:
https://docs.openshift.org/latest/getting_started/administrators.html#getting-started-administrators
2. Pre-requirements
Host preparation reference > https://docs.openshift.org/latest/install_config/install/host_preparation.html#install-config-install-host-preparation
If not yet installed, install 'apt-transport-https' and 'wget':
sudo apt-get install apt-transport-https
sudo apt-get install wget
If not yet installed install docker deamon. REference > https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-cache policy docker-engine
sudo apt-get install -y docker-engine
# check that docker is running
sudo systemctl status docker
# optional, add user to the docker group to avoid having to prepend docker commands with sudo
sudo usermod -aG docker $(whoami)
Docker must be able to pull images from the host system
Reference > https://docs.docker.com/registry/insecure/#deploying-a-plain-http-registry
Ensure you set the --insecure-registry flag
sudo vi /etc/default/docker
# modify or add the DOCKER_OPTS line with the --insecure-registry flag
#DOCKER_OPTS="--insecure-registry
172.30.0.0/16"
DOCKER_OPTS="--insecure-registry
172.30.155.30:5000"
The previous setting didn't work, "/etc/docker/daemon.json" is the platform-independent configuration.
Reference> http://stackoverflow.com/questions/38695515/can-not-pull-push-images-after-update-docker-to-1-12
Create or modify /etc/docker/daemon.json
on the client machine
{ "insecure-registries":["172.30.155.30:5000"] }
Restart docker daemon
sudo /etc/init.d/docker restart
2. Download the binary from the Releases page
cd /opt
sudo wget https://github.com/openshift/origin/releases/download/v1.5.0/openshift-origin-server-v1.5.0-031cbe4-linux-64bit.tar.gz
3. Untar the binary on the local system (and, optionally, remove the binary)
sudo tar -xvzf openshift-origin-server-v1.5.0-031cbe4-linux-64bit.tar.gz
sudo rm openshift-origin-server-v1.5.0-031cbe4-linux-64bit.tar.gz
4. Add the directory you untarred the release into to your path
cd openshift-origin-server-v1.5.0-031cbe4-linux-64bit
export PATH="$(pwd)":$PATH
5. Launch the server
sudo ./openshift start
6. OpenShift Origin services are secured by TLS. In this path we generate a self-signed certificate on startup which must be accepted by your web browser or client.
You must point oc
and curl
at the appropriate CA bundle and client key and certificate to connect to OpenShift Origin. Set the following environment variables:
$ export KUBECONFIG="$(pwd)"/openshift.local.config/master/admin.kubeconfig $ export CURL_CA_BUNDLE="$(pwd)"/openshift.local.config/master/ca.crt $ sudo chmod +r "$(pwd)"/openshift.local.config/master/admin.kubeconfig
This is just for example purposes; in a production environment, developers would generate their own keys and not have access to the system keys.
7. What's next?
Now that you have OpenShift Origin successfully running in your environment, try it out by walking through a sample application lifecycle.