Minishift

昨日作った Minishift ですが、ネットワーク共有の設定が変わってしまって Wi-Fi が繋がらなくなったため、よくわかっている VirtualBox を使うようにしてみました。

メモリも 2GB から 16GB に増やしてます。

$ brew uninstall docker-machine-driver-xhyve
Uninstalling /usr/local/Cellar/docker-machine-driver-xhyve/0.3.3... (3 files, 10.5MB)
$ minishift config set memory 16384
You currently have an existing Minishift instance. Changes to the 'memory' setting are only applied when a new Minishift instance is created.
To let the configuration changes take effect, you must delete the current instance with 'minishift delete' and then start a new one with 'minishift start'.
$ minishift config view
- memory               : 16384
$
$ minishift start --vm-driver=virtualbox
...
OpenShift server started.

The server is accessible via web console at:
    https://192.168.99.100:8443

You are logged in as:
    User:     developer
    Password: 

To login as administrator:
    oc login -u system:admin

-- Exporting of OpenShift images is occuring in background process with pid 39907.
$

CPUの数も増やしてみました。設定は config に設定しておくといいようです。

$ minishift config set cpus 4
$ minishift config set memory 16384
$ minishift config set vmdriver virtualbox

Minishift on Mac

Minishift を試してみました。マニュアルに沿ってインストール。

$ brew cask install minishift
$ brew install docker-machine-driver-xhyve
...
==> Downloading https://homebrew.bintray.com/bottles/docker-machine-driver-xhyve-0.3.3.high_sierra.bottle.1.tar.
######################################################################## 100.0%
==> Pouring docker-machine-driver-xhyve-0.3.3.high_sierra.bottle.1.tar.gz
==> Caveats
This driver requires superuser privileges to access the hypervisor. To
enable, execute
    sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
    sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
==> Summary
🍺  /usr/local/Cellar/docker-machine-driver-xhyve/0.3.3: 3 files, 10.5MB

$ sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Password:
$ sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$

インストールできたら起動。

$ minishift start
-- Starting profile 'minishift'
-- Checking if requested OpenShift version 'v3.7.2' is valid ... OK
-- Checking if requested OpenShift version 'v3.7.2' is supported ... OK
-- Checking if requested hypervisor 'xhyve' is supported on this platform ... OK
-- Checking if xhyve driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-xhyve
   Checking for setuid bit ... OK
-- Checking the ISO URL ... OK
-- Downloading OpenShift binary 'oc' version 'v3.7.2'
 38.18 MiB / 38.18 MiB [============================================================================] 100.00% 0s-- Downloading OpenShift v3.7.2 checksums ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting local OpenShift cluster using 'xhyve' hypervisor ...
-- Minishift VM will be configured with ...
   Memory:    2 GB
   vCPUs :    2
   Disk size: 20 GB

   Downloading ISO 'https://github.com/minishift/minishift-b2d-iso/releases/download/v1.2.0/minishift-b2d.iso'
 40.00 MiB / 40.00 MiB [============================================================================] 100.00% 0s
-- Starting Minishift VM ........................................ FAIL E0408 20:29:20.229373   34738 start.go:368] Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Could not convert the UUID to MAC address: exit status 1. Retrying.
Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Could not convert the UUID to MAC address: exit status 1
$

むぅ。起動せず。~/.minishift を消してやり直し。–v=10 はログを詳細に出す指定です。

$ minishift start --v=10
...
-- Starting Minishift VM .................................... OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ... 
   Pinging 8.8.8.8 ... OK
-- Checking HTTP connectivity from the VM ... 
   Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... 0% used OK
   Importing 'openshift/origin:v3.7.2' . CACHE MISS
   Importing 'openshift/origin-docker-registry:v3.7.2'  CACHE MISS
   Importing 'openshift/origin-haproxy-router:v3.7.2'  CACHE MISS
-- OpenShift cluster will be configured with ...
   Version: v3.7.2
-- Running 'oc' with: 'cluster up --use-existing-config --host-config-dir /var/lib/minishift/openshift.local.config --host-data-dir /var/lib/minishift/hostdata --host-pv-dir /var/lib/minishift/openshift.local.pv --host-volumes-dir /var/lib/minishift/openshift.local.volumes --routing-suffix 192.168.64.2.nip.io'
Starting OpenShift using openshift/origin:v3.7.2 ...
Pulling image openshift/origin:v3.7.2
Pulled 1/4 layers, 26% complete
Pulled 1/4 layers, 40% complete
Pulled 1/4 layers, 55% complete
Pulled 1/4 layers, 69% complete
Pulled 2/4 layers, 83% complete
Pulled 3/4 layers, 90% complete
Pulled 3/4 layers, 93% complete
Pulled 3/4 layers, 96% complete
Pulled 3/4 layers, 99% complete
Pulled 4/4 layers, 100% complete
Extracting
Image pull complete
OpenShift server started.

The server is accessible via web console at:
    https://192.168.64.2:8443

You are logged in as:
    User:     developer
    Password: 

To login as administrator:
    oc login -u system:admin

-- Exporting of OpenShift images is occuring in background process with pid 35072.
$

今度は起動しました。

oc コマンドにPATHを通す設定を ~/.bash_profile に追加しておきます。

eval $(minishift oc-env)

きょうはここまで。

$ minishift stop
Stopping local OpenShift cluster...
Cluster stopped.
$

再び Clojure

JDK 10 + Clojure 1.9.0 にしてみました。

leiningen は使わなくてもいいみたいです。まだよくわかっていません。

$ java -version
java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

$ brew install clojure

$ clj
Clojure 1.9.0
user=> (+ 2 3)
5
user=> (println "hello")
hello
nil

また気が向いたらあれこれ遊んでみます。