MacOSX下试用CoreOS
Chrome经过不断扩展,成为了云操作系统ChromeOS,在你毫无觉察的情况下,每隔六周左右它都会更新为一个全新的操作系统。CoreOS项目是Google ChromeOS代码的一个fork版本,目前已成为一个超级精简的服务器操作系统,进化速度堪比ChromeOS。
Try now
install and run up coreos
[o:opt]=> cd github/ [o:github]=> git clone https://github.com/coreos/coreos-vagrant Cloning into 'coreos-vagrant'... remote: Counting objects: 296, done. remote: Total 296 (delta 0), reused 0 (delta 0) Receiving objects: 100% (296/296), 64.79 KiB | 36.00 KiB/s, done. Resolving deltas: 100% (128/128), done. Checking connectivity... done. [o:github]=> cd coreos-vagrant/ [o:coreos-vagrant]=> ls README.md Vagrantfile config.rb.sample user-data.sample [o:coreos-vagrant]=> vagrant up /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /opt in PATH, mode 040777 /Applications/Vagrant/embedded/gems/gems/bundler-1.6.6/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /opt in PATH, mode 040777 Bringing machine 'core-01' up with 'virtualbox' provider... ==> core-01: Box 'coreos-alpha' could not be found. Attempting to find and install... core-01: Box Provider: virtualbox core-01: Box Version: >= 308.0.1 ==> core-01: Loading metadata for box 'http://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json' core-01: URL: http://alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json ==> core-01: Adding box 'coreos-alpha' (v459.0.0) for provider: virtualbox core-01: Downloading: http://alpha.release.core-os.net/amd64-usr/459.0.0/coreos_production_vagrant.box core-01: Calculating and comparing box checksum... ==> core-01: Successfully added box 'coreos-alpha' (v459.0.0) for 'virtualbox'! ==> core-01: Importing base box 'coreos-alpha'... ==> core-01: Matching MAC address for NAT networking... ==> core-01: Checking if box 'coreos-alpha' is up to date... ==> core-01: Setting the name of the VM: coreos-vagrant_core-01_1413081720718_61504 ==> core-01: Clearing any previously set network interfaces... ==> core-01: Preparing network interfaces based on configuration... core-01: Adapter 1: nat core-01: Adapter 2: hostonly ==> core-01: Forwarding ports... core-01: 22 => 2222 (adapter 1) ==> core-01: Running 'pre-boot' VM customizations... ==> core-01: Booting VM... ==> core-01: Waiting for machine to boot. This may take a few minutes... # !!!!!!!! PLEASE NOTICE BELOW INFORMATION !!!!!!!! core-01: SSH address: 127.0.0.1:2222 core-01: SSH username: core core-01: SSH auth method: private key # !!!!!!!! END !!!!!!!! core-01: Warning: Connection timeout. Retrying... ==> core-01: Machine booted and ready! ==> core-01: Setting hostname... ==> core-01: Configuring and enabling network interfaces... [o:coreos-vagrant]=> vagrant ssh /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /opt in PATH, mode 040777 /Applications/Vagrant/embedded/gems/gems/bundler-1.6.6/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /opt in PATH, mode 040777 CoreOS (alpha) core@core-01 ~ $ core@core-01 ~ $ uname -a Linux core-01 3.16.2+ #2 SMP Fri Oct 3 07:45:37 UTC 2014 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux core@core-01 ~ $ df -h df: '/var/lib/docker/btrfs': Permission denied Filesystem Size Used Avail Use% Mounted on rootfs 17G 76M 16G 1% / devtmpfs 488M 0 488M 0% /dev tmpfs 500M 0 500M 0% /dev/shm tmpfs 500M 232K 499M 1% /run tmpfs 500M 0 500M 0% /sys/fs/cgroup /dev/sda9 17G 76M 16G 1% / /dev/sda3 1008M 285M 673M 30% /usr tmpfs 500M 0 500M 0% /media tmpfs 500M 0 500M 0% /tmp /dev/sda6 108M 88K 99M 1% /usr/share/oem
Run docker in coreos
[o:~]=> ssh -i .vagrant.d/insecure_private_key -p 2222 core@127.0.0.1
Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
Last login: Sun Oct 12 02:44:13 2014 from 10.0.2.2
CoreOS (alpha)
core@core-01 ~ $
# (Start )
core@core-01 ~ $ docker run ubuntu /bin/echo hello Yuanzhen
Unable to find image 'ubuntu' locally
Pulling repository ubuntu
1357f421be38: Download complete
511136ea3c5a: Download complete
1de2bd7201a2: Download complete
b70ad18cfc2a: Download complete
3b39241dab7c: Download complete
23f1840ed5a5: Download complete
dfa12c637781: Download complete
hello Yuanzhen
core@core-01 ~ $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest 1357f421be38 28 hours ago 192.7 MB