Coder Social home page Coder Social logo

avert / kube-opennebula Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kvaps/kube-opennebula

0.0 1.0 0.0 220 KB

Helm chart and OpenNebula images ready to deploy on Kubernetes

License: Apache License 2.0

Dockerfile 54.83% Shell 40.88% Smarty 4.29%

kube-opennebula's Introduction

Kube-OpenNebula

Helm chart and OpenNebula images ready to deploy on Kubernetes

Quick start

Control plane

  • Create namespace:

    kubectl create namespace opennebula
  • Deploy OpenNebula:

    cp helm/opennebula/values.yaml values.yaml
    vim values.yaml
    helm install opennebula helm/opennebula -f values.yaml --set oned.createCluster=1 --wait

Compute nodes

  • To deploy external compute node your hosts should have libvirtd and qemu-kvm installed and configured sudoers.
    However you can just install opennebula-node meta-package.

  • Get OpenNebula's ssh-key, and place it to /var/lib/one/.ssh/authorized_keys on every node to allow OpenNebula login via ssh.

    kubectl exec opennebula-opennebula-oned-0 -c oned -- ssh-keygen -y -f /var/lib/one/.ssh/id_rsa
  • Create new host via OpenNebula Interface.

  • Check is everything is fine
    You should be able login via ssh from oned pod to every node. You can check that by executing the following command:

    kubectl exec -ti opennebula-opennebula-oned-0 ssh <node>

Customization

Sometimes you need to perform some customization, eg. update sunstone views and addtitional drivers, etc.

All these customizations could be done by updating dockerimages, you can find some examples here, or by simple using extraVolumes and extraVolumeMounts in chart values.

Production setup

Production install assumes having persistent storage.

OpenNebula requires one ReadWriteOnce persistent volume per each oned-instance where database files will be stored, even local volumes enough for that, however it also requires one shared (ReadWriteMany) persistent volume for virtual machine logs and vnc tokens, take a look at nfs-server-provisioner if you'r storage does not support ReadWriteMany.

Example production configuration can be found here

Upgrade notes

The minor upgrades can be performed by standard way using rolling update, however major updates should be performed by fully chart reinstallation. You have to remove the old chart, and install new one, however your data should be saved on persistent volumes, thus new images will perform database migration on their first start.

Perform backup:

# Find the leader pod
kubectl get pod -l role=leader
# Perform the backup
kubectl exec <leader_pod> -c oned -- bash -c 'mysqldump -h$DB_SERVER -u$DB_USER -p$DB_PASSWORD $DB_NAME | gzip -9' > backup.sql.gz

Minor upgrade:

helm upgrade opennebula helm/opennebula -f values.yaml -f secrets.yaml --wait

Major upgrade:

# Remove the chart
helm remove opennebula opennebula
# Deploy the new chart
helm install opennebula opennebula -f values.yaml -f secrets.yaml --wait

kube-opennebula's People

Contributors

kvaps avatar

Watchers

 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.