This repo is a fork of coreos/coreos-vagrant. This provides a template Vagrantfile to create CoreOS cluster using Virtualbox and Vagrant.
Install dependencies
- VirtualBox 4.3.10 or greater.
- Vagrant 1.6 or greater.
Clone this project and bootstrapping
$ git clone https://github.com/spesnova/coreos-sandbox && coreos-sandbox
$ script/bootstrap
Startup and SSH
$ vagrant up
$ vagrant ssh
$ script/cibuild
user-data.yml.erb
#cloud-config
users:
- name: seigo
coreos-ssh-import-github: spesnova
~/.ssh/config
# Local CoreOS Cluster
Host core-01
HostName 172.17.8.101
User spesnova
IdentityFile ~/.ssh/github_ssh_private_key
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
LogLevel FATAL
You can login to CoreOS machine using GitHub SSH key.
$ ssh seigo@core-01
Get new token from https://discovery.etcd.io/new , then set this to .env
ETCD_DISCOVERY=https://discovery.etcd.io/xxxxxxxxxxxxxxxxxxxxx
Also, bootstrap script set new one if ETCD_DISCOVERY
is empty.
Configure $num_instances
in config.rb
$num_instances=3
Configure $update_channel
in config.rb
$update_channel="stable"
Update to newer version of the box "coreos-stable"
$ vagrant box update
Set datadog API key to .env
DATADOG_API_KEY=xxxxxxxxxxxxxxxxxxxx
Register SSH public keys that imported from github to Gitreceive.
# on CoreOS machines
$ /home/git/register-keys <github-username-1>,<github-username-2>,<github-username-3>
# Example
$ /home/git/register-keys spesnova