官术网_书友最值得收藏!

  • Learn OpenShift
  • Denis Zuev Artemii Kropachev Aleksey Usov
  • 400字
  • 2021-08-13 16:03:59

macOS

The installation and configuration process for macOS is very similar to that for Linux. It assumes that Docker for macOS is being used. The deployment process involves the following:

  • Docker for macOS installation and configuration
  • Installation of openshift-cli and required packages
  • Starting a cluster
The oc cluster up command requires Docker to be installed on your system, because essentially, it creates a Docker container and runs OpenShift inside that Docker container. It is a very elegant and clean solution.

The Docker for macOS installation process is described at the official portal:  https://docs.docker.com/docker-for-mac.

Once the Docker service is running, you need to configure the insecure registry (172.30.0.0/16). From the Docker menu in the toolbar, you need to select the Preferences menu and click on the Daemon icon. In the Basic tab of the configuration dialog, click on the + icon under Insecure registries and add the following new entry: 172.30.0.0/16:

When finished, click on Apply & Restart

Once the Docker service is configured, we need to install all the required software and start the cluster using the following steps:

  1. OpenShift client installation: Install the socat and openshift-cli packages on your system as follows:
$ brew install openshift-cli socat --force
If you do not have brew installed, find the installation process at  https://brew.sh/.
  1. Starting and stopping the OpenShift cluster: The cluster can be started just like it was in Linux:
$ oc cluster up
Starting OpenShift using registry.access.redhat.com/openshift3/ose:v3.7.23 ...
OpenShift server started.

The server is accessible via web console at:
https://127.0.0.1:8443

You are logged in as:
User: developer
Password: <any value>

To login as administrator:
oc login -u system:admin
At the time of writing this book,  oc cluster up on macOS didn't work for version 3.9. I would recommend you to temporarily use 3.7 version of the client utility.

An installation verification can be performed by the OpenShift admin user, as follows:

$ oc login -u system:admin
Logged 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 <projectname>':

default
kube-public
kube-system
* myproject
openshift
openshift-infra
openshift-node

Using project "myproject".

The Openshift cluster is up and ready for work. We may check the status of the cluster using the following command:

$ oc get nodes
NAME STATUS AGE VERSION
localhost Ready 20h v1.7.6+a08f5eeb62

The cluster can be stopped as follows:

$ oc cluster down
主站蜘蛛池模板: 五河县| 白水县| 浑源县| 花莲市| 仁寿县| 汕头市| 宝鸡市| 宜宾县| 吴忠市| 濉溪县| 烟台市| 奉节县| 辉南县| 惠来县| 同德县| 石家庄市| 林周县| 宁南县| 德格县| 芜湖市| 太仆寺旗| 枣庄市| 文登市| 巫山县| 株洲市| 中卫市| 廉江市| 商南县| 万盛区| 海安县| 鹤岗市| 容城县| 拉孜县| 蓝山县| 锡林郭勒盟| 同江市| 瓦房店市| 两当县| 黄陵县| 漯河市| 旌德县|