【openshift 安装】openshift-ansible 安装,
【openshift 安装】openshift-ansible 安装,
一. openshift 安装
1.1 安装前准备工作
- 免密码ssh登陆,参考ssh免密码登陆
- 添加域名至/etc/hosts
- 开启iptables服务,执行systemctl start iptables
- 修改节点名字,例如 修改hostnamectl set-hostname node-10-12-40-250
1.2 安装前系统准备工作
系统要求至少centos 7.3以上
安装基础包:
# yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct
更新系统至最新包:
# yum update
配置ansible,配置文件/etc/ansible/hosts
# Create an OSEv3 group that contains the masters and nodes groups [OSEv3:children] masters nodes # Set variables common for all OSEv3 hosts [OSEv3:vars] # SSH user, this user should allow ssh based auth without requiring a password ansible_ssh_user=root # If ansible_ssh_user is not root, ansible_become must be set to true #ansible_become=true openshift_deployment_type=origin openshift_disable_check=docker_image_availability,docker_storage,memory_availability,disk_availability # uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider #openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}] # host group for masters [masters] master-40-228 # host group for etcd [etcd] master-40-228 # host group for nodes, includes region info [nodes] master-40-228 openshift_node_labels="{'region': 'infra', 'zone': 'default'}" node-40-230 openshift_node_labels="{'region': 'primary', 'zone': 'west'}" node-40-131 openshift_node_labels="{'region': 'primary', 'zone': 'west'}" [new_nodes] #node-51-84 openshift_node_labels="{'region': 'primary', 'zone': 'west'}" #node-51-85 openshift_node_labels="{'region': 'primary', 'zone': 'west'}" node-51-86 openshift_node_labels="{'region': 'primary', 'zone': 'west'}"
下载openshift-ansible,
执行安装命令: ansible-playbook playbook/byo/config.yaml
参考: https://docs.openshift.org/3.6/install_config/install/host_preparation.html
评论暂时关闭