-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
2,377 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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...' |
Oops, something went wrong.