阿里云搭建openshift

阿里云搭建openshift

步骤

1.hostnamectl set-hostname node.example.com
echo "172.20.62.195 master.example.com" >> /etc/hosts
echo "172.20.62.196 node.example.com" >> /etc/hosts
2.yum install -y docker wget git net-tools bind-utils iptables-services bridge-utils bash-completion
3.systemctl enable docker; systemctl start docker
systemctl enable NetworkManager; systemctl start NetworkManager
systemctl stop firewalld ; systemctl disable firewalld
pip uninstall urllib3

only master:
//yum install -y ansible
yum -y install etcd
systemctl enable etcd; systemctl start etcd
sed -i -e "s/^enabled=1/enabled=0/" /etc/yum.repos.d/epel.repo
yum -y --enablerepo=epel install ansible pyOpenSSL
ssh-keygen -t rsa -P '' | scp ~/.ssh/id_rsa.pub >> .ssh/authorized_keys 

cp hosts /etc/ansible/hosts
openshift-ansible-openshift-ansible-3.6.173.0.95-1.tar.gz
ansible-playbook ~/openshift-ansible/playbooks/byo/config.yml

images:
docker.io/cockpit/kubernetes:latest
docker.io/openshift/origin-deployer:v3.6.1
docker.io/openshift/origin-docker-registry:v3.6.1
docker.io/openshift/origin-haproxy-router:v3.6.1
docker.io/openshift/origin-pod:v3.6.1

hosts

# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd

# 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
openshift_deployment_type=origin
openshift_release=3.6.1

# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true

openshift_disable_check=memory_availability,disk_availability,docker_image_availability,docker_storage
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
#openshift_hostname=master.com
#openshift_public_hostname=master.com
#openshift_ip=192.168.0.123
#openshift_public_ip=114.115.209.157
#openshift_master_api_port=10001
#openshift_master_console_port=10002

#openshift_enable_service_catalog=false
#openshift_service_catalog_image_prefix=openshift/origin-
#openshift_service_catalog_image_version=latest

# 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.example.com

# host group for etcd
[etcd]
master.example.com

# host group for nodes, includes region info
[nodes]
master.example.com
node.example.com
node.example.com openshift_node_labels="{'region': 'infra', 'zone': 'east'}"
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值