Created
June 23, 2020 12:41
-
-
Save rakibulinux/8873078b13962c8c762475408d6bfe4e to your computer and use it in GitHub Desktop.
How to install OpenShift Origin on Ubuntu 18.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#install Docker CE | |
#Import the Docker GPG key with the command | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update && sudo apt -y install docker-ce | |
sudo usermod -aG docker $USER | |
#Download OpenShift | |
wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | |
tar xvzf openshift*.tar.gz | |
cd openshift-origin-client-tools*/ | |
sudo mv oc kubectl /usr/local/bin/ | |
oc version | |
#Insecure registry and starting the cluster | |
cat << EOF | sudo tee /etc/docker/daemon.json | |
{ | |
"insecure-registries" : [ "172.30.0.0/16" ] | |
} | |
EOF | |
sudo systemctl restart docker | |
oc cluster up | |
#After the cluster is up, bring it back down with the command: | |
oc cluster down | |
#In that file, search for the line: | |
server: https://127.0.0.1:8443 | |
#Replace that line with: | |
server: https://SERVER_IP:8443 | |
Where SERVER_IP is the IP address of the hosting server. | |
Save and close the file. Bring the cluster back up with the command: | |
oc cluster up --public-hostname=SERVER_IP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment