Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Mar 4, 2015
2 parents 6b25376 + 0305655 commit e525617
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 19 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,16 @@ Required software
folder e.g /Users/someuser/coreos-osx
2) Will clone latest coreos-vagrant from git
3) user-data file will have fleet, etcd, and Docker Socket for the API enabled
4) docker 2375 port will be set for docker OS X client to work properly
4) Will download latest vagrant VBox and run "vagrant up" to initialise VM with docker 2375 port pre-set for docker OS X client
5) Will set VM to static IP '172.19.8.99'
6) Will download and install fleet, etcd and docker OS X clients to ~/coreos-osx/bin/
7) A small shell script "rkt" will be installed to ~/coreos-osx/bin/ which allows to call
remote rkt binary with e.g rkt help
8) Will download latest vagrant VBox and run vagrant up to initialise VM
9) Will forward 2375 (docker) from localhost to vagrant VM.
10) Will install DockerUI and Fleet-UI via fleet unit files from ~/coreos-osx/fleet folder.
11) Via IP 172.19.8.99 you can access any port on CoreOS VM, no needs to put any port forwards
remote rkt binary on CoreOS VM with e.g rkt help
8) Will upload any saved docker images from ~/coreos-osx/docker_images folder
9) Will install DockerUI and Fleet-UI via fleet unit files from ~/coreos-osx/fleet folder.
10) Via IP 172.19.8.99 you can access any port on CoreOS VM, no needs to put any port forwards
to Vagrantfile.
12) user-data file enables with the flag `--insecure-registry` docker access to insecure
private registries.
11) user-data file enables docker flag `--insecure-registry` to access insecure registries.
````

How it works
Expand All @@ -47,15 +45,17 @@ How it works
Just start `CoreOS Vagrant OSX GUI` application and you will find a small icon with the CoreOS logo in the Status Bar.
For now it only supports a standalone CoreOS VM, cluster support might come at some stage later one.

* There you can `Up`, `Suspend`, `Halt`, `Reload` CoreOS vagrant VM
* `SSH to core-01` will open VM shell
* Under `Up` OS Shell will be opened when `vagrant up` finishes and it will have such environment set:
* There you can `Up`, `Suspend`, `Halt`, `Reload` (usual vagrant commands) CoreOS vagrant VM
* `SSH to core-01` (vagrant ssh) will open VM shell
* Under `Up` OS Shell will be opened when `vagrant up` finishes and it will have such environment pre-set:
````
DOCKER_HOST=tcp://127.0.0.1:2375
ETCDCTL_PEERS=http://172.19.8.99:4001
FLEETCTL_ENDPOINT=http://172.19.8.99:4001
Path to ~/coreos-osx/bin where docker, etcdclt and fleetctl binaries and rkt shell script are stored
Path to ~/coreos-osx/bin where docker, etcdclt and fleetctl binaries and rkt shell
script are stored
````

* `OS Shell` opens OS Shell with the same enviroment preset as `Up`
* `Upload docker images` will upload docker images from `~/coreos-osx/docker_images`, it saves time from downloading them again from Internet.
* `Updates/Force CoreOS update` will run `sudo update_engine_client -update` on CoreOS VM.
Expand Down
5 changes: 3 additions & 2 deletions src/CoreOS GUI/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="14D87p" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
Expand Down Expand Up @@ -698,6 +698,7 @@
<action selector="runShell:" target="494" id="dpS-4v-YJb"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="k2D-0b-tel"/>
<menuItem title="Fleet-UI" id="LkH-Oi-Kkr">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
Expand All @@ -710,7 +711,7 @@
<action selector="dockerUI:" target="494" id="KoG-12-koe"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="k2D-0b-tel"/>
<menuItem isSeparatorItem="YES" id="Gmy-Y5-bmI"/>
<menuItem title="Upload docker images" id="q1W-CL-Lla">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
Expand Down
4 changes: 2 additions & 2 deletions src/CoreOS GUI/CoreOS GUI-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8</string>
<string>0.8.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>335</string>
<string>337</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
29 changes: 28 additions & 1 deletion src/first-init.command
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,39 @@ curl -o ~/coreos-osx/bin/docker http://get.docker.io/builds/Darwin/x86_64/docker
chmod +x ~/coreos-osx/bin/docker
#

## Load docker images if there any
# Set the environment variable for the docker daemon
export DOCKER_HOST=tcp://127.0.0.1:2375

# path to the bin folder where we store our binary files
export PATH=${HOME}/coreos-osx/bin:$PAT,H

function pause(){
read -p "$*"
}

echo " "
echo "# It can upload your docker images to CoreOS VM # "
echo "If you want copy your docker images in *.tar format to ~/coreos-osx/docker_images folder !!!"
pause 'Press [Enter] key to continue...'

cd ~/coreos-osx/docker_images

for file in *.tar
do
echo "Loading docker image: $file"
docker load < $file
done
echo "Done with docker images !!!"
echo " "
##

# set fleetctl endpoint and install fleet units
export FLEETCTL_ENDPOINT=http://172.19.8.99:4001
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
echo "fleetctl list-machines:"
fleetctl list-machines
echo ""
echo " "
# install fleet units
echo "Installing fleet units from '~/coreos-osx/fleet' folder"
cd ~/coreos-osx/fleet
Expand Down
4 changes: 2 additions & 2 deletions src/fleet/dockerui.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Requires=docker.service
User=core
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=/usr/bin/docker pull davivcgarcia/dockerui:latest
ExecStartPre=/usr/bin/docker pull dockerui/dockerui:latest
ExecStartPre=-/usr/bin/docker rm dockerui
ExecStart=/usr/bin/docker run --rm --name dockerui --memory="128m" -p 9000:9000 -v /var/run/docker.sock:/docker.sock davivcgarcia/dockerui -e /docker.sock
ExecStart=/usr/bin/docker run --rm --name dockerui --memory="128m" -p 9000:9000 -v /var/run/docker.sock:/docker.sock dockerui/dockerui -e /docker.sock
ExecStop=/usr/bin/docker stop dockerui
ExecStopPost=-/usr/bin/docker rm dockerui

Expand Down

0 comments on commit e525617

Please sign in to comment.