Skip to content

Commit

Permalink
Merge pull request #59 from TheNewNormal/v1.2.7
Browse files Browse the repository at this point in the history
v1.2.7
  • Loading branch information
rimusz committed May 12, 2016
2 parents 73ab3eb + 79faa10 commit af94d18
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 289 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Open downloaded `dmg` file and drag the App e.g. to your Desktop. Start the `Cor
- CoreOS ISO files are stored under `~/.coreos` folder
- Docker registry runs on `192.168.64.1:5000` and images are stored under `~/coreos-osx/registry`
- Mac user home folder is automaticly mounted to VM: `/Users/my_user`:`/Users/my_user`
- OS X `fleetctl` and `docker` clients are installed to `~/coreos-osx/bin` and preset in `OS shell` to be used from there
- Put your fleet units into `~/coreos-osx/my_fleet` folder and they will be automaticly started on each VM boot.
- OS X `docker` client is installed to `~/coreos-osx/bin` and preset in `OS shell` to be used from there

**The install will do the following:**

Expand All @@ -42,16 +41,16 @@ Open downloaded `dmg` file and drag the App e.g. to your Desktop. Start the `Cor
- User's Mac password will be stored in `OS X Keychain`, it will be used to pass to `sudo` command which needs to be used starting the VM, this allows to avoid using `sudo` for `corectl` to start a VM.
- ISO images are stored under `~/.coreos/images`
That allows to share the same images between different `corectl` based Apps and also speeds up this App VMs reinstall
- user-data file will have fleet, etcd, and Docker Socket for the API enabled
- user-data file will have Docker Socket for the API enabled
- Will download latest CoreOS ISO image and run `corectl` to initialise VM with docker 2375 port pre-set for docker OS X client
- Will download and install `fleetctl` and `docker` OS X clients to ~/coreos-osx/bin/
- Will download and install `docker` OS X client to ~/coreos-osx/bin/
- A small shell script `rkt` will be installed to ~/coreos-osx/bin/ which allows to call via ssh remote `rkt` binary on CoreOS VM
- A small shell script `etcdctl` will be installed to ~/coreos-osx/bin/ which allows to call via ssh remote `etcdctl` binary on CoreOS VM
- `docker-exec` script (docker exec -it $1 bash -c 'export TERM=xterm && bash') will be installed
into ~/coreos-osx/bin/ too, which allows to enter container with just a simple command:
docker-exec container_name
- Also `docker2aci` binary will be installed to ~/coreos-osx/bin/, which allows to convert docker images to `rkt` aci images
- Will install [Fleet UI](http://fleetui.com) and [UI for Docker](https://github.com/kevana/ui-for-docker) via unit files
- Will install [UI for Docker](https://github.com/kevana/ui-for-docker) via unit files
- Via assigned static IP (it will be shown in first boot and will survive VM's reboots) you can access any port on CoreOS VM
- user-data file enables docker flag `--insecure-registry` to access insecure registries.
- Persistent disk `data.img` will be created and mounted to `/data` for these mount binds:
Expand All @@ -67,7 +66,7 @@ That allows to share the same images between different `corectl` based Apps and
How it works
------------

Just start `CoreOS OSX GUI ` application and you will find a small icon with the CoreOS logo with `h`in the Status Bar.
Just start `CoreOS OSX` application and you will find a small icon with the CoreOS logo in the Status Bar.

* There you can `Up`, `Halt`, `Reload` CoreOS VM
* `SSH to core-01` will open VM shell
Expand All @@ -76,20 +75,16 @@ Just start `CoreOS OSX GUI ` application and you will find a small icon with the
```
DOCKER_HOST=tcp://192.168.64.xxx:2375
ETCDCTL_PEERS=http://192.168.64.xxx:2379
FLEETCTL_ENDPOINT=http://192.168.64.xxx:2379
FLEETCTL_DRIVER=etcd
```
```
Path to `~/coreos-osx/bin` where docker and fleetctl binaries, rkt, etcdclt
Path to `~/coreos-osx/bin` where docker binary, rkt, etcdclt
and docker-exec shell scripts are stored
```

* `OS Shell` opens OS Shell with the same enviroment preset as `Up`
* `Updates/Check updates for OS X fleetctl and docker clients` will update fleet and docker OS X clients to the same versions as CoreOS VM runs.
* `Updates/Check for update of docker OS X client` will update fleet and docker OS X clients to the same versions as CoreOS VM runs.
* `Updates/Fetch latest CoreOS ISO` will download the lasted CoreOS ISO file for the currently set release channel.
* [Fleet UI](http://fleetui.com) dashboard will show up running `fleet` units and etc
* [UI for Docker](https://github.com/kevana/ui-for-docker) will show up all running containers and etc
* Put your fleet units into `~/coreos-osx/my_fleet` folder and they will be automaticly started on each VM boot.
* You can upload your saved/exported docker images place in `~/coreos-osx/docker_images` folder via `Upload docker images`
* Local Docker Registry v2 (Go based and compiled for OS X) is running on `192.168.64.1:5000`, which gets started/stopped on each VM Up/Halt.
* This App has as much automation as possible to make easier to use CoreOS on OS X, e.g. you can change CoreOS release channel and reload VM as `root` persistant disk for VM will be created and mounted to `/` so data will survive VM reboots.
Expand Down
Binary file modified coreos-osx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions src/CoreOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
01D3685918E5C184006510B5 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 01D3685818E5C184006510B5 /* icon.icns */; };
01E2853E18A6C4E300BC630D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01E2853D18A6C4E300BC630D /* Cocoa.framework */; };
01E285B818A6D7F400BC630D /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 01E285B718A6D7F400BC630D /* icon.png */; };
131C2B7F1BD686CB002FF9BE /* fleet in Resources */ = {isa = PBXBuildFile; fileRef = 131C2B7E1BD686CB002FF9BE /* fleet */; };
133DD11C1CE49AB900059FCC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 133DD10E1CE49AB900059FCC /* AppDelegate.m */; };
133DD11D1CE49AB900059FCC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 133DD10F1CE49AB900059FCC /* MainMenu.xib */; };
133DD11E1CE49AB900059FCC /* CoreOS-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 133DD1111CE49AB900059FCC /* CoreOS-Info.plist */; };
133DD11F1CE49AB900059FCC /* CoreOS.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 133DD1131CE49AB900059FCC /* CoreOS.entitlements */; };
133DD1201CE49AB900059FCC /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 133DD1141CE49AB900059FCC /* Credits.rtf */; };
133DD1211CE49AB900059FCC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 133DD1161CE49AB900059FCC /* InfoPlist.strings */; };
Expand Down Expand Up @@ -70,7 +68,6 @@
01E2854218A6C4E300BC630D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
01E2855C18A6C4E300BC630D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
01E285B718A6D7F400BC630D /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
131C2B7E1BD686CB002FF9BE /* fleet */ = {isa = PBXFileReference; lastKnownFileType = folder; path = fleet; sourceTree = SOURCE_ROOT; };
133DD10D1CE49AB900059FCC /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
133DD10E1CE49AB900059FCC /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
133DD1101CE49AB900059FCC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -108,7 +105,6 @@
019662171B04C6EA005FA955 /* files */,
137018AB1C11E9D00002B2B9 /* cloud-init */,
019662131B04C598005FA955 /* settings */,
131C2B7E1BD686CB002FF9BE /* fleet */,
137018B11C11F0DE0002B2B9 /* registry */,
01741B56190DB7B800BB1F91 /* coreos-osx-install.command */,
01741B62190DB80500BB1F91 /* first-init.command */,
Expand Down Expand Up @@ -231,7 +227,7 @@
01E2853218A6C4E300BC630D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Rimantas Mocevicius";
TargetAttributes = {
01E2853918A6C4E300BC630D = {
Expand Down Expand Up @@ -280,7 +276,6 @@
01741B65190DB81400BB1F91 /* up.command in Resources */,
133DD1221CE49AB900059FCC /* MainMenu.strings in Resources */,
137018B21C11F0DE0002B2B9 /* registry in Resources */,
133DD11E1CE49AB900059FCC /* CoreOS-Info.plist in Resources */,
137018AC1C11E9D00002B2B9 /* cloud-init in Resources */,
133DD11D1CE49AB900059FCC /* MainMenu.xib in Resources */,
01993A4F1B63DD730096E2E1 /* halt.command in Resources */,
Expand All @@ -294,7 +289,6 @@
01B675D61B602FC2004349CC /* check_vm_status.command in Resources */,
0106B34A1B65277F001709E0 /* functions.sh in Resources */,
01741B57190DB7B800BB1F91 /* coreos-osx-install.command in Resources */,
131C2B7F1BD686CB002FF9BE /* fleet in Resources */,
019410641BE0E5F200723E19 /* kill_VM.command in Resources */,
01CFC2DE1A2AA48300F251C2 /* change_release_channel.command in Resources */,
01741B67190DB82100BB1F91 /* update_osx_clients_files.command in Resources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 3 additions & 9 deletions src/CoreOS/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<development version="6300" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
Expand Down Expand Up @@ -55,12 +55,6 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="k2D-0b-tel"/>
<menuItem title="Fleet UI" id="LkH-Oi-Kkr">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="fleetUI:" target="494" id="7O2-Rp-5Zi"/>
</connections>
</menuItem>
<menuItem title="UI for Docker" id="sCD-se-Vah">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
Expand All @@ -79,7 +73,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Updates" id="DFA-8C-ne3">
<items>
<menuItem title="Check updates for OS X fleetctl and docker clients" id="sEE-aC-0Ob">
<menuItem title="Check for update of docker OS X client" id="sEE-aC-0Ob">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="updates:" target="494" id="3Va-Du-QFm"/>
Expand Down
4 changes: 2 additions & 2 deletions src/CoreOS/CoreOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.6</string>
<string>1.2.7</string>
<key>CFBundleVersion</key>
<string>461</string>
<string>463</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions src/CoreOS/en.lproj/MainMenu.strings
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
/* Class = "NSMenuItem"; title = "DockerUI"; ObjectID = "sCD-se-Vah"; */
"sCD-se-Vah.title" = "UI for Docker";

/* Class = "NSMenuItem"; title = "Check updates for OS X fleetctl and docker clients"; ObjectID = "sEE-aC-0Ob"; */
"sEE-aC-0Ob.title" = "Check updates for OS X fleetctl and docker clients";
/* Class = "NSMenuItem"; title = "Check for update of docker OS X client"; ObjectID = "sEE-aC-0Ob"; */
"sEE-aC-0Ob.title" = "Check for update of docker OS X client";

/* Class = "NSMenuItem"; title = "Quit"; ObjectID = "zsR-Hu-nBe"; */
"zsR-Hu-nBe.title" = "Quit";
Binary file modified src/bin/corectl
Binary file not shown.
Binary file modified src/bin/docker2aci
Binary file not shown.
Binary file modified src/bin/registry
Binary file not shown.
61 changes: 23 additions & 38 deletions src/cloud-init/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ coreos:
Options=bind
- name: etcd2.service
command: start
- name: fleet.service
command: start
- name: docker.service
command: start
drop-ins:
Expand All @@ -130,43 +128,30 @@ coreos:
Environment=DOCKER_OPTS='--insecure-registry="0.0.0.0/0"'
- name: update-engine.service
command: stop
- name: dockerui.service
command: start
content: |
[Unit]
Description=DockerUI Service
After=docker.service
Requires=docker.service
[Service]
User=core
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker pull uifd/ui-for-docker: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 \
uifd/ui-for-docker -e /docker.sock
#
ExecStop=/usr/bin/docker stop dockerui
ExecStopPost=-/usr/bin/docker rm dockerui
#
Restart=always
RestartSec=10s
write-files:
- path: /home/core/.ssh/id_rsa
permissions: '0600'
owner: core:core
content: |
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA18VKh3nRpHTOC+AAyg+YB1P0SSISR/2TjHG89c7ZhPTGCXr5
P60H5vU/YOrV8sQR542inDwxfAvhn86yHe/w8dX/g4krNDB+0NFL1fbQ9BktGsao
Apg5bWMGjBgVTp8WJlDfW7zYqJQu/wjZ90oz6EpL4+DhzAn/W0JUXWiFgCUpKDHJ
zZIZzebywLcJ/8jngMhxpae9OSDIkR9i5QNkeqLZhR0kB65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nVwNcL
8DIQjrdHZCo31tSDy0hN9PduHlAQRGQkl3ZOnIFBC4zmdhsJ/HZB3mtTzkJ4wpUz
q6STD2s8c+//zb9sWZod1Ni9tV1c8sE12ej3rTtT9aCUqS8whEFIqLIu24zzusN9
8UY2PwKBgHWyekUzaQRcteEYsCWsl9KeX777EdtbK6bGh5JlD9rK5YVK3Ogq24Ts
9+yKbdYPv6KjXbAnb3ywDeifIx9vna+4jtXZ8cUuZQcj4nmBtKfeaxZeN7OlHv0d
LwDeOM4DDptEENhfzc0sPYHyGqUsfH6c4kq5KwtDAoY9MCS5/dGN
-----END RSA PRIVATE KEY-----
- path: /home/core/.ssh/id_rsa.pub
permissions: '0600'
owner: core:core
content: |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXxUqHedGkdM4L4ADKD5gHU/RJIhJH/ZOMcbz1ztmE9MYJevk/rQfm9T9g6tXyxBHnjaKcPDF8C+GfzrId7/Dx1f+DiSs0MH7Q0UvV9tD0GS0axqgCmDltYwaMGBVOnxYmUN9bvNiolC7/CNn3SjPoSkvj4OHMCf9bQlRdaIWAJSkoMcnNkhnN5vLAtwn/yOeAyHGlp705IMiRH2LlA2R6otmFHSQHrkGr/wpu0WJt27EBTIarFeei7dAHlUf1zhStry/OEyqwEKiEo+4fk4vPZXiNyKNklju/I1qFcbc8HwbDVzTtdlQCURQO4losDmQgFdI4wz1flOOrsK+1+vPb core@core-01
- path: /opt/bin/wupiao
permissions: '0755'
content: |
Expand Down
7 changes: 1 addition & 6 deletions src/coreos-osx-install.command
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
mkdir ~/coreos-osx/bin
mkdir ~/coreos-osx/cloud-init
mkdir ~/coreos-osx/settings
mkdir ~/coreos-osx/fleet
mkdir ~/coreos-osx/my_fleet
mkdir ~/coreos-osx/registry
mkdir ~/coreos-osx/docker_images
###mkdir ~/coreos-osx/rkt_images
mkdir ~/coreos-osx/rkt_images

# cd to App's Resources folder
cd "$1"
Expand All @@ -29,9 +27,6 @@
# copy settings
cp -f "$1"/settings/* ~/coreos-osx/settings

# copy fleet units
cp -f "$1"/fleet/* ~/coreos-osx/fleet

# copy docker registry config
cp -f "$1"/registry/config.yml ~/coreos-osx/registry

Expand Down
31 changes: 4 additions & 27 deletions src/first-init.command
Original file line number Diff line number Diff line change
Expand Up @@ -75,44 +75,21 @@ vm_ip=$("${res_folder}"/bin/corectl q -i core-01)
#

echo " "
# download latest versions of etcdctl, fleetctl and docker clients
# download latest version of docker client
download_osx_clients
#

# Set the environment variables
# set etcd endpoint
export ETCDCTL_PEERS=http://$vm_ip:2379

# docker daemon
export DOCKER_HOST=tcp://$vm_ip:2375
export DOCKER_TLS_VERIFY=
export DOCKER_CERT_PATH=

# set etcd endpoint
export ETCDCTL_PEERS=http://$vm_ip:2379
# wait till VM is ready
echo " "
echo "Waiting for VM to be ready..."
spin='-\|/'
i=0
until curl -o /dev/null http://$vm_ip:2379 >/dev/null 2>&1; do i=$(( (i+1) %4 )); printf "\r${spin:$i:1}"; sleep .1; done
#
sleep 2
echo " "
echo "etcdctl ls /:"
etcdctl --no-sync ls /
#

# set fleetctl endpoint and install fleet units
export FLEETCTL_TUNNEL=
export FLEETCTL_ENDPOINT=http://$vm_ip:2379
export FLEETCTL_DRIVER=etcd
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false
echo " "
echo "fleetctl list-machines:"
fleetctl list-machines
echo " "
#
deploy_fleet_units
#

echo "Installation has finished, CoreOS VM is up and running !!!"
echo " "
echo "Assigned static IP for VM: $vm_ip"
Expand Down
21 changes: 0 additions & 21 deletions src/fleet/dockerui.service

This file was deleted.

23 changes: 0 additions & 23 deletions src/fleet/fleet-ui.service

This file was deleted.

Loading

0 comments on commit af94d18

Please sign in to comment.