As mentioned , Redhat OpenShift Container Platform 3.3 is based on Redhat Openshift origin . The current version is 1.3. Since this is OpenSource, you can set it to yourself. We are somewhat moving away from the main topic. But:
This article is about installing the PaaS platform in your homepage. It implies the ability to work with Docker and a good familiarity with RHEL7.1 / CentOS7.1 / Fedora21, you can still use RHEL Atomic Host 7.2.6 and higher. In general, the original documentation suggests two ways. For the developer and for the cluster administrator. The administrator is offered several options, including the installation of a full cluster. Stock up on iron and resources. Yes, of course the knowledge of Ansible does not hurt.
But for now, consider the simplest option. Installing the origin container.
So, you have one of the above systems (in the CentOS 7.2 example) Docker is installed and running. You also installed the client OS (how to do it - by reference ). The minimum resource requirements are met (from the documentation for origin ).
$ oc cluster up ... Ensure that the Docker daemon is running with the following argument: --insecure-registry "172.30.0.0/16"
And it does not start. Docker needs to be configured. Here is the original documentation . With some corrections:
$ sudo mkdir /etc/systemd/system/docker.service.d $ sudo vi /etc/systemd/system/docker.service.d/docker.conf
We place there:
[Service] ExecStart= ExecStart=/usr/bin/docker-current daemon --exec-opt native.cgroupdriver=systemd --selinux-enabled --log-driver=journald --insecure-registry 172.30.0.0/16
The data in the file will override the parameters of the docker launch command line from docker.service:
Commit the changes and restart docker
$ sudo systemctl daemon-reload $ sudo systemctl restart docker
Now
$ sudo oc cluster up
-- Checking OpenShift client ... OK -- Checking Docker client ... OK -- Checking Docker version ... OK -- Checking for existing OpenShift container ... OK -- Checking for openshift/origin:v1.3.0 image ... OK -- Checking Docker daemon configuration ... OK -- Checking for available ports ... WARNING: Binding DNS on port 8053 instead of 53, which may be not be resolvable from all clients. -- Checking type of volume mount ... Using nsenter mounter for OpenShift volumes -- Creating host directories ... OK -- Finding server IP ... Using 192.168.222.129 as the server IP -- Starting OpenShift container ... Creating initial OpenShift configuration Starting OpenShift using container 'origin' Waiting for API server to start listening OpenShift server started -- Installing registry ... OK -- Installing router ... OK -- Importing image streams ... OK -- Importing templates ... OK -- Login to server ... OK -- Creating initial project "myproject" ... OK -- Server Information ... OpenShift server started. The server is accessible via web console at: https://192.168.222.129:8443 You are logged in as: User: developer Password: developer To login as administrator: oc login -u system:admin
It is interesting:
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b68e93c1eacd openshift/origin-docker-registry:v1.3.0 "/bin/sh -c 'DOCKER_R" 50 minutes ago Up 50 minutes k8s_registry.a76d04a6_docker-registry-1-bad99_default_ca436583-9372-11e6-beb5-000c294bdab8_2d4bceba 8fa5d4437791 openshift/origin-haproxy-router:v1.3.0 "/usr/bin/openshift-r" 50 minutes ago Up 50 minutes k8s_router.b921618d_router-1-94nq4_default_ca476a18-9372-11e6-beb5-000c294bdab8_9cdeb6a7 d7a68e36e987 openshift/origin-pod:v1.3.0 "/pod" 50 minutes ago Up 50 minutes k8s_POD.4a82dc9f_router-1-94nq4_default_ca476a18-9372-11e6-beb5-000c294bdab8_63ccb647 946d43c4d595 openshift/origin-pod:v1.3.0 "/pod" 50 minutes ago Up 50 minutes k8s_POD.9fa2fe82_docker-registry-1-bad99_default_ca436583-9372-11e6-beb5-000c294bdab8_f6f9f4a4 158ce37d3e59 openshift/origin:v1.3.0 "/usr/bin/openshift s" 50 minutes ago Up 50 minutes origin
Important note. Docker does not destroy the container when it is stopped. It can be run. But the team
$sudo oc cluster down
destroys by acting like
$ sudo docker stop container_name && docker rm container_name
That is, at midnight the carriage will turn into a pumpkin, a coachman into a rat, and so on.
Web console available:
https://IP_addr:8443
CLI:
$ oc login https://IP_addr:8443
password login pair:
admin
admin
developer
developer
Further, all by analogy.
From interesting
$ sudo docker exec -it origin /bin/bash
We get inside the container, you can see that yes how. By the way, this is CentOS 7.2.
This is all informative, but mostly for an initial acquaintance. For more detailed dating links below. This is already for building a product cluster based on OpenShift.
Source: https://habr.com/ru/post/312778/
All Articles