OpenShift3 origin / all-in-one,vagrant Cluster setup

时间:2017-02-01 21:16:04

标签: vagrant virtualbox vagrantfile openshift-origin

我在

上看登录页面时遇到问题
  

https://10.2.2.2:8443/console

, 即使我试图做

  

" oc login https://10.2.2.2"

它适用于第一次安装并且我能够登录,但是当我进行少量重新安装以进行自定义时,我没有运气。

我已经解决了现有的github流浪问题,以及stackoverflow,但没有解决这个问题的线索。

我很感激有人可以帮我解决这个问题。

安装Detals:  我已经按照blog进行了我的mac中的群集设置,

1)已安装的VirtualBox版本5.1.14 r112924(Qt5.6.2) 2)安装Vagrant 1.9.1

这是我的Vagrantfile配置,

# -*- mode: ruby -*-
# vi: set ft=ruby :


VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.7.2"

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version. Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|

  config.vm.box = "openshift/origin-all-in-one"
  # uncomment this line if you downloaded the box and want to use it instead
  # config.vm.box = "openshift3"
  config.vm.box_check_update = false
  config.vm.network "private_network", ip: "10.2.2.2"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.hostname = "origin"


  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  # config.vm.network "forwarded_port", guest: 80, host: 8080
  # config.vm.network "forwarded_port", guest: 80, host: 1080
  # config.vm.network "forwarded_port", guest: 443, host: 1443
  # config.vm.network "forwarded_port", guest: 5000, host: 5000
  # config.vm.network "forwarded_port", guest: 8080, host: 8080
  # config.vm.network "forwarded_port", guest: 8443, host: 8443

  config.vm.provider "virtualbox" do |vb|
     #   vb.gui = true
     vb.memory = "4096"
     vb.cpus = 2
     vb.name = "origin-1.3.0"
  end

end

这是 Vagrant up --debug

的调试日志
    Last login: Wed Feb  1 13:59:59 on ttys000

xxxxxs-MBP:origin xxxxx$ vagrant init openshift/origin-all-in-one
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
xxxxxs-MBP:origin xxxxx$ vagrant up --provider=virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'openshift/origin-all-in-one' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'openshift/origin-all-in-one'
    default: URL: https://atlas.hashicorp.com/openshift/origin-all-in-one
==> default: Adding box 'openshift/origin-all-in-one' (v1.3.0) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/openshift/boxes/origin-all-in-one/versions/1.3.0/providers/virtualbox.box
==> default: Successfully added box 'openshift/origin-all-in-one' (v1.3.0) for 'virtualbox'!
/Users/xxxxx/.vagrant.d/boxes/openshift-VAGRANTSLASH-origin-all-in-one/1.3.0/virtualbox/include/_Vagrantfile:5: warning: already initialized constant VAGRANTFILE_API_VERSION
/Users/xxxxx/origin/Vagrantfile:5: warning: previous definition of VAGRANTFILE_API_VERSION was here
==> default: Importing base box 'openshift/origin-all-in-one'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: origin-1.3.0
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
    default: Adapter 3: hostonly
==> default: Forwarding ports...
    default: 8443 (guest) => 8443 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default: 
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: 
==> default: Successfully started and provisioned VM with 2 cores and 5 G of memory.

No Errors in Vagrant Console

2 个答案:

答案 0 :(得分:0)

vm中的

openshift.service无法自动启动,

我做了ssh to machine并使用命令sudo systemctl start origin手动启动,一切正常。

答案 1 :(得分:0)

我自己对Origin有点疑问。我最终使用了Docker和OpenShift客户端。我已经逐步介绍了如何在Windows上开始使用OpenShift Origin。我不想在这里宣传任何东西。该条目太长,我无法剪切和粘贴它。请访问以下链接:

http://blog.muralibala.com/2017/01/getting-started-with-openshift-origin-on-windows/

希望这有用。