How to quickly install openshift in docker
This article mainly introduces how to quickly install openshift in docker, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Prepare beforehand
[root@host ~] # git clone http://github.com/liumiaocn/easypack.gitCloning into 'easypack'...remote: Counting objects: 1050, done.remote: Compressing objects: 100% (59max 59), done.remote: Total 1050 (delta 29), reused 6 (delta 3), pack-reused 985Receiving objects: 100% (1050 bytes/s 1050), 157.41 KiB | 0 bytes/s, done.Resolving deltas: 100% (464max 464) Done. [root@host ~] # cd easypack/openshift/ [root@host openshift] # lsinstall-openshift.sh [root@host openshift] #
Installation
Installation command: sh install-openshift.sh
[root@host openshift] # sh install-openshift.sh Sun May 6 09:16:16 EDT 2018 UTC # Step 1: OS version confirm: Linux host.localdomain 3.10.0-514.el7.x86_64 # 1 SMP Tue Nov 22 16:42:41 UTC 2016 x86 "64 GNU/LinuxCentOS Linux release 7.3.1611 (Core) # # Install docker Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.it.ubc.ca * extras: mirror.it.ubc.ca * updates: mirror.csclub.uwaterloo.ca... Install dockerSun May 6 09:16:16 EDT 2018 insecure-registries # Step 2: Set net.ipv4.ip_forwardnet.ipv4.ip_forward=1net.ipv4.ip_forward=1sysctl net.ipv4.ip_forwardnet.ipv4.ip_forward= 1Sun May 6 09:16:17 EDT 2018 weekend # Step 3: Set registry & Restart docker {"insecure-registries": ["172.30.0.0Mab 16"]} # # systemctl daemon-reload## systemctl restart docker## confirm docker versionClient: Version: 1. API version: 1.26 Package version: Go version: go1.8.3 Git commit: 774336d/1.13.1 Built: Wed Mar 7 17:06:16 2018 OS/Arch: linux/amd64Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: Go version: go1.8.3 Git commit: 774336d/1.13.1 Built: Wed Mar 7 17:06:16 2018 OS / Arch: linux/amd64 Experimental: falseSun May 6 09:16:20 EDT 2018## Step 4: Set for firewall... Set the firewall port Sun May 6 09:16:21 EDT 2018 firewall # Step 5: get and setting oc: Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.it.ubc.ca * extras: mirror.it.ubc.ca * updates: mirror.csclub.uwaterloo.caPackage wget-1.14-15.el7_4.1.x86_64 already installed and latest versionNothing to do--2018-05-06 09Freight 16 Step 22 -. Download the oc client tool 2018-05-06 09:16:40 (2.45 MB/s)-'Mr. openshift-origin-client-tools-v3.9.0-191feceMB Linuxtalk 64bit.tar.gz' download ô saved [44156681 effective 44156681]. Omit / usr/local/bin/ococ v3.9.0+191fecekubernetes v1.9.1+a0ce1bc657features: Basic-Auth GSSAPI Kerberos SPNEGOSun May 6 09:16:42 EDT 2018 Basic-Auth GSSAPI Kerberos SPNEGOSun May # Step 6: start up oc clusterPulling image openshift/origin:v3.9.0Pulled 1 EDT 4 layers, 31% completePulled 2 layers 4 layers, 63% completePulled 3 layers 4 layers, 75% completePulled 3 layers 4 layers, 80% completePulled 3 layers 4 layers, 86% completePulled 3 layers 4 layers, 91% completePulled 3 layers 4 layers, 95% completePulled 3 layers 4 layers, 99% completePulled 49 layers 100% completeExtractingImage pull completeUsing nsenter mounter for OpenShift volumesUsing 127.0.0.1 as the server IPStarting OpenShift using openshift/origin:v3.9.0... OpenShift server started.The server is accessible via web console at: https://127.0.0.1:8443You are logged in as: User: developer Password: To login as administrator: oc login-u system:adminSun May 6 09:20:37 EDT 2018REPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/ Openshift/origin-web-console v3.9.0 6d397283b924 6 days ago 489 MBdocker.io/openshift/origin-deployer v3.9.0 2dcb16bd17a4 6 days ago 1.25 GBdocker.io/openshift/origin v3.9.0 e28708220c0b 6 days ago 1.25 GBdocker.io/openshift/origin-pod v3.9.0 b549aa96e0a7 6 days ago 220 MBdocker.io/capitalone/hygieia-api latest 8e7b476005b9 15 months ago 684 MBSun May 6 09:20:38 EDT 2018 as # Step 7: oc login-u developerLogged into "https://127.0.0.1:8443" as" developer "using existing credentials.You have one project on this server:" myproject "Using project" myproject. # # Finished. [root@host openshift] #
Result confirmed
Related mirror images
[root@host openshift] # docker images | grep openshiftdocker.io/openshift/origin-web-console v3.9.0 6d397283b924 6 days ago 489 MBdocker.io/openshift/origin-docker-registry v3.9.0 45f47bc77de8 6 days ago 458 MBdocker.io/openshift/origin-haproxy-router v3.9.0 42e8fd168a7a 6 days ago 1.28 GBdocker.io/openshift/origin-deployer v3.9.0 2dcb16bd17a4 6 days ago 1.25 GBdocker.io/openshift/origin v3.9.0 e28708220c0b 6 days ago 1.25 GBdocker.io/openshift/origin-pod v3.9.0 b549aa96e0a7 6 days ago 220 MB [root@host openshift] #
Verify administrator permissions
[root@host openshift] # oc login-u system:adminLogged into "https://127.0.0.1:8443" as" system:admin "using existing credentials.You have access to the following projects and can switch between them with'oc project': default kube-public kube-system * myproject openshift openshift-infra openshift-node openshift-web-consoleUsing project" myproject ". [root @ host openshift] #
Local connection mode
Ssh-p 10023-L 80 127.0.0.1ssh 127.0.0.1 127.0.0.1ssh-p 10023-L 8443 127.0.1 https://127.0.0.1:8443 thank you for reading this article carefully. I hope the article "how to quickly install openshift in docker" shared by the editor will be helpful to you. At the same time, I hope you can support me and pay attention to the industry information channel. More related knowledge is waiting for you to learn!