首先你的機器要支援 VT-X
就是安裝完 VirtualBox 建立個 OS 看一下 "系統 -> 加速 " 的裡面
下載 Vagrant & VirtualBox & Client tools 安裝 參考 https://www.openshift.org/vm/
裝好後 cmd 切換到 C:\HashiCorp\Vagrant\bin 執行初始化
vagrant init openshift/origin-all-in-one
開機
vagrant up --provider=virtualbox
PS : 要打掉 :
- CMD 後切換到 C:\HashiCorp\Vagrant\bin
- 執行 vagrant 停止 : vagrant halt
- 執行 vagrant 資料打掉 : destroy --force
- 執行 vagrant 已安裝的資訊移除 : vagrant box remove --force openshift/origin-all-in-one
- 開啟 VirtualBox 將虛擬機移除
- 到控制台新增移除程式內將 vagrant 與 VirtualBox 移除
建置過程
開啟網頁
用 Client tool OC .....
C:\HashiCorp\Vagrant\bin> oc login https://10.2.2.2:8443
The server uses a certificate signed by an unknown authority.
You can bypass the certificate check, but any data you send to the server could be intercepted by others.
Use insecure connections? (y/n): y
Authentication required for https://10.2.2.2:8443 (openshift)
Username: admin
Password:
Login successful.
You have access to the following projects and can switch between them with 'oc project <projectname>':
cockpit
* default
kube-system
openshift
openshift-infra
Using project "default".
Welcome! See 'oc help' to get started.
---------------------------------------------------------------------------
C:\HashiCorp\Vagrant\bin>vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:
Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/HashiCorp/Vagrant/bin/.vagrant/machines/default/virtualbox/private_key
我習慣用 putty ...用 puttygen.exe 將 private_key 轉成 private_key.ppk
