Skip to content

Commit

Permalink
Fix #10 and #12
Browse files Browse the repository at this point in the history
  • Loading branch information
刘洪玉 committed Jun 27, 2019
1 parent b251a01 commit 6abc580
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ Vagrant.configure("2") do |config|
end

node.vm.provision "shell", inline: <<-SHELL
# Setting hostname manually to prevent "Could not find csr for nodes" error
# Issue: https://github.com/eliu/openshift-vagrant/issues/12
# Workaround: https://bugzilla.redhat.com/show_bug.cgi?id=1625911#c43
hostnamectl set-hostname master.example.com
# Trick to acclerate the cloning speed from GitHub
# echo "151.101.72.249 github.global.ssl.fastly.net" >> /etc/hosts
# echo "192.30.253.113 github.com" >> /etc/hosts
/vagrant/master.sh #{OPENSHIFT_RELEASE} #{OPENSHIFT_ANSIBLE_BRANCH} #{NETWORK_BASE}
SHELL

Expand Down
11 changes: 10 additions & 1 deletion ansible-hosts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,16 @@ master.example.com openshift_ip={{NETWORK_BASE}}.101 openshift_host={{NETWORK_BA
# override the default values of openshift_router_selector and openshift_registry_selector
# from 'region=infra' to 'node-role.kubernetes.io/infra=true'
#
# @update on 2019/06/27
# Somehow, the etcd is forced to deployed as container form, which caused
# "Wait for control plane pods to appear" issue and resulted in failures at last.
# For more details about this discussions, please visit:
# https://github.com/eliu/openshift-vagrant/issues/10
# Advice has been taken from the issue discussion above and thanks to @Voronenko !
# The trick is to add ansible variables "ontainerized=false etcd_ip={ip}" to force
# master node use traditional way to install ECTD instead of containerization.
#
[nodes]
master.example.com openshift_ip={{NETWORK_BASE}}.101 openshift_host={{NETWORK_BASE}}.101 ansible_ssh_private_key_file="/home/vagrant/.ssh/master.key" openshift_schedulable=true {{NODE_GROUP_MASTER_INFRA}}
master.example.com containerized=false etcd_ip={{NETWORK_BASE}}.101 openshift_ip={{NETWORK_BASE}}.101 openshift_host={{NETWORK_BASE}}.101 ansible_ssh_private_key_file="/home/vagrant/.ssh/master.key" openshift_schedulable=true {{NODE_GROUP_MASTER_INFRA}}
node01.example.com openshift_ip={{NETWORK_BASE}}.102 openshift_host={{NETWORK_BASE}}.102 ansible_ssh_private_key_file="/home/vagrant/.ssh/node01.key" openshift_schedulable=true {{NODE_GROUP_COMPUTE}}
node02.example.com openshift_ip={{NETWORK_BASE}}.103 openshift_host={{NETWORK_BASE}}.103 ansible_ssh_private_key_file="/home/vagrant/.ssh/node02.key" openshift_schedulable=true {{NODE_GROUP_COMPUTE}}

0 comments on commit 6abc580

Please sign in to comment.