This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
9 changed files
with
213 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
CoreOS-Vagrant Cluster GUI for Mac OS X | ||
====================== | ||
CoreOS-Vagrant Cluster GUI for OS X | ||
============================ | ||
|
||
CoreOS-Vagrant Cluster GUI for Mac OS X is a Mac Status bar App which works like a wrapper around the [coreos-vagrant](https://github.com/coreos/coreos-vagrant) command line tool and supports 3 cluster machines. A standalone one can be found here [CoreOS-Vagrant GUI](https://github.com/rimusz/coreos-osx-gui). | ||
|
||
[CoreOS](https://coreos.com) is a Linux distribution made specifically to run [Docker](https://www.docker.io/) containers. | ||
[CoreOS-Vagrant](https://github.com/coreos/coreos-vagrant) is made to run on VirtualBox and VMWare VMs. | ||
|
||
![CoreOS-Vagrant-Cluster-GUI](coreos-vagrant-cluster-gui.png "CoreOS-Vagrant-Cluster-GUI") | ||
|
||
Download | ||
-------- | ||
Head over to the [Releases Page](https://github.com/rimusz/coreos-osx-gui-cluster/releases) to grab the latest ZIP file. | ||
|
||
|
||
How to install | ||
---------- | ||
|
||
Required software | ||
* [VirtualBox for Mac OS X hosts](https://www.virtualbox.org/wiki/Downloads), [Vagrant for Mac OS X](http://www.vagrantup.com/downloads.html) and [iTerm 2](http://www.iterm2.com/#/section/downloads) | ||
|
||
* Download `CoreOS Cluster GUI latest.zip` from the [Releases Page](https://github.com/rimusz/coreos-osx-gui-cluster/releases) and unzip it. | ||
* Start the `CoreOS Cluster GUI` and from menu `Setup` choose `Initial setup of CoreOS-Vagrant Cluster` | ||
* The install will do the following: | ||
```` | ||
1) All dependent files/folders will be put under "coreos-osx-cluster" folder in the user's home folder e.g /Users/someuser/coreos-osx-cluster | ||
2) Will clone latest coreos-vagrant from git | ||
3) user-data file will have fleet and etcd set | ||
4) 3 cluster nodes will be set with IPs: '172.17.8.100, 172.17.8.101 and 172.17.8.102' | ||
5) Will download and install fleetctl and etcdctl clients to ~/coreos-osx-cluster/bin/ | ||
6) Will download latest vagrant VBox and run vagrant up to initialise VM | ||
8) Will forward port 2322 from localhost to core-01 ssh port 22. | ||
```` | ||
|
||
How it works | ||
------------ | ||
|
||
Just start `CoreOS Cluster GUI` application and you will find a small icon with the CoreOS logo with the (C) which means for cluster in the Status Bar. | ||
|
||
* There you can `Up`, `Suspend`, `Halt`, `Reload` CoreOS vagrant VMs | ||
* Under `Up & OS shell` OS Shell will be opened when `vagrant up` finishes and it will have such environment set: | ||
```` | ||
1) Path to ~/coreos-osx-cluster/bin where etcdclt and fleetctl binaries are stored | ||
2) FLEETCTL_TUNNEL=127.0.0.1:2322 for the fleetctl tunnel to work properly | ||
```` | ||
|
||
* `Updates/Force CoreOS update` will run `sudo update_engine_client -update` on CoreOS VMs. | ||
* `Updates/Check for updates` will update etcdclt and fleetctl OS X clients to the same versions as CoreOS VMs run. It will store downloads from github `coreos-vagrant` in `~/coreos-osx-cluster/github` folder, it will not overwrite user's `Vagrantfile, config.rb and users-data` files. | ||
* `SSH to core1/2/3` menu options will open VM shell | ||
|
||
|
||
Other links | ||
----------- | ||
* A standalone CoreOS VM version App can be found here [CoreOS-Vagrant GUI](https://github.com/rimusz/coreos-osx-gui). | ||
|
||
* Also you might like my other [boot2docker GUI for OS X](https://github.com/rimusz/boot2docker-gui-osx) project for [boot2docker](https://github.com/boot2docker/boot2docker). | ||
|
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,71 @@ | ||
#!/bin/bash | ||
|
||
# change_release_channel.command | ||
# CoreOS Cluster GUI for OS X | ||
# | ||
# Created by Rimantas on 01/04/2014. | ||
# Copyright (c) 2014 Rimantas Mocevicius. All rights reserved. | ||
|
||
|
||
### Set release channel | ||
LOOP=1 | ||
while [ $LOOP -gt 0 ] | ||
do | ||
VALID_MAIN=0 | ||
echo " " | ||
echo " CoreOS Release Channel:" | ||
echo " 1) Alpha " | ||
echo " 2) Beta " | ||
echo " 3) Stable " | ||
echo " " | ||
echo "Select an option:" | ||
|
||
read RESPONSE | ||
XX=${RESPONSE:=Y} | ||
|
||
if [ $RESPONSE = 1 ] | ||
then | ||
VALID_MAIN=1 | ||
sed -i "" 's/#$update_channel/$update_channel/' ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='stable'/channel='alpha'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='beta'/channel='alpha'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
channel="Alpha" | ||
LOOP=0 | ||
fi | ||
|
||
if [ $RESPONSE = 2 ] | ||
then | ||
VALID_MAIN=1 | ||
sed -i "" 's/#$update_channel/$update_channel/' ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='alpha'/channel='beta'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='stable'/channel='beta'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
channel="Beta" | ||
LOOP=0 | ||
fi | ||
|
||
if [ $RESPONSE = 3 ] | ||
then | ||
VALID_MAIN=1 | ||
sed -i "" 's/#$update_channel/$update_channel/' ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='alpha'/channel='stable'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
sed -i "" "s/channel='beta'/channel='stable'/" ~/coreos-osx-cluster/coreos-vagrant/config.rb | ||
channel="Stable" | ||
LOOP=0 | ||
fi | ||
|
||
if [ $VALID_MAIN != 1 ] | ||
then | ||
continue | ||
fi | ||
done | ||
### Set release channel | ||
|
||
function pause(){ | ||
read -p "$*" | ||
} | ||
|
||
# | ||
echo "The 'config.rb' file was updated to $channel channel !!!" | ||
echo "You need to run 'Destroy Cluster (vagrant destroy)' and then" | ||
echo "on next 'Up & OS shell' new cluster will be created !!!" | ||
pause 'Press [Enter] key to continue...' |
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,17 @@ | ||
## Start - Inserted by CoreOS-Vagrant GUI App | ||
# Automatically set the discovery token on 'vagrant up' | ||
# | ||
if File.exists?('user-data') && ARGV[0].eql?('up') | ||
require 'open-uri' | ||
require 'yaml' | ||
|
||
token = open('https://discovery.etcd.io/new').read | ||
|
||
data = YAML.load(IO.readlines('user-data')[1..-1].join) | ||
data['coreos']['etcd']['discovery'] = token | ||
|
||
yaml = YAML.dump(data) | ||
File.open('user-data', 'w') { |file| file.write("#cloud-config\n\n#{yaml}") } | ||
end | ||
# | ||
## End - Inserted by CoreOS-Vagrant GUI App |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
#!/bin/bash | ||
|
||
# vagrant_destroy.command | ||
# CoreOS Cluster GUI for OS X | ||
# | ||
# Created by Rimantas on 01/04/2014. | ||
# Copyright (c) 2014 Rimantas Mocevicius. All rights reserved. | ||
|
||
function pause(){ | ||
read -p "$*" | ||
} | ||
|
||
cd ~/coreos-osx-cluster/coreos-vagrant | ||
vagrant destroy | ||
|
||
pause 'Press [Enter] key to continue...' |
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 | ||
|
||
# vagrant_up.command | ||
# CoreOS Cluster GUI for OS X | ||
# | ||
# Created by Rimantas on 01/04/2014. | ||
# Copyright (c) 2014 Rimantas Mocevicius. All rights reserved. | ||
|
||
function pause(){ | ||
read -p "$*" | ||
} | ||
|
||
cd ~/coreos-osx-cluster/coreos-vagrant | ||
vagrant reload | ||
|
||
# path to the bin folder where we store our binary files | ||
export PATH=$PATH:${HOME}/coreos-osx-cluster/bin | ||
|
||
# set fleetctl tunnel | ||
# Add vagrant ssh key to ssh-agent | ||
vagrant ssh-config core-01 | sed -n "s/IdentityFile//gp" | xargs ssh-add | ||
export FLEETCTL_TUNNEL=127.0.0.1:2322 | ||
export FLEETCTL_STRICT_HOST_KEY_CHECKING=false | ||
echo "fleetctl list-machines :" | ||
fleetctl list-machines | ||
|
||
echo "" | ||
echo "CoreOS Cluster was reloaded !!!" | ||
echo "" | ||
pause 'Press [Enter] key to continue...' |
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,11 @@ | ||
#!/bin/bash | ||
|
||
# vagrant_ssh2.command | ||
# CoreOS Cluster GUI for OS X | ||
# | ||
# Created by Rimantas on 01/04/2014. | ||
# Copyright (c) 2014 Rimantas Mocevicius. All rights reserved. | ||
|
||
cd ~/coreos-osx-cluster/coreos-vagrant | ||
vagrant ssh core-02 | ||
|
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,11 @@ | ||
#!/bin/bash | ||
|
||
# vagrant_ssh3.command | ||
# CoreOS Cluster GUI for OS X | ||
# | ||
# Created by Rimantas on 01/04/2014. | ||
# Copyright (c) 2014 Rimantas Mocevicius. All rights reserved. | ||
|
||
cd ~/coreos-osx-cluster/coreos-vagrant | ||
vagrant ssh core-03 | ||
|