Step 1: Update CentOS 7 system
#sudo yum -y update
Step 2: Install and Configure Docker
#sudo yum install -y yum-utils device-mapper-persistent-data lvm2
#sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#sudo yum install -y docker-ce docker-ce-cli containerd.io
Add your standard user account to docker group.
#sudo usermod -aG docker $USER
#newgrp docker
After installing Docker, configure the Docker daemon with an insecure registry parameter of 172.30.0.0/16
#sudo mkdir /etc/docker /etc/containers
#sudo tee /etc/containers/registries.conf<<EOF
[registries.insecure]
registries = ['172.30.0.0/16']
EOF
#sudo tee /etc/docker/daemon.json<<EOF
{
"insecure-registries": [
"172.30.0.0/16"
]
}
EOF
We need to reload systemd and restart the Docker daemon after editing the config.
#sudo systemctl daemon-reload
#sudo systemctl restart docker
Enable Docker to start at boot.
#sudo systemctl enable docker
Then enable IP forwarding on your system.
#echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
#sudo sysctl -p
Step 3: Download the Linux oc binary
At this step, we can download the Linux oc binary from openshift-origin-client-tools-VERSION-linux-64bit.tar.gz and place it in your path.
#wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
#tar xvf openshift-origin-client-tools*.tar.gz
#cd openshift-origin-client*/
#sudo mv oc kubectl /usr/local/bin/
Step 4: Verify the installation of OpenShift client utility.
#oc version
Step 5: Start OpenShift Origin (OKD) Local Cluster
$ oc cluster up
Note: It shows as localhost IP address of the machine. if you want to assign the public IP address then follow the below steps.
Remove Openshift Console redirects to 127.0.0.1
1. oc cluster down
2. oc config get-clusters
3. oc config delete-cluster 127-0-0-1:8443
4. rm -rf /root/openshift.local.clusterup
5. ls -a
6. To change your hostname and IP of the machine
#oc cluster up --public-hostname=mylabserver.com --routing-suffix=54.153.10.22.nip.io
7. go to http://<IP or hostname>:8443/console
#sudo yum -y update
Step 2: Install and Configure Docker
#sudo yum install -y yum-utils device-mapper-persistent-data lvm2
#sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#sudo yum install -y docker-ce docker-ce-cli containerd.io
Add your standard user account to docker group.
#sudo usermod -aG docker $USER
#newgrp docker
After installing Docker, configure the Docker daemon with an insecure registry parameter of 172.30.0.0/16
#sudo mkdir /etc/docker /etc/containers
#sudo tee /etc/containers/registries.conf<<EOF
[registries.insecure]
registries = ['172.30.0.0/16']
EOF
#sudo tee /etc/docker/daemon.json<<EOF
{
"insecure-registries": [
"172.30.0.0/16"
]
}
EOF
We need to reload systemd and restart the Docker daemon after editing the config.
#sudo systemctl daemon-reload
#sudo systemctl restart docker
Enable Docker to start at boot.
#sudo systemctl enable docker
Then enable IP forwarding on your system.
#echo "net.ipv4.ip_forward = 1" | sudo tee -a /etc/sysctl.conf
#sudo sysctl -p
Step 3: Download the Linux oc binary
At this step, we can download the Linux oc binary from openshift-origin-client-tools-VERSION-linux-64bit.tar.gz and place it in your path.
#wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
#tar xvf openshift-origin-client-tools*.tar.gz
#cd openshift-origin-client*/
#sudo mv oc kubectl /usr/local/bin/
Step 4: Verify the installation of OpenShift client utility.
#oc version
Step 5: Start OpenShift Origin (OKD) Local Cluster
$ oc cluster up
Note: It shows as localhost IP address of the machine. if you want to assign the public IP address then follow the below steps.
Remove Openshift Console redirects to 127.0.0.1
2. oc config get-clusters
3. oc config delete-cluster 127-0-0-1:8443
4. rm -rf /root/openshift.local.clusterup
5. ls -a
6. To change your hostname and IP of the machine
#oc cluster up --public-hostname=mylabserver.com --routing-suffix=54.153.10.22.nip.io
7. go to http://<IP or hostname>:8443/console
No comments:
Post a Comment