Git Product home page Git Product logo

stackanetes's Introduction

Stackanetes

Overview

Stackanetes is heavily based on kolla-mesos (project abandoned). Link to base kolla repo

Stackanetes is an easy way to deploy OpenStack on Kubernetes. This includes the control plane (keystone, nova, etc) and a "nova compute" container that runs virtual machines (VMs) under a hypervisor.

This code is heavily experimental and should only be used for demo purposes. The architecture of this project will change significantly.

Checkout the video overview:

Stackanetes Overview

Requirements

  • Kubernetes 1.2 cluster with minimum 3 kubernetes minions/workers
  • see guides for CoreOS Kubernetes

Getting started

Building Configuration

Ensure the following packages are installed on the workstation that controls the Kubernetes cluster: git, python2.7, pip, kubectl v1.2+.

Clone this repo: git clone https://github.com/stackanetes/stackanetes and move into the kolla directory cd stackanetes.

Install all python dependencies from requirements.txt and generate the etc/kolla-k8s config directory.

sudo pip install ansible
pip install -r requirements.txt
python setup.py build && python setup.py install
sudo ./generate_config_file_sample.sh

Now, set the following variables in /etc/kolla-k8s/kolla-k8s.conf:

[k8s]
host = localhost:8001 // k8s API, this can be easily be configured by using 'kubectl proxy'
kubectl_path = /opt/bin/kubectl // absolute path to kubectl binary
yml_dir_path = /var/lib/kolla-k8s/ // absolute path to dir with manifests
[kolla]
deployment_id = root
[zookeeper]
host = 10.10.10.11:30000 // this will be the NodePort of the running zookeeper after you deploy it, per below

In /etc/kolla-k8s/globals.yml change enable_horizon to yes and set the name of host interface for compute-node and network node:

####################
Networking options
####################
network_interface: "eth0" // name of interface inside container                  
neutron_external_interface: "eno2" // name of physical interface

####################
OpenStack options
###################

enable_horizon: "yes"

To generate kubernetes manifests please set following variables in ansible/group_vars/all.yml file:

dest_yml_files_dir: /var/lib/kolla-k8s #absolute path to dir with manifests
docker_registry: quay.io/stackanetes # name of registry with openstack images 
host_interface: eno1 # name of interface for nova-compute in hostNetwork mode
image_version: 2.0.0 # check current version on quay.io/stackanetes

Run ansible-playbook to generate the configuration, ansible is only being used as a templating system:

cd ansible
ansible-playbook site.yml

Label kubernetes nodes

Persistent data (mariadb, zookeeper, rabbitmq) will be labeled as such:

kubectl label node minion1 app=persistent-control

Non-persistent data stored on separate node preferable more than 1 node:

kubectl label node minion2 app=non-persistent-control

Compute node will run nova-compute, the VMs. Currently you need to dedicate the host to these:

kubectl label node minion3 app=compute

Final host dependencies

There are a few temporary hacks in place to allow nova-compute run with full host privileges.

On all machines you must create the directories /var/lib/nova and /var/lib/libvirt:

mkdir -p /var/lib/nova /var/lib/libvirt

Additionally, a resolv.conf located at /home/core/resolv.conf must exist on all nodes that you want to be hypervisor nodes.

$ cat /home/core/resolv.conf
search default.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.200.0.50
options ndots:5

Deploy OpenStack services

First you must deploy zookeeper:

kolla-k8s --config-dir /etc/kolla-k8s run zookeeper

Then you can run everything else:

kolla-k8s --config-dir /etc/kolla-k8s run all

If you run into errors, run with the --debug flag for additional information:

kolla-k8s --debug

Deploy Stackanetes via stackanetes-deployer POD

To install Stackanetes vis stackanetes-deployer POD you still have to label your nodes and finish Final host dependencies step.

in stackanetes-deployer.yml change HOST_INTERFACE environment variable:

    env:
    - name: HOST_INTERFACE
      value: "eno2" # name of physical interface for compute node

then run:

kubectl create -f stackanetes-deployer.yml

Known issues

Please refer to issues

stackanetes's People

Contributors

dtadrzak avatar polvi avatar philips avatar alekssaul avatar ss7pro avatar

Watchers

James Cloos avatar Matt Baldwin avatar Ethan Devenport avatar  avatar

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.