Febrac8 + OpenShift + Kubernetes (3) Install OpenShift
Prepare OpenShift Ansible packages
Modify the Master configuration files.
- /root/openshift-ansible/roles/openshift_version/tasks/masters_and_nodes.yml:
line 12~13:
# block when
when:
- not openshift_is_atomic | bool
- not openshift_is_containerized | bool
- Prepare the host file for ansible
Path: /etc/ansible/hosts
[OSEv3:children]
masters
nodes
etcd
lb
# Specify there will be GlusterFS nodes
glusterfs
glusterfs_registry
[OSEv3:vars]
ansible_user=root
ansible_ssh_user=root
openshift_deployment_type=origin
#openshift_docker_use_system_container=True
openshift_disable_check=docker_image_availability
containerized=true
openshift_release=3.9
openshift_image_tag=v3.9.0
openshift_pkg_version=-3.9.0
enable_excluders=false
# htpasswd auth
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'},{'name': 'my_ldap_provider', 'challenge': 'true', 'login': 'true', 'kind': 'LDAPPasswordIdentityProvider', 'attributes': {'id': ['dn'], 'email': ['mail'], 'name': ['cn'], 'preferredUsername': ['uid']}, 'bindDN': '', 'bindPassword': '', 'insecure': 'false', 'url': 'ldap://192.168.0.137:389/ou=Tech,dc=gemii,dc=cc?uid'}]
# Defining htpasswd users
openshift_master_htpasswd_users={'admin': '$apr1$0oyVx7VK$OFmO1wA2oUdY.7026TY380'}
# LDAP auth
openshift_storage_glusterfs_namespace=glusterfs
openshift_storage_glusterfs_name=storage
openshift_hosted_registry_cert_expire_days=3650
openshift_ca_cert_expire_days=3650
openshift_node_cert_expire_days=3650
openshift_master_cert_expire_days=3650
etcd_ca_default_days=3650
os_firewall_use_firewalld=True
openshift_master_cluster_method=native
openshift_master_cluster_hostname=lb1.os.gemii.tech
openshift_master_cluster_public_hostname=oc.os.gemii.tech
#openshift_master_default_subdomain=os.gemii.tech
openshift_clock_enabled=true
# apply updated node defaults
openshift_node_kubelet_args={'pods-per-core': ['10'], 'max-pods': ['250'], 'image-gc-high-threshold': ['90'], 'image-gc-low-threshold': ['80']}
#openshift_logging_install_logging=true
# Configure loggingPublicURL in the master config for aggregate logging, defaults
# to kibana.{{ openshift_master_default_subdomain }}
#openshift_logging_kibana_hostname=logging.dev.gemii.cc
# Configure the number of elastic search nodes, unless you're using dynamic provisioning
# this value must be 1
#openshift_logging_es_cluster_size=3
# Configure the prefix and version for the component images
#openshift_logging_image_prefix=docker.io/openshift/origin-
#openshift_logging_image_version=v3.7.0
#openshift_http_proxy=http://192.168.0.127:8118/
#openshift_https_proxy=http://192.168.0.127:8118/
#openshift_no_proxy='localhost,127.0.0.1,180.169.188.90,hub.docker.gemii.cc,192.168.0.169'
openshift_hosted_registry_storage_kind=glusterfs
openshift_hosted_registry_replicas=3
openshift_hosted_registry_storage_volume_size=500Gi
openshift_generate_no_proxy_hosts=false
[masters]
oskm1.os.gemii.tech
oskm2.os.gemii.tech
oskm3.os.gemii.tech
[nodes]
# masters should be schedulable to run web console pods
oskm1.os.gemii.tech openshift_schedulable=True
oskm2.os.gemii.tech openshift_schedulable=True
oskm3.os.gemii.tech openshift_schedulable=True
oskw1.os.gemii.tech openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True
oskw2.os.gemii.tech openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True
oskw3.os.gemii.tech openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True
oskw4.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
oskw5.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
oskw6.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
oskw7.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
oskw8.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
oskw9.os.gemii.tech openshift_node_labels="{'region': 'primary'}" openshift_schedulable=True
[etcd]
oskm1.os.gemii.tech
oskm2.os.gemii.tech
oskm3.os.gemii.tech
[lb]
lb1.os.gemii.tech
# Specify the glusterfs group, which contains the nodes of the external
# GlusterFS cluster. At a minimum, each node must have "glusterfs_hostname"
# and "glusterfs_devices" variables defined.
#
# The first variable indicates the hostname of the external GLusterFS node,
# and must be reachable by the external heketi service.
#
# The second variable is a list of block devices the node will have access to
# that are intended solely for use as GlusterFS storage. These block devices
# must be bare (e.g. have no data, not be marked as LVM PVs), and will be
# formatted.
[glusterfs]
oskw1.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
oskw2.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
oskw3.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
[glusterfs_registry]
oskm1.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
oskm2.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
oskm3.os.gemii.tech glusterfs_devices='[ "/dev/sdc" ]'
3 Install OpenShift
# cd ~
# ansible-playbook ./openshift-ansible/playbooks/prerequisites.yml
# ansible-playbook ./openshift-ansible/playbooks/deploy_cluster.yml
相關文章
- Openshift
- openshift scc解析
- Openshift部署教程
- Kubernetes與OpenShift有什麼區別? - DZone CloudCloud
- Openshift HPA(Horizontal Pod Autosc
- 003.OpenShift網路
- 001.OpenShift介紹
- Portworx on OpenShift 原理講解
- 在Podman、Kubernetes和OpenShift上使用Odo實現Java開發Java
- OpenShift與Docker全方位比較Docker
- 007.OpenShift管理應用部署
- 002.OpenShift安裝與部署
- 004.OpenShift命令及故障排查
- 009.OpenShift管理及監控
- 在Ubuntu上安裝OpenShift並使用Ubuntu
- Openshift叢集3.9升級到3.10
- OpenShift S2I 概念及流程
- 006.OpenShift永續性儲存
- OpenShift 本地開發環境配置(基於 Minishift)開發環境
- OpenShift 使用者許可權管理例項
- 005.OpenShift訪問控制-許可權-角色
- 010.OpenShift綜合實驗及應用
- OpenShift 與 OpenStack:讓雲變得更簡單
- F5與Openshift整合,實現灰度釋出
- Openshift-F5整合(總結)——與Router方案對比
- Openshift-F5整合(南北流量走F5)
- 解析 | openshift原始碼簡析之pod網路配置(下)原始碼
- kubernetes 1.25.9 install
- 自定義 OpenShift s2i 映象與模板——OracleJDK8OracleJDK
- Openshift 4.4 靜態 IP 離線安裝系列:初始安裝
- 在受限網路裸機上安裝Openshift 4.6叢集
- 紅帽釋出OpenShift 4.10,為人工智慧發展掃除障礙人工智慧
- 雲平臺將故障Pod流量下線通用思路與OpenShift操作實戰
- Openshift 4.4 靜態 IP 離線安裝系列:準備離線資源
- IBM 將區塊鏈引入紅帽 OpenShift;為混合雲客戶新增了Apache CouchDBIBM區塊鏈Apache
- 亞馬遜和紅帽宣佈推出基於亞馬遜雲科技的Red Hat OpenShift容器平臺託管服務亞馬遜
- [kubernetes]Error from server (BadRequest):container install-cni is not valid for pod kube-dnsErrorServerAIDNS
- Python 在 20201010 之後的 pip3 installPython