Marlito is a project developed from scratch on distribute infrastructure stack.
This repo uses Vagrant and Virtualbox to create three CoreOS virtual machine.
- Virtualbox 4.3.10 or greater.
- Vagrant 1.6 or greater.
Copy user-data.sample
to data-sample
.
cp user-data.sample data-sample
Generate a new etcd
token here and
change discovery:
option in data-sample
.
Change DOCKER_REGISTRY
in user-data
to point to your
local running docker-registry
usually it will be local ip address.
Add your ssh public key in user-data
changing path
and content
as
the example.
- path: /home/core/.ssh/authorized_keys.d/<USERNAME-HERE>
permissions: 0600
owner: core
content: |
<SSH-RSA-KEY-HERE>
Copy config.rb.sample
to config.rb
cp config.rb.sample config.rb
Add the following to ~/.ssh/config
:
Host coreos
User core
HostName 172.17.8.101
IdentityFile ~/.ssh/id_rsa.pub
Add your key:
ssh-add ~/.ssh/id_rsa
Check if it is correctly loaded:
ssh-add -l
It will start three nodes.
vagrant up
To get in a node use.
vagrant ssh marlito-01
vagrant ssh marlito-02
vagrant ssh marlito-03
You will need a local docker-registry
. For more info
see
Configuring fleet
.
export FLEETCTL_TUNNEL=172.16.8.101
fleetctl list-machines
MACHINE IP METADATA
b3dac926... 172.17.8.101 -
Loading a service:
cd api/systemd/
ln -s api.service api@8000.service
fleetctl load api@8000.service
Job api.service loaded on b3dac926.../172.17.8.101
fleetctl list-units
UNIT STATE LOAD ACTIVE SUB DESC MACHINE
api@8000.service loaded loaded inactive dead marlito-api b3dac926.../172.17.8.101
fleetctl start api@8000.service
Job api.service launched on b3dac926.../172.17.8.101
fleetctl list-units
UNIT STATE LOAD ACTIVE SUB DESC MACHINE
api@8000.service launched loaded activating start-pre marlito-api b3dac926.../172.17.8.101
Inside a machine run:
sudo coreos-cloudinit --from-file /var/lib/coreos-vagrant/vagrantfile-user-data