Setup OKD (Origin Community Distribution) RedHat OpenShift FOSS distro on Centos 7

  • Hi,

    Been time since I posted something... trying to find a job in Toronto, and not purchasing everything I see here.

    So this is an easy and insecure way to set it up in one server for testing and no need for FQDN. I highly recommend Vultr high freq VMs, at least the 24$ one with 4 GB RAM, the more the better.
    Start from latest Centos 7:

    yum update -y
    yum install -y epel-release
    yum install -y lsof glances net-tools htop nano yum-utils wget rsync git ncdu nload mc p7zip tuned iotop mdadm unzip iperf3 mlocate tree
    sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
    sed -i 's/installonly_limit=5/installonly_limit=2/g' /etc/yum.conf
    timedatectl set-timezone Asia/Amman
    shutdown -r now
    yum clean all && yum autoremove
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
    sudo yum-config-manager --add-repo
    sudo yum install -y  docker-ce docker-ce-cli docker-compose
    sudo usermod -aG docker $USER
    newgrp docker
    sudo mkdir /etc/docker /etc/containers
    nano /etc/containers/registries.conf
    registries = ['']
    nano /etc/docker/daemon.json
       "insecure-registries": [
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    sudo systemctl enable docker
    echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
    sudo sysctl -p
    firewall-cmd --permanent --delete-zone dockerc
    firewall-cmd --permanent --new-zone dockerc
    DOCKER_BRIDGE=`docker network inspect -f "{{range .IPAM.Config }}{{ .Subnet }}{{end}}" bridge`
    firewall-cmd --permanent --zone dockerc --add-source $DOCKER_BRIDGE
    firewall-cmd --permanent --zone dockerc --add-port=1-65535/udp
    firewall-cmd --permanent --zone dockerc --add-port=1-65535/tcp
    firewall-cmd --permanent --zone=public --add-port=1-65535/udp
    firewall-cmd --permanent --zone=public --add-port=1-65535/tcp
    firewall-cmd --reload
    systemctl restart firewalld
    tar xvf openshift-origin-client-tools*.tar.gz
    cd openshift-origin-client*/
    sudo mv  oc kubectl  /usr/local/bin/
    oc version
    oc cluster up --public-hostname='SERVERPUBIP' --routing-suffix=''

    Thats it, be sure to replace

    • SERVERPUBIP with your Server Public IP

    • Asia/Amman and with your Timezone

    • Omit --- in nano commands, don't type those.

  • Reserved for help and replies, remember to upvote.

  • The OKD GitHub page for additional details and the main website.