Skip to content

Commit

Permalink
v0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
rimusz committed Jul 25, 2015
2 parents 586e45e + 6b1e0a7 commit 547d556
Show file tree
Hide file tree
Showing 19 changed files with 2,377 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ How to install CoreOS-xhyve UI

**WARNING**
-----------
- xhyve is a very new project, expect bugs! You must be running OS X 10.10.3 Yosemite or later and 2010 or later Mac for this to work.
- [xhyve](https://github.com/mist64/xhyve) is a very new project, but is very cool! You must be running OS X 10.10.3 Yosemite or later and 2010 or later Mac for this to work.
- if you use any version of VirtualBox prior to 5.0 then xhyve will crash your system either if VirtualBox is running or had been run previously after the last reboot (see xhyve's issues [#5](mist64/xhyve#5) and [#9](mist64/xhyve#9) for the full context). So, if you are unable to update VirtualBox to version 5, or later, and were using it in your current session please do restart your Mac before attempting to run xhyve.


####Required software:
* Is only [iTerm 2](http://www.iterm2.com/#/section/downloads)
* As [xhyve](https://github.com/mist64/xhyve) is prebuilt in the App itself.
* The only required software is [iTerm 2](http://www.iterm2.com/#/section/downloads)
* As [xhyve](https://github.com/mist64/xhyve) is integreted to the App.

####Download:
* Download `CoreOS-xhyve UI latest.dmg` from the [Releases Page](https://github.com/rimusz/coreos-xhyve-ui/releases) and open it and drag the App e.g to your Desktop.
* Download `CoreOS-xhyve UI latest.dmg` from the [Releases Page](https://github.com/rimusz/coreos-xhyve-ui/releases), open it and drag the App e.g to your Desktop.

###Install:
* Start the `CoreOS-xhyve UI` and from menu `Setup` choose `Initial setup of CoreOS-xhyve UI`
Expand Down Expand Up @@ -52,6 +52,7 @@ Just start `CoreOS-xhyve UI` application and you will find a small icon with the

* There you can `Up`, `Halt`, `Reload` CoreOS VM
* `SSH to core-01` (vagrant ssh) will open VM shell
* `Attache to VM's console` will open console
* Under `Up` OS Shell will be opened when VM boot finishes up and it will have such environment pre-set:

````
Expand All @@ -68,14 +69,13 @@ script are stored
* `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 running `fleet` units and etc
* [DockerUI](https://github.com/crosbymichael/dockerui) will show all running containers and etc
* Put your fleet units into `~/coreos-xhyve-ui/fleet` and will be automaticly deployed on each VM boot.
* This App has much automation as possible to make easier to use CoreOS on OS X, you can change CoreOS release channel and reload VM and your downloaded docker images will remain stored in an extra persistant disk.
* VM's console window will be openned in Terminal.app
* Put your fleet units into `~/coreos-xhyve-ui/fleet` and they will be automaticly deployed on each VM boot.
* 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 and your downloaded docker images will remain stored in an extra persistant disk.

To-dos
-----------
* Mount /Users folder via nfs to CoreOS VM
* Nicely hide/unhide VM's console window


Credits
-----------
Expand Down
Binary file modified coreos-xhyve-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
451 changes: 451 additions & 0 deletions src/CoreOS-xhyve UI.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

390 changes: 390 additions & 0 deletions src/CoreOS-xhyve UI/AppDelegate.m

Large diffs are not rendered by default.

779 changes: 779 additions & 0 deletions src/CoreOS-xhyve UI/Base.lproj/MainMenu.xib

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions src/CoreOS-xhyve UI/CoreOS-xhyve UI-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string></string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon</string>
<key>CFBundleIdentifier</key>
<string>net.linxos.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>25</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Rimantas Mocevicius. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
30 changes: 30 additions & 0 deletions src/CoreOS-xhyve_UI_VM.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -x

# Start VM
#

# get App's Resources folder
res_folder=$(cat ~/coreos-xhyve-ui/.env/resouces_path)

# Get UUID
UUID=$(cat ~/coreos-xhyve-ui/custom.conf | grep UUID= | head -1 | cut -f2 -d"=")
# Get pssword
my_password=$(cat ~/coreos-xhyve-ui/.env/password | base64 --decode )
# Get mac address and save it
echo -e "$my_password\n" | sudo -S "${res_folder}"/bin/uuid2mac $UUID > ~/coreos-xhyve-ui/.env/mac_address

# Get VM's IP and save it to file
"${res_folder}"/bin/get_ip &

# Start webserver
cd ~/coreos-xhyve-ui/cloud-init
"${res_folder}"/bin/webserver start

# Start VM
echo "Waiting for VM to boot up... "
cd ~/coreos-xhyve-ui
export XHYVE=~/coreos-xhyve-ui/bin/xhyve
"${res_folder}"/bin/coreos-xhyve-run -f custom.conf coreos-xhyve-ui

# Stop webserver
"${res_folder}"/bin/webserver stop
Binary file added src/bin/dtach
Binary file not shown.
15 changes: 15 additions & 0 deletions src/check_vm_status.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# check VM status
#

# get App's Resources folder
res_folder=$(cat ~/coreos-xhyve-ui/.env/resouces_path)

status=$(ps aux | grep "[c]oreos-xhyve-ui/bin/xhyve" | awk '{print $2}')

if [ "$status" = "" ]; then
echo "VM is stopped"
else
echo "VM is running"
fi
25 changes: 25 additions & 0 deletions src/console.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# console.command
#

# get App's Resources folder
res_folder=$(cat ~/coreos-xhyve-ui/.env/resouces_path)

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

# check VM status
status=$(ps aux | grep "[c]oreos-xhyve-ui/bin/xhyve" | awk '{print $2}')
if [ "$status" = "" ]; then
echo " "
echo "CoreOS VM is not running, please start VM !!!"
pause "Press any key to continue ..."
exit 1
fi

# Attach to VM's console
echo "Attaching to VM's console ..."
echo " "
"${res_folder}"/bin/dtach -a ~/coreos-xhyve-ui/.env/.console
33 changes: 33 additions & 0 deletions src/coreos-xhyve-install.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# coreos-xhyve-install.command
#

# create in "coreos-xhyve-ui" all required folders and files at user's home folder where all the data will be stored
mkdir ~/coreos-xhyve-ui
mkdir ~/coreos-xhyve-ui/tmp
mkdir ~/coreos-xhyve-ui/bin
mkdir ~/coreos-xhyve-ui/cloud-init
mkdir ~/coreos-xhyve-ui/fleet
###mkdir ~/coreos-xhyve-ui/docker_images
###mkdir ~/coreos-xhyve-ui/rkt_images
###mkdir ~/coreos-xhyve-ui/share
###chmod -R 777 ~/coreos-xhyve-ui/share

# cd to App's Resources folder
cd "$1"

# copy files to ~/coreos-xhyve-ui/bin
cp -f "$1"/files/* ~/coreos-xhyve-ui/bin
# copy xhyve to bin folder
cp -f "$1"/bin/xhyve ~/coreos-xhyve-ui/bin
chmod 755 ~/coreos-xhyve-ui/bin/*

# copy user-data
cp -f "$1"/settings/user-data ~/coreos-xhyve-ui/cloud-init

# copy custom.conf
cp -f "$1"/settings/custom.conf ~/coreos-xhyve-ui

# initial init
open -a iTerm.app "$1"/first-init.command
23 changes: 23 additions & 0 deletions src/coreos-xhyve.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# coreos-xhyve.command
# run commands on VM via ssh

# get App's Resources folder
res_folder=$(cat ~/coreos-xhyve-ui/.env/resouces_path)

# get VM IP
#vm_ip=$( ~/coreos-xhyve-ui/mac2ip.sh $(cat ~/coreos-xhyve-ui/.env/mac_address))
vm_ip=$(cat ~/coreos-xhyve-ui/.env/ip_address)

# check VM status
status=$(ps aux | grep "[c]oreos-xhyve-ui" | awk '{print $2}')
if [ "$status" = "" ]; then
echo " "
echo "CoreOS VM is not running, please start VM !!!"
pause "Press any key to continue ..."
exit 1
fi

# pass some arguments via $1 $2 ...
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no core@$vm_ip $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12}
23 changes: 23 additions & 0 deletions src/fetch_latest_iso.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# fetch latest iso
#

# get App's Resources folder
res_folder=$(cat ~/coreos-xhyve-ui/.env/resouces_path)

CHANNEL=$(cat ~/coreos-xhyve-ui/custom.conf | grep CHANNEL= | head -1 | cut -f2 -d"=")

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

echo " "
echo "Fetching lastest CoreOS $CHANNEL channel ISO ..."
echo " "

cd ~/coreos-xhyve-ui/
"${res_folder}"/bin/coreos-xhyve-fetch -f custom.conf

echo " "
pause 'Press [Enter] key to continue...'
Loading

0 comments on commit 547d556

Please sign in to comment.