Code Monkey home page Code Monkey logo

apollo-coreos's Introduction

Apollo coreos

This uses CoreOS, Etcd, Fleet and confd to provides distributed configuration and service discovery to Apollo api and web application.

Dependencies

This repo uses Vagrant and Virtualbox to create three CoreOS virtual machine.

Configuring

Copy user-data.sample to user-data.

cp user-data.sample user-data

Generate a new etcd token here and change discovery: option in data-sample.

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

Create a shared folder.

mkdir -p ~/.containers/apollo

Environment

Set the environment you are working on.

export APOLLO_ENVIRONMENT=local
export APOLLO_TAG=$APOLLO_ENVIRONMENT
export DOCKER_REGISTRY="${APOLLO_ENVIRONMENT}.registry.apollolab.com.br:5000"
export FLEETCTL_TUNNEL=172.16.16.101

It recommended to add it to ~/.bashrc. It's used in other projects.

Common address

As root set more one ip address to eth0.

ifconfig eth0:0 172.16.16.16

ssh

Add the following to ~/.ssh/config:

Host apollo
  User     core
  HostName 172.16.16.101
  IdentityFile ~/.ssh/id_rsa.pub

Add your key:

ssh-add ~/.ssh/id_rsa
ssh-add  ~/.vagrant.d/insecure_private_key

Check if it is correctly loaded:

ssh-add -l

Starting the cluster

It will start three nodes.

vagrant up

To get in a node use.

vagrant ssh apollo-01

Starting registry

You will need a local docker-registry. For more info see

Fleet

List machines.

fleetctl list-machines
MACHINE         IP              METADATA
b3dac926...     172.16.16.101    -

Reloading user-data

Inside a machine run:

sudo coreos-cloudinit --from-file /var/lib/coreos-vagrant/vagrantfile-user-data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.