OpenShift v3.11 インストール①
インストール手順はggれば沢山載っていたので実際に検証です。
参考
OpenShiftをインストールしてみる | 日常系エンジニアのTech Blog
わたしの場合は、CentOS 7 にインストール。
事前にDockerとか入れる必要はないです。prerequisites.yml で勝手に入れてくれます。
[root@all-openshift ~]# yum install NetworkManager git -y [root@all-openshift ~]# systemctl enable --now NetworkManager [root@all-openshift ~]# yum -y install centos-release-openshift-origin311 [root@all-openshift ~]# yum -y install epel-release [root@all-openshift ~]# git clone https://github.com/openshift/openshift-ansible [root@all-openshift ~]# cd openshift-ansible [root@all-openshift openshift-ansible]# git checkout release-3.11 Branch release-3.11 set up to track remote branch release-3.11 from origin. Switched to a new branch 'release-3.11' [root@all-openshift openshift-ansible]# yum -y --enablerepo=epel install ansible [root@all-openshift openshift-ansible]# ansible -v-version ansible 2.9.2 ★2.9 が入ってしまった、2.6 でないといけないため以下対応 [root@all-openshift openshift-ansible]# rpm --nodeps -e ansible [root@all-openshift openshift-ansible]# [root@all-openshift openshift-ansible]# yum-config-manager --disable epel [root@all-openshift openshift-ansible]# yum install ansible [root@all-openshift openshift-ansible]# ansible --version ansible 2.6.20 ☆事前準備完了 ・バックアップ [root@all-openshift openshift-ansible]# cp -p /etc/etansible/hosts /etc/ansible/hosts.bak ・編集後 [root@all-openshift ~]# cat /etc/ansible/hosts [OSEv3:children] masters nodes etcd [OSEv3:vars] openshift_deployment_type=origin openshift_disable_check=disk_availability,memory_availability openshift_node_groups=[{'name': 'node-config-all-in-one', 'labels': ['node-role.kubernetes.io/master=true', 'node-role.kubernetes.io/infra=true', 'node-role.kubernetes.io/compute=true']}] openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}] openshift_service_catalog_version = v3.11 #<-------------------------- 次の記事参照 openshift_enable_service_catalog=false #<-------------------------- 次の記事参照 ansible_service_broker_install = false #<-------------------------- 次の記事参照 [masters] localhost ansible_connection=local [etcd] localhost ansible_connection=local [nodes] localhost ansible_connection=local openshift_node_group_name="node-config-all-in-one" ・チェックブック実行 [root@all-openshift openshift-ansible]# ls ansible.cfg CONTRIBUTING.md examples images meta playbooks README_CONTAINERIZED_INSTALLATION.md roles test BUILD.md DEPLOYMENT_TYPES.md hack inventory openshift-ansible.spec pytest.ini README.md setup.cfg test-requirements.txt conftest.py docs HOOKS.md LICENSE OWNERS README_CONTAINER_IMAGE.md requirements.txt setup.py tox.ini [root@all-openshift openshift-ansible]# [root@all-openshift openshift-ansible]# pwd /root/openshift-ansible [root@all-openshift openshift-ansible]# [root@all-openshift openshift-ansible]# [root@all-openshift openshift-ansible]# aansible-playbook -vvvv playbooks/prerequisites.yml ~ INSTALLER STATUS **************************************************************************************************************************************************************************************************************************** Initialization : Complete (0:01:08) Sunday 26 January 2020 00:09:30 -0800 (0:00:00.046) 0:04:58.741 ******** =============================================================================== container_runtime : Install Docker ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 175.15s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:23 ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Ensure openshift-ansible installer package deps are installed ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 51.67s /root/openshift-ansible/playbooks/init/base_packages.yml:51 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- os_firewall : need to pause here, otherwise the iptables service starting can sometimes cause ssh to fail --------------------------------------------------------------------------------------------------------------------------- 10.24s /root/openshift-ansible/roles/os_firewall/tasks/iptables.yml:43 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- os_firewall : Wait 10 seconds after disabling firewalld ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 10.19s /root/openshift-ansible/roles/os_firewall/tasks/iptables.yml:14 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- os_firewall : Install iptables packages ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 7.09s /root/openshift-ansible/roles/os_firewall/tasks/iptables.yml:19 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- openshift_excluder : Install docker excluder - yum ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5.71s /root/openshift-ansible/roles/openshift_excluder/tasks/install.yml:9 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Start the Docker service ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.59s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:121 --------------------------------------------------------------------------------------------------------------------------------------------------------------- os_firewall : Ensure firewalld service is not enabled -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.43s /root/openshift-ansible/roles/os_firewall/tasks/iptables.yml:3 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Gathering Facts ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.46s /root/openshift-ansible/playbooks/prerequisites.yml:3 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Fixup SELinux permissions for docker ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.18s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:140 --------------------------------------------------------------------------------------------------------------------------------------------------------------- os_firewall : Start and enable iptables service -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.87s /root/openshift-ansible/roles/os_firewall/tasks/iptables.yml:31 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- openshift_repos : Ensure libselinux-python is installed ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.72s /root/openshift-ansible/roles/openshift_repos/tasks/main.yaml:6 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- openshift_repos : refresh cache ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.71s /root/openshift-ansible/roles/openshift_repos/handlers/main.yml:2 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- openshift_repos : Configure correct origin release repository ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.68s /root/openshift-ansible/roles/openshift_repos/tasks/centos_repos.yml:15 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Update registries.conf ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.66s /root/openshift-ansible/roles/container_runtime/tasks/update_registries.yml:3 -------------------------------------------------------------------------------------------------------------------------------------------------------------- Gather Cluster facts ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.61s /root/openshift-ansible/playbooks/init/cluster_facts.yml:27 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Configure Docker service unit file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.56s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:44 ---------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Set various Docker options --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.55s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:80 ---------------------------------------------------------------------------------------------------------------------------------------------------------------- container_runtime : Get current installed Docker version ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.54s /root/openshift-ansible/roles/container_runtime/tasks/package_docker.yml:9 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- openshift_repos : Configure origin gpg keys ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.53s /root/openshift-ansible/roles/openshift_repos/tasks/centos_repos.yml:7 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- [root@all-openshift openshift-ansible]# [root@all-openshift openshift-ansible]#